Unified Catalog Topology Field Filter Options¶
POST /api/v1/unified_catalog/topology/filter_options
Overview¶
Read filterable candidate values, readable labels, and counts for the specified fields.
Before You Begin and Usage Steps¶
Keys in the fields response preserve the request spelling; a bare env and attributes.env are queried equivalently and each is filled back separately. A bare owner further attempts to convert historical account/team UUIDs to names, falling back to the original value if not found; an owner stored by name also keeps the original name, and not all values are guaranteed to be group_ UUIDs. Every value is converted to a string with Python str, for example null → "None", true → "True", and the number 3 → "3"; count is non-negative; this differs from entity field_value/count, which preserve JSON value types.
filters limits the entity set; fieldValue or the compatible search filters candidate values, and fieldValue takes precedence when both are non-empty; no full-text entity search is performed. If all fields are blank, the call succeeds with {}. Candidates are sorted by count in descending order, with owner further sorted by display label; this is not a paginated API.
All entity types are processed according to the effective health configuration and do not depend on the progress of background historical cleanup. If no type policy is configured, system defaults to default and other types default to disabled; entities with inherit inherit the type, custom specifies a Func, and disabled turns it off. After a type is disabled, the response returns healthScore=null, healthStatus=unknown, and healthUpdateAt=null; health filtering/statistics also follow the disabled state rather than historical results. Filtering/sorting/statistics on top-level health fields must explicitly specify entityType.
Request Headers¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or fill in: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| filters.attribute field name | string | Dynamic key; an array of scalar candidate values is recommended; arbitrary DQL expressions cannot be used as field names. Top-level built-in fields such as urn/provider/entityType and healthStatus, plus their snake_case aliases, remain at the top level, while keys inside attributes/sourceMetadata/telemetrySelectors objects are flattened. Example: ["prod"]How to obtain or fill in: Use the actual field names of the current entity's attributes; the semantics of complex value filtering follow the saved field type and query service capabilities. |
|
| filters.attribute field name[*] | string | One candidate value for the same field; numbers/booleans keep their original JSON types; do not confuse null with the string "null". Example: prodHow to obtain or fill in: Obtain from the current field candidate values/existing entity values. |
|
| fields[*] | string | The field name is not a title and not DQL; attributes.entityType and the top-level entityType are independent and are not merged into the same bucket. owner (bare key) is further resolved into identity/team labels, while attributes.owner is only a normal bucket. Example: envHow to obtain or fill in: A single attribute/built-in field name, such as env, attributes.env, provider, healthStatus. |
|
| entityType | string | Optional single entity type code; when omitted or an empty string, no type restriction is applied. A single type must be specified when collecting options for health fields. Allows null: False Example: databaseHow to obtain or fill in: Obtain the code from items[].entityType in the entity type list; it is not the type UUID or display name. |
|
| fields | array | Y | Required, 1..64 items; blank entries are skipped and identical keys are deduplicated; a bare env and attributes.env are merged into the same field at query time, but the response fills back the request keys separately. If all items are blank, the response is {} rather than a no-match error. Health fields require entityType. Allows null: False Minimum length: 1 Maximum length: 64 Example: ["env", "owner"]How to obtain or fill in: Take the field name from fields[].key of entity_fields or from the built-in fields of existing entities. |
| filters | json | Optional object; {} means no additional filtering; a bare attribute key env is converted to attributes.env, and an explicit attributes.entityType is not treated as the top-level entityType. Put multiple candidate values for the same field in an array; different fields are combined by the query service. Health fields have a separate effective disabled state; see Usage. Allows null: False Example: {"env": ["prod"]}How to obtain or fill in: The field name comes from the type DataSchema/attributes or the topology field list; the value comes from field statistics/existing entities. |
|
| search | string | In the topology query, searches the URN/name/display_name of the starting entity; in filter_options, it is a legacy compatible parameter for candidate value keywords, and fieldValue takes precedence when non-empty. Do not confuse the two scenarios. Allows null: False Example: demoHow to obtain or fill in: The query keyword entered by the caller. |
|
| fieldValue | string | Optional in filter_options; when non-empty, it takes precedence over search; it only filters candidate buckets and is not a full-text entity search. An empty string falls back to search; if both are empty, candidates are not filtered. Allows null: False Example: prodHow to obtain or fill in: The candidate value keyword entered by the user. |
Additional Parameter Notes¶
Request Parameter Description
| Parameter | type | Required | Description |
|---|---|---|---|
| entityType | string | No | Entity type code; required when requesting filter options for health fields or filtering by health fields |
| fields | array[string] | Yes | List of fields for which to return filter options; up to 64 items |
| filters | json | No | Filter conditions already selected |
| search | string | No | Compatible parameter for candidate value search; new callers should use fieldValue instead |
| fieldValue | string | No | Filters candidate values only; takes precedence when passed together with search |
Usage Notes
fieldssupports multiple fields, and the API returns the available values for each field separately.- If the field is
owner, the response attempts to resolve team-readable names where possible. filterscan be used in linked filtering scenarios.- When
fieldsorfiltersinvolve health fields,entityTypeis required; when the type is disabled, candidate values are generated according to the effective disabled state.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/unified_catalog/topology/filter_options' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"entityType":"database","fields":["env","owner"],"filters":{},"fieldValue":""}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
content.<request field name> |
array<object> | One candidate array per valid request field; [] when there are no candidates; the dynamic field name matches the request. |
content.<request field name>[].label |
string | Readable text; a bare owner may be resolved to a team/identity name, otherwise it is the value string. |
content.<request field name>[].value |
string | Value string used when submitting a filter; owner may be a UUID or the original name, depending on the actual current entity attributes. |
content.<request field name>[].count |
integer | Number of entities for the candidate value. |
| content.declaration | object or null | Workspace common declaration attached to non-empty business objects; it may be null or an empty object when not configured; empty objects are not added. |
{
"code": 200,
"content": {
"env": [
{
"label": "prod",
"value": "prod",
"count": 12
}
],
"owner": [
{
"label": "DBA",
"value": "group_example",
"count": 3
}
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
Downstream errors follow the shared Kodo mapping; 4xx responses may return the actual HTTP status along with ft.KodoCommonApiErr or a mapped business code; not all failures are converted to 406. 5xx errors that are not passed through, connection exceptions, and successful results with mismatched structures ultimately become 500 ft.InternalServerError. Preserve errorCode/message/traceId and handle them according to the read or write stage; a successful HTTP response cannot replace acceptance verification of actual entity visibility.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | A request field is missing, or a field value violates the declared validation conditions | Parameter parsing failed | Verify the parameter position, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Invalid request JSON syntax | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | The top level of the body is not a JSON object | Some JSON file format error | Submit an object as shown in the example, not an array/string. |
| 406 | ft.InvalidParameter | entityType is not specified when collecting health field statistics/filtering by health, or the statistics field is invalid | The parameter {} is invalid |
Fill in a unique type code, and use the field API/actual attribute keys. |
| 500 | ft.InternalServerError | Downstream query failure/timeout, unexpected success data shape, or label/team/time formatting failure | Internal error | Narrow the query scope and retry as appropriate; if failures persist, investigate with the traceId and filter conditions retained, and do not attribute them to this write. |