Unified Catalog Topology Query¶
POST /api/v1/unified_catalog/topology/query
Overview¶
Query unified catalog topology relationships.
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| entityType | string | Entity type code Nullable: False |
|
| urn | string | Focus entity URN Nullable: False |
|
| providers | array | Provider type list Nullable: False |
|
| relationTypes | array | Relationship type list, currently mainly uses links and containsNullable: False |
|
| filters | json | Entity filter fields, supports any field in attributesNullable: False |
|
| groupByFields | array | Multi-level grouping by attributes fields, grouped sequentially according to array orderNullable: False |
|
| search | string | Search keyword Nullable: False |
Parameter Supplementary Notes¶
Request Parameter Description
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| entityType | string | No | Source entity type code |
| urn | string | No | Focus entity URN |
| providers | array[string] | No | Source entity provider type list |
| relationTypes | array[string] | No | List of relationship types to return |
| filters | json | No | Source entity filter conditions, supports any field in attributes |
| groupByFields | array[string] | No | Topology entity node grouping field list |
| search | string | No | Source entity search keyword |
groupByFields Usage Notes
- Perform multi-level grouping according to the array order, e.g.,
["project","env","serviceType"]. - Grouping is based on entity nodes in the topology result, not on relationship edges.
Call Considerations
entityType,providers,search,urn,filtersonly apply to source entity determination.- The return structure is fixed as
items + groupInfo. - In the platform's internal topology query results, the
attributesof 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"
}