Unified Catalog Entity List¶
POST /api/v1/unified_catalog/entity/list
Overview¶
Retrieve the unified catalog entity list under the current workspace. The query data comes from the Studio local database.
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| pageIndex | integer | Page number, default 1 Allow empty: False Example: 1 $minValue: 1 |
|
| pageSize | integer | Number of items per page, default 20, maximum 200 Allow empty: False Example: 20 $minValue: 1 $maxValue: 200 |
|
| urn | string | Filter by entity URN exactly Allow empty: False |
|
| entityType | string | Entity type code, e.g., service, host, database, cloud_resource Allow empty: False |
|
| provider | string | Single source type. For multiple values, it is recommended to use providers instead. Allow empty: False |
|
| providers | array | List of source types, e.g., ["discovery", "manual"] Allow empty: False |
|
| search | string | Fuzzy search, matching urn, name, display_name Allow empty: False |
|
| filters | json | Filter by attributes field. Key is the attribute name, value is an array of matching values. Allow empty: False Example: {'env': ['prod'], 'project': ['demo']} |
|
| orderBy | string | Sort field, default updatedAt Allow empty: False |
|
| order | string | Sort direction, supports asc / desc, default desc Allow empty: False |
Parameter Supplementary Description¶
Request Parameter Description
| Parameter Name | type | Required | Description |
|---|---|---|---|
| pageIndex | integer | No | Page number, default 1 |
| pageSize | integer | No | Number of items per page, default 20, maximum 200 |
| urn | string | No | Filter by entity URN exactly |
| entityType | string | No | Entity type code, e.g., service, host, database, cloud_resource |
| provider | string | No | Single source type |
| providers | array[string] | No | List of multiple source types |
| search | string | No | Fuzzy search, matching urn, name, display_name |
| filters | json | No | Filter by attributes field. Key is the attribute name, value is an array of matching values. |
| orderBy | string | No | Sort field, default updatedAt |
| order | string | No | Sort direction, supports asc / desc, default desc |
filters Usage Instructions
filtersonly matches fields under the entity'sattributes.- For example:
{"env":["prod"],"project":["demo"]}. - If multiple values need to be matched for a certain attribute, please pass them uniformly in an array.
Calling Notes
- This is a paginated interface. It is recommended to always explicitly pass
pageIndexandpageSize. - It is recommended to choose either
providerorproviders. For multiple source values, prioritize usingproviders. pagination.totalCountin the response indicates the total number of entities matching the current filter conditions.
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/unified_catalog/entity/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"pageIndex":1,"pageSize":20,"entityType":"database","filters":{"env":["prod"]}}'
Response¶
{
"code": 200,
"content": {
"items": [
{
"urn": "urn:mysql:default:demo",
"entityType": "database",
"name": "demo",
"provider": "manual",
"attributes": {
"project": "demo",
"env": "prod"
},
"teamInfo": [],
"tagsInfo": []
}
],
"pagination": {
"pageIndex": 1,
"pageSize": 20,
"count": 1,
"totalCount": 1
}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-XXXX"
}