Workspace API
Favorite Views
List, favorite, reorder, and unfavorite Views for the current user with GET/POST/DELETE /workspace/favorite-views.
Every route below costs 0 credits and requires a user JWT and workspace membership. API keys receive 400 user_identity_required on all three — Favorites are personal state and have no API-key principal to attach to.
A request from a non-member receives 403 forbidden.
Favoriting never copies or forks the shared View; it only stores a personal pointer (and, for Upsert, a personal position). See Workspace Views.
List Favorite Views
GET https://api.parcelengineering.com/api/v1/workspace/favorite-viewsReturns the authenticated user’s Favorites in personal order, with each View’s shared definition and metadata.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | string (UUID) | Yes (JWT) | Attribution for the user session. |
limit | integer 1..100 | No | Default 25. |
offset | integer ≥ 0 | No | Default 0. |
Example
curl "https://api.parcelengineering.com/api/v1/workspace/favorite-views?workspace_id=w1e2f3a4-0001-4b7c-9e5d-000000000001" \ -H "Authorization: Bearer eyJhbGciOi..."const response = await fetch( 'https://api.parcelengineering.com/api/v1/workspace/favorite-views?workspace_id=w1e2f3a4-0001-4b7c-9e5d-000000000001', { headers: { 'Authorization': 'Bearer eyJhbGciOi...' }, });
const { data, metadata } = await response.json();Response
{ "data": { "views": [ { "id": "a1b2c3d4-0001-4e8d-bf6a-000000000001", "workspace_id": "w1e2f3a4-0001-4b7c-9e5d-000000000001", "dataset": "account", "view_type": "dynamic", "name": "Top architects", "definition": { "version": 2, "q": "architect", "where": { "combinator": "and", "rules": [ { "field": "type", "operator": "in", "value": ["architect"] }, { "field": "score", "operator": "between", "value": [60, 100] } ] } }, "metadata": { "credits": 0 }}Unknown Views return 404 view_not_found.
Delete a Favorite View
DELETE https://api.parcelengineering.com/api/v1/workspace/favorite-views/{viewId}POST https://api.parcelengineering.com/api/v1/workspace/favorite-views/delete/batchRemoves the current user’s Favorite pointer. The shared View is unchanged. Unfavorite is idempotent for the single route when the Favorite is already absent.
Path parameters (single)
| Parameter | Description |
|---|---|
viewId | UUID of the shared View to unfavorite. |
Batch body
{ "ids": ["a1b2c3d4-0001-4e8d-bf6a-000000000001", "b2c3d4e5-0002-4e8d-bf6a-000000000002"] }1–100 View UUIDs. Per-item results in input order.
Example
curl -X DELETE \ https://api.parcelengineering.com/api/v1/workspace/favorite-views/a1b2c3d4-0001-4e8d-bf6a-000000000001 \ -H "Authorization: Bearer eyJhbGciOi..."const response = await fetch( 'https://api.parcelengineering.com/api/v1/workspace/favorite-views/a1b2c3d4-0001-4e8d-bf6a-000000000001', { method: 'DELETE', headers: { 'Authorization': 'Bearer eyJhbGciOi...' }, });
const { data, metadata } = await response.json();Response
{ "data": { "deleted": true }, "metadata": { "credits": 0 }}