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
schemaDefine string DataSchema YAML text
Allow empty: False
viewDefine string UIView YAML text
Allow empty: False
extend json Extended fields
Allow empty: False

Parameter Supplementary Notes

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
schemaDefine string No DataSchema YAML text
viewDefine string No UIView YAML text
extend json No Extended fields

Template Usage Notes

  • If schemaDefine or viewDefine is not passed, the system will automatically populate 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.

Calling Precautions

  • OpenAPI does not support the deprecated entity type grouping parameter.
  • If you only want to create 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":"自定义类型","description":"demo type"}'

Response

{
    "code": 200,
    "content": {
        "uuid": "cate_xxxx",
        "entityType": "custom_demo",
        "name": "自定义类型",
        "sourceType": "custom",
        "extraConfig": {}
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}