Skip to content

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.

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

Endpoint
GET https://api.parcelengineering.com/api/v1/workspace/favorite-views

Returns the authenticated user’s Favorites in personal order, with each View’s shared definition and metadata.

Query parameters

ParameterTypeRequiredDescription
workspace_idstring (UUID)Yes (JWT)Attribution for the user session.
limitinteger 1..100NoDefault 25.
offsetinteger ≥ 0NoDefault 0.

Example

List Favorite Views
curl "https://api.parcelengineering.com/api/v1/workspace/favorite-views?workspace_id=w1e2f3a4-0001-4b7c-9e5d-000000000001" \
-H "Authorization: Bearer eyJhbGciOi..."

Response

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

Endpoints
DELETE https://api.parcelengineering.com/api/v1/workspace/favorite-views/{viewId}
POST https://api.parcelengineering.com/api/v1/workspace/favorite-views/delete/batch

Removes 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)

ParameterDescription
viewIdUUID of the shared View to unfavorite.

Batch body

POST /workspace/favorite-views/delete/batch
{ "ids": ["a1b2c3d4-0001-4e8d-bf6a-000000000001", "b2c3d4e5-0002-4e8d-bf6a-000000000002"] }

1–100 View UUIDs. Per-item results in input order.

Example

Unfavorite a View
curl -X DELETE \
https://api.parcelengineering.com/api/v1/workspace/favorite-views/a1b2c3d4-0001-4e8d-bf6a-000000000001 \
-H "Authorization: Bearer eyJhbGciOi..."

Response

Response
{
"data": { "deleted": true },
"metadata": { "credits": 0 }
}