Skip to content

Unified Catalog Entity Type Creation



POST /api/v1/unified_catalog/entity_type_cfg/create

Overview

Create a unified catalog entity type.

Body Request Parameters

Parameter Name Type Required Description
entityType string Y Entity type code (globally unique)
Allow empty: False
Max length: 64
name string Entity type display name
Allow empty: False
Max length: 128
description string Entity type description
Allow empty: False
Max length: 512
extraConfig json Extra configuration for the entity type in the current workspace
Allow empty: False
customProperties string YAML text for DataSchema custom fields appended to the entity type in the current workspace, recommended top-level as custom_properties
Allow empty: False
schemaDefine string DataSchema YAML text
Allow empty: False
viewDefine string UIView YAML text
Allow empty: False
extend json Extension fields
Allow empty: False

Parameter Supplementary Description

Request Parameter Description

Parameter Name type Required Description
entityType string Yes Entity type code, globally unique
name string No Entity type display name
description string No Entity type description
extraConfig json No Extra configuration in the current workspace
customProperties string No YAML text for DataSchema custom fields appended to the entity type in the current workspace, recommended top-level as custom_properties
schemaDefine string No DataSchema YAML text
viewDefine string No UIView YAML text
extend json No Extension fields

Template Usage Instructions

  • If schemaDefine or viewDefine is not passed, the system will automatically fill them from the default template.
  • The {entity_type} in the default template will be replaced with the entityType from the current request.
  • If the caller wishes to fully customize the template, they can directly pass the complete YAML text.
  • Both extraConfig and customProperties can be passed during creation, and they will be written to the current workspace entity type configuration.

Call Precautions

  • OpenAPI does not support the deprecated entity type grouping parameter.
  • To create only a minimal entity type, you can pass only entityType.

Request Example

curl 'https://openapi.truewatch.com/api/v1/unified_catalog/entity_type_cfg/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"entityType":"custom_demo","name":"Custom Type","description":"demo type"}'

Response

{
    "code": 200,
    "content": {
        "uuid": "cate_xxxx",
        "entityType": "custom_demo",
        "name": "Custom Type",
        "sourceType": "custom",
        "extraConfig": {},
        "customProperties": "",
        "effectiveSchemaDefine": "yaml text"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}