Skip to content

Unified Catalog Topology Query



POST /api/v1/unified_catalog/topology/query

Overview

Query the unified catalog topology relationships.

Body Request Parameters

Parameter Type Required Description
entityType string Entity type code
Allow empty: false
urn string Focus entity URN
Allow empty: false
providers array Provider type list
Allow empty: false
relationTypes array Relation type list, currently mainly uses links and contains
Allow empty: false
filters json Entity filter fields, supports any field in attributes
Allow empty: false
groupByFields array Multi-level grouping by array order; entityType reads the top-level field of the entity, other fields read attributes
Allow empty: false
search string Search keyword
Allow empty: false

Parameter Supplementary Notes

Request Parameter Notes

Parameter type Required Description
entityType string No Starting entity type code
urn string No Focus entity URN
providers array[string] No Starting entity provider type list
relationTypes array[string] No Relation type list to return
filters json No Starting entity filter conditions, supports any field in attributes
groupByFields array[string] No Topology entity node grouping field list
search string No Starting entity search keyword

groupByFields Usage Notes

  • Perform multi-level grouping by array order, e.g., ["project","env","serviceType"].
  • entityType reads from the top-level field of the entity, other fields read from the entity attributes.
  • Grouping is based on entity nodes in the topology results, not on relationship edges.

Calling Considerations

  • entityType, providers, search, urn, filters only apply to determining the starting entity.
  • The return structure is fixed as items + groupInfo.
  • In the platform's topology query results, the attributes of the entity summaries at both ends of a relationship are returned in full.

Request Example

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

Response

{
    "code": 200,
    "content": {
        "items": [
            {
                "relationType": "links",
                "sourceUrn": "urn:system:default:core",
                "targetUrn": "urn:service:default:demo",
                "sourceUrnInfo": {
                    "urn": "urn:system:default:core",
                    "attributes": {
                        "project": "demo"
                    }
                },
                "targetUrnInfo": {
                    "urn": "urn:service:default:demo",
                    "attributes": {
                        "project": "demo",
                        "env": "prod"
                    }
                }
            }
        ],
        "groupInfo": {
            "groupByLayers": [],
            "noGroupData": []
        }
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}