Chuyển tới nội dung chính

Governance data browser API

Governance Data: browse a catalog and read an object's lineage (DG frontend redesign #1).

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

MethodPathOperation idNotes
GET/api/control-plane/governance/attentionattentionWhat needs attention in governance, per the reader's permissions.
GET/api/control-plane/governance/browse/{catalog_id}browse
GET/api/control-plane/governance/catalogslist_catalogsGET /governance/catalogs: every registry catalog, by name, for the Governance Data tree.
GET/api/control-plane/governance/changeschangesRecent governance changes, newest first.
GET/api/control-plane/governance/engines/{id}/pluginengine_pluginWhat the Ranger plugins of an engine's profile report downloading.
GET/api/control-plane/governance/lineage/{catalog_id}object_lineage
GET/api/control-plane/governance/tags/{catalog_id}object_tags

GET /api/control-plane/governance/attention​

Operation id: attention. Auth: Session cookie. Forbidden (403): Holds neither policy:read nor tag:read.

What needs attention in governance, per the reader's permissions.

Findings computed from egret's own records, each only for a reader holding its source's permissions; the rest are listed in notChecked. A source that fails is reported as a source_unavailable finding and the others still answer. Counts the reader may not read are null.

Response 200 (application/json): AttentionResponse

FieldTypeRequiredDescription
generatedAtstring (date-time)yes
countsCountsyesCounts the reader may read; null for one they may not (never 0).
findingsFinding[]yesCritical, warning, info; then by kind.
notCheckedNotChecked[]yes
StatusMeaning
200Counts, findings and the checks not run for this reader
401Not authenticated
403Holds neither policy:read nor tag:read
500Internal error

GET /api/control-plane/governance/browse/{catalog_id}​

Operation id: browse. Auth: Session cookie. Forbidden (403): Missing policy:read and tag:read permission.

ParameterInTypeRequiredDescription
catalog_idpathstring (uuid)yesRegistry catalog id
schemaquerystringnoThe schema to list (dotted for a nested egret namespace).
tablequerystringnoThe table or view whose columns to list; needs schema.

Response 200 (application/json): BrowseResponse

FieldTypeRequiredDescription
sourceBrowseSourceno
enginesBrowseEngine[]yesEvery engine the catalog is attached to, by name.
itemsBrowseItem[], nullablenoSchemas, or a schema's tables and views. null when table is given or the level was not listed.
columnsBrowseColumn[], nullablenoThe table's columns, when table is given and it was listed.
notListedNotListedno
StatusMeaning
200One level of the catalog, or why it was not listed
400table without schema, or an empty schema or table
401Not authenticated
403Missing policy:read and tag:read permission
404No such catalog, or (egret catalog) no such schema or table
500Internal error

GET /api/control-plane/governance/catalogs​

Operation id: list_catalogs. Auth: Session cookie. Forbidden (403): Missing policy:read and tag:read permission.

GET /governance/catalogs: every registry catalog, by name, for the Governance Data tree. Gated like browse, on policy:read OR tag:read, so a steward who cannot read the catalog registry (catalog_registry:read) can still pick a catalog to browse.

Response 200 (application/json): array of GovernanceCatalog

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyesThe registry name, which is also the catalog's SQL name on every engine.
sourceGovernanceCatalogSourceyesHow a catalog is read: from egret's own warehouse, or through an engine.
connectorTypestringyesThe catalog's kind as the registry stores it (iceberg, hive, jdbc, ...).
enginesstring[]yesThe names of the engines the catalog is attached to, by name.
warehouseIdstring (uuid), nullablenoThe warehouse an egret catalog is; null for any other catalog.
warehouseNamestring, nullablenoThat warehouse's name; null exactly when warehouse_id is.
workspacesGovernanceWorkspace[]yesThe workspaces the catalog is assigned to, by name: the rows GET /control-plane/catalogs/\{id\}/workspaces reads (registry.catalog_workspaces).
StatusMeaning
200Every registry catalog, by name
401Not authenticated
403Missing policy:read and tag:read permission
500Internal error

GET /api/control-plane/governance/changes​

Operation id: changes. Auth: Session cookie. Forbidden (403): Holds neither policy:read nor tag:read.

Recent governance changes, newest first.

Governance events, newest first: grant, rule, hand-written policy, migration and compile changes and role assignments for a policy:read reader; clearance changes and catalog-column tags for a tag:read reader. Recorded from the version that introduced this feed on; role assignments and catalog tags are best-effort (recorded after commit).

ParameterInTypeRequiredDescription
limitqueryinteger (int64)noPage size, default 25, at most 100.
cursorquerystringnoThe previous page's nextCursor (<ts_rfc3339>,<id>).

Response 200 (application/json): ChangesPage

FieldTypeRequiredDescription
entriesChangeEntry[]yes
nextCursorstring, nullableno
retentionDaysinteger (int64), nullablenoDays after which events are pruned; null when they are never pruned.
StatusMeaning
200One page of governance changes
400A malformed cursor
401Not authenticated
403Holds neither policy:read nor tag:read
500Internal error

GET /api/control-plane/governance/engines/{id}/plugin​

Operation id: engine_plugin. Auth: Session cookie. Forbidden (403): Lacks policy:read or engine:read.

What the Ranger plugins of an engine's profile report downloading.

The plugin download ledger of the engine's policy profile, judged by the same rules as the Governance Overview's plugin findings. Records what plugins report holding. Requires policy:read and engine:read.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesEngine id

Response 200 (application/json): EnginePluginResponse

FieldTypeRequiredDescription
generatedAtstring (date-time)yes
enginePluginEngineyes
profilePluginProfileno
sharedWithPluginEngineRef[]yesThe other engines bound to the same profile (legacy shared), by name.
pluginPluginReportDtoyesWhich Ranger plugin the engine runs (egret_perm::ranger_plugin_report).
judgedJudgedyes
kindsKindReport[]yesOne entry per kind (policies, then tags); empty when not judged.
rowsLedgerRowDto[]yesThe profile's raw ledger rows, newest first; empty without a profile.
StatusMeaning
200The engine's plugin download state
401Not authenticated
403Lacks policy:read or engine:read
404No engine with this id
500Internal error

GET /api/control-plane/governance/lineage/{catalog_id}​

Operation id: object_lineage. Auth: Session cookie. Forbidden (403): Missing policy:read and tag:read permission.

ParameterInTypeRequiredDescription
catalog_idpathstring (uuid)yesRegistry catalog id
schemaquerystringyesThe object's schema (dotted for a nested egret namespace).
tablequerystringyesThe table or view.

Response 200 (application/json): ObjectLineage

FieldTypeRequiredDescription
readersLineageReader[]yesThe views and materialized views that read this table. See readers_incomplete.
readersIncompleteReadersIncompleteno
viewViewLineageInfono
StatusMeaning
200The object's readers, and for a view its own lineage
400A missing or empty schema or table
401Not authenticated
403Missing policy:read and tag:read permission
404No such catalog, or (egret catalog) no such table or view
500Internal error
503(egret catalog) egret's warehouse could not be read to tell a table from a view
504(egret catalog) egret's warehouse did not answer within the deadline

GET /api/control-plane/governance/tags/{catalog_id}​

Operation id: object_tags. Auth: Session cookie. Forbidden (403): Missing policy:read and tag:read permission.

ParameterInTypeRequiredDescription
catalog_idpathstring (uuid)yesRegistry catalog id
schemaquerystringyesThe table's schema (dotted for a nested egret namespace).
tablequerystringyesThe table or view.

Response 200 (application/json): ObjectTags

FieldTypeRequiredDescription
supportedbooleanyesfalse for a catalog that is not egret's: its objects cannot be tagged (tags are keyed by an egret warehouse), and assignments is null.
assignmentsResourceTagDto[], nullablenoEach tag directly on the table (column empty) or on one of its columns, sorted by column then tag key. null exactly when not supported.
StatusMeaning
200The table's and its columns' tags, or that the catalog cannot carry tags
400A missing or empty schema or table
401Not authenticated
403Missing policy:read and tag:read permission
404No such catalog
500Internal error