Skip to main content

Sharing API

Per-object grants: share a dashboard / chart / dataset / folder with a user or group at a workspace role.

This page lists 6 endpoints (OpenAPI tag shares). It is generated from openapi.json; see the REST API overview for authentication, CSRF and error conventions.

MethodPathOperation idNotes
GET/api/ws/{workspace}/objects/{kind}/{id}/grantsgrant_list
PUT/api/ws/{workspace}/objects/{kind}/{id}/grantsgrant_put
DELETE/api/ws/{workspace}/objects/{kind}/{id}/grants/{grant_id}grant_delete
GET/api/ws/{workspace}/objects/{kind}/{id}/tagsobject_tags_list
PUT/api/ws/{workspace}/objects/{kind}/{id}/tags/{tag_id}object_tag_assign
DELETE/api/ws/{workspace}/objects/{kind}/{id}/tags/{tag_id}object_tag_unassign

GET /api/ws/{workspace}/objects/{kind}/{id}/grants​

Operation id: grant_list. Auth: Session cookie. Forbidden (403): Missing <kind>:manage on the object.

ParameterInTypeRequiredDescription
workspacepathstringyesWorkspace slug
kindpathstringyesObject kind: dashboard | chart | dataset | folder | saved_query | app
idpathstring (uuid)yesObject id
workspacepathstringyes

Response 200 (application/json): array of ObjectGrantDto

FieldTypeRequiredDescription
idstring (uuid)yes
principal_typestringyes
principal_idstring (uuid)yes
principal_namestring, nullablenoHuman-readable grantee name: a user's email or a group's name. None if the principal row could not be resolved (e.g. deleted).
rolestringyesThe workspace role name (ws_viewer | ws_editor).
effectstringyesallow | deny.
expires_atstring (date-time), nullablenoOptional expiry (P2a). None = never expires. This is the object's own direct-grant list (manage-only), so an expired grant is still listed here — only the read-time admission predicates exclude expired grants.
StatusMeaning
200Direct object grants
400Unknown kind
401Not authenticated
403Missing <kind>:manage on the object
404No such object in this workspace
500Internal error

PUT /api/ws/{workspace}/objects/{kind}/{id}/grants​

Operation id: grant_put. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing <kind>:manage on the object.

ParameterInTypeRequiredDescription
workspacepathstringyesWorkspace slug
kindpathstringyesObject kind: dashboard | chart | dataset | folder | saved_query | app
idpathstring (uuid)yesObject id
workspacepathstringyes

Request body (application/json): ObjectGrantBody

FieldTypeRequiredDescription
principal_typestringyesuser | group.
principal_idstringyesA user's email, a group's name, or a UUID.
rolestringyesws_viewer (Viewer, read) | ws_editor (Editor, manage). For a "Blocked" grant, send ws_editor with effect="deny".
effectstringnoallow (default) | deny. A deny blocks the principal on this object.
expires_atstring (date-time), nullablenoOptional expiry (RFC3339). None = never expires (unchanged default). Enforced at read time by the PDP/admission predicates, not here.

Response 200 (application/json): ObjectGrantDto

FieldTypeRequiredDescription
idstring (uuid)yes
principal_typestringyes
principal_idstring (uuid)yes
principal_namestring, nullablenoHuman-readable grantee name: a user's email or a group's name. None if the principal row could not be resolved (e.g. deleted).
rolestringyesThe workspace role name (ws_viewer | ws_editor).
effectstringyesallow | deny.
expires_atstring (date-time), nullablenoOptional expiry (P2a). None = never expires. This is the object's own direct-grant list (manage-only), so an expired grant is still listed here — only the read-time admission predicates exclude expired grants.
StatusMeaning
200Grant created (or already existed)
400Unknown kind, role, or principal_type
401Not authenticated
403Missing <kind>:manage on the object
404No such object in this workspace
500Internal error

DELETE /api/ws/{workspace}/objects/{kind}/{id}/grants/{grant_id}​

Operation id: grant_delete. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing <kind>:manage on the object.

ParameterInTypeRequiredDescription
workspacepathstringyesWorkspace slug
kindpathstringyesObject kind: dashboard | chart | dataset | folder | saved_query | app
idpathstring (uuid)yesObject id
grant_idpathstring (uuid)yesGrant id to revoke
workspacepathstringyes

Response 200 (application/json): Ack

FieldTypeRequiredDescription
okbooleanyes
StatusMeaning
200Grant revoked (idempotent)
400Unknown kind
401Not authenticated
403Missing <kind>:manage on the object
404No such object in this workspace
500Internal error

GET /api/ws/{workspace}/objects/{kind}/{id}/tags​

Operation id: object_tags_list. Auth: Session cookie. Forbidden (403): Missing <kind>:read on the object.

ParameterInTypeRequiredDescription
workspacepathstringyesWorkspace slug
kindpathstringyesObject kind: dashboard | chart | dataset | folder | saved_query | app
idpathstring (uuid)yesObject id
workspacepathstringyes

Response 200 (application/json): array of TagDto

FieldTypeRequiredDescription
idstring (uuid)yes
keystringyes
namestringyes
descriptionstringyes
colorstringyes
assignment_countinteger (int64)yes
created_atstring (date-time)yes
StatusMeaning
200The object's classification tags
400Unknown kind
401Not authenticated
403Missing <kind>:read on the object
404No such object in this workspace
500Internal error

PUT /api/ws/{workspace}/objects/{kind}/{id}/tags/{tag_id}​

Operation id: object_tag_assign. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing <kind>:manage on the object.

ParameterInTypeRequiredDescription
workspacepathstringyesWorkspace slug
kindpathstringyesObject kind: dashboard | chart | dataset | folder | saved_query | app
idpathstring (uuid)yesObject id
tag_idpathstring (uuid)yesTag id to assign
workspacepathstringyes

Response 200 (application/json): Ack

FieldTypeRequiredDescription
okbooleanyes
StatusMeaning
200Tag assigned (idempotent)
400Unknown kind
401Not authenticated
403Missing <kind>:manage on the object
404No such object in this workspace
500Internal error

DELETE /api/ws/{workspace}/objects/{kind}/{id}/tags/{tag_id}​

Operation id: object_tag_unassign. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing <kind>:manage on the object.

ParameterInTypeRequiredDescription
workspacepathstringyesWorkspace slug
kindpathstringyesObject kind: dashboard | chart | dataset | folder | saved_query | app
idpathstring (uuid)yesObject id
tag_idpathstring (uuid)yesTag id to unassign
workspacepathstringyes

Response 200 (application/json): Ack

FieldTypeRequiredDescription
okbooleanyes
StatusMeaning
200Tag unassigned (idempotent)
400Unknown kind
401Not authenticated
403Missing <kind>:manage on the object
404No such object in this workspace
500Internal error