Skip to content

Unified Catalog Topology Filter Options



POST /api/v1/unified_catalog/topology/filter_options

Overview

Retrieve the list of filterable values for specified fields.

Body Request Parameters

Parameter Name Type Required Description
entityType string Entity type code
Nullable: False
fields array Y List of fields for which filter options need to be returned
Nullable: False
Example: ['project', 'owner']
filters json Selected filter conditions
Nullable: False
search string Search keyword
Nullable: False

Parameter Supplementary Notes

Request Parameter Description

Parameter Name type Required Description
entityType string No Entity type code
fields array[string] Yes List of fields for which filter options need to be returned
filters json No Selected filter conditions
search string No Search keyword

Call Notes

  • fields supports passing multiple fields. The API will return the selectable values for each field separately.
  • If the field is owner, the returned results will try to be parsed into team-readable names.
  • filters can be used for linked filtering scenarios.

Request Example

curl 'https://openapi.truewatch.com/api/v1/unified_catalog/topology/filter_options' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"fields":["project","owner"],"entityType":"service"}'

Response

{
    "code": 200,
    "content": {
        "project": [
            {
                "label": "demo",
                "value": "demo"
            }
        ],
        "owner": [
            {
                "label": "研发团队",
                "value": "研发团队"
            }
        ]
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}