跳转至

统一目录实体类型创建



POST /api/v1/unified_catalog/entity_type_cfg/create

概述

创建统一目录实体类型。

Body 请求参数

参数名 类型 必选 说明
entityType string Y 实体类型编码(全局唯一)
允许为空: False
最大长度: 64
name string 实体类型显示名
允许为空: False
最大长度: 128
description string 实体类型描述
允许为空: False
最大长度: 512
schemaDefine string DataSchema YAML 文本
允许为空: False
viewDefine string UIView YAML 文本
允许为空: False
extend json 扩展字段
允许为空: False

参数补充说明

请求参数说明

参数名 type 必选 说明
entityType string 实体类型编码,全局唯一
name string 实体类型显示名
description string 实体类型描述
schemaDefine string DataSchema YAML 文本
viewDefine string UIView YAML 文本
extend json 扩展字段

模板使用说明

  • 若未传 schemaDefineviewDefine,系统会从默认模板自动填充。
  • 默认模板中的 {entity_type} 会替换成当前请求的 entityType
  • 若调用方希望完全自定义模板,可直接传入完整 YAML 文本。

调用注意事项

  • OpenAPI 不支持已废弃的实体类型分组参数。
  • 若仅想创建最小实体类型,可只传 entityType

请求例子

curl 'https://openapi.guance.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"}'

响应

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

文档评价

文档内容是否对您有帮助? ×