Skip to main content

Classification tags API

Platform classification-tag catalog (Access P3.1) + access policies (P3.3).

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

MethodPathOperation idNotes
POST/api/control-plane/classifications/lineage-sweeprun_lineage_sweep
GET/api/control-plane/classifications/{id}/view-exposureget_view_exposure
GET/api/control-plane/tagslist_tags
POST/api/control-plane/tagscreate_tag
PATCH/api/control-plane/tags/{id}update_tag
DELETE/api/control-plane/tags/{id}delete_tag
PUT/api/control-plane/tags/{id}/access-policyset_access_policy
DELETE/api/control-plane/tags/{id}/access-policyclear_access_policy

POST /api/control-plane/classifications/lineage-sweep​

Operation id: run_lineage_sweep. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing tag:manage permission.

Response 200 (application/json): SweepReport

FieldTypeRequiredDescription
viewsintegeryesViews the sweep tried.
computedintegeryesViews whose lineage it computed.
retaggedintegeryesViews whose lineage-derived tags it changed.
failuresSweepFailure[]yesViews (or listings) it could not judge. Their tags are unchanged.
StatusMeaning
200The sweep ran. failures names every view (or listing) whose lineage could not be computed; those views keep their tags
401Not authenticated
403Missing tag:manage permission
409A sweep is already running, or the embedded catalog is not enabled
500Internal error

GET /api/control-plane/classifications/{id}/view-exposure​

Operation id: get_view_exposure. Auth: Session cookie. Forbidden (403): Missing tag:read permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesClassification (tag) id

Response 200 (application/json): ViewExposureDto

FieldTypeRequiredDescription
starrocksMaterializedViewsViewExposureItem[], nullablenonull when at least one listing failed; see starrocks_list_error.
starrocksListErrorstring, nullablenoSet exactly when starrocks_materialized_views is null; names each failing engine.
enginesNotCheckedEngineNotChecked[]yesEngines that reach the classification but were not asked (external, or not running). Their views are unknown, not absent.
trinoViewsTrinoViewItem[], nullablenoThe views in egret's catalogs that the DEFINER audit lists (spec B5): their lineage reaches a table of this classification, or a table a mask or row-filter rule selects, or is unknown. null when egret's catalogs could not all be listed;...
trinoListErrorstring, nullablenoSet exactly when trino_views is null; names what could not be listed.
StatusMeaning
200The materialized views that already exist and read a table of this classification
401Not authenticated
403Missing tag:read permission
404No such classification
500Internal error

GET /api/control-plane/tags​

Operation id: list_tags. Auth: Session cookie. Forbidden (403): Missing tag:read permission.

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 platform tag catalog, each with its live assignment count
401Not authenticated
403Missing tag:read permission
500Internal error

POST /api/control-plane/tags​

Operation id: create_tag. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing tag:manage permission.

Request body (application/json): CreateTag

FieldTypeRequiredDescription
keystringyes
namestringyes
descriptionstring, nullableno
colorstring, nullableno

Response 201 (application/json): TagDto

FieldTypeRequiredDescription
idstring (uuid)yes
keystringyes
namestringyes
descriptionstringyes
colorstringyes
assignment_countinteger (int64)yes
created_atstring (date-time)yes
StatusMeaning
201Tag created
400Invalid tag key
401Not authenticated
403Missing tag:manage permission
409A tag with that key already exists
500Internal error

PATCH /api/control-plane/tags/{id}​

Operation id: update_tag. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing tag:manage permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesTag id

Request body (application/json): UpdateTag

FieldTypeRequiredDescription
namestring, nullableno
descriptionstring, nullableno
colorstring, nullableno

Response 200 (application/json): TagDto

FieldTypeRequiredDescription
idstring (uuid)yes
keystringyes
namestringyes
descriptionstringyes
colorstringyes
assignment_countinteger (int64)yes
created_atstring (date-time)yes
StatusMeaning
200Tag updated
400The new name is masked by a tag masking policy while this tag is attached to a whole TABLE (which would make that table unreadable rather than masked)
401Not authenticated
403Missing tag:manage permission
404No such tag
500Internal error

DELETE /api/control-plane/tags/{id}​

Operation id: delete_tag. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing tag:manage permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesTag id
StatusMeaning
204Tag deleted
401Not authenticated
403Missing tag:manage permission
500Internal error

PUT /api/control-plane/tags/{id}/access-policy​

Operation id: set_access_policy. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing tag:manage permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesTag id

Request body (application/json): SetAccessPolicy

FieldTypeRequiredDescription
required_rolesstring[]noClearance role NAMES; a principal needs >= 1 to access objects carrying this tag. Cleared = >= 1 role OR >= 1 group; both empty = no gate.
required_groupsstring[]noClearance GROUP ids (as strings; Access P3.4). Each is parsed as a Uuid before hitting the repo — a non-uuid entry is rejected 400 BadRequest (never spliced unvalidated into a Cedar policy string).

Response 200 (application/json): AccessPolicyWritten

FieldTypeRequiredDescription
okbooleanyesAlways true — the write committed, or this response was never built.
skippedSkipReport[]yesEvery profile/item the accompanying recompile could not express.
StatusMeaning
200Classification access policy set
401Not authenticated
403Missing tag:manage permission
500Internal error

DELETE /api/control-plane/tags/{id}/access-policy​

Operation id: clear_access_policy. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing tag:manage permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesTag id

Response 200 (application/json): AccessPolicyWritten

FieldTypeRequiredDescription
okbooleanyesAlways true — the write committed, or this response was never built.
skippedSkipReport[]yesEvery profile/item the accompanying recompile could not express.
StatusMeaning
200Classification access policy cleared
401Not authenticated
403Missing tag:manage permission
500Internal error