Unified Catalog Entity Creation¶
POST /api/v1/unified_catalog/entity/create
Overview¶
Create a unified catalog entity.
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| entityType | string | Y | Entity type code Allow empty: False Example: database |
| name | string | Y | Entity name Allow empty: False Example: demo |
| attributes | json | Entity attributes object Allow empty: False Example: {'project': 'demo', 'env': 'prod', 'custom_tags': ['mysql']} |
|
| telemetrySelectors | array | Associated query information configuration Allow empty: False |
Parameter Supplementary Description¶
Request Parameter Description
| Parameter Name | type | Required | Description |
|---|---|---|---|
| entityType | string | Yes | Entity type code |
| name | string | Yes | Entity name |
| attributes | json | No | Entity attributes object |
| telemetrySelectors | array | No | Entity associated query configuration |
Common Extended Field Descriptions for attributes
| Field Name | type | Description |
|---|---|---|
| depends_on | array[string] | Dependency relationship, will be converted to links upon writing |
| component_of | array[string] | Belonging relationship, will be converted to contains upon writing |
| custom_tags | array/string | Custom tags, if the tag does not exist, it will be created automatically |
| owner | string/array | Team name, the backend will resolve team information based on the team name |
Call Notes
- Relationship fields should be uniformly placed in
attributesfor passing, there is no need to pass relations separately. - If passing
custom_tags, it is recommended to use an array of tag names.
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/unified_catalog/entity/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"entityType":"database","name":"demo","attributes":{"project":"demo","env":"prod","component_of":["urn:system:default:core"]},"telemetrySelectors":[]}'