统一目录实体类型列表¶
POST /api/v1/unified_catalog/entity_type_cfg/list
概述¶
获取统一目录实体类型列表。
Body 请求参数¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| pageIndex | integer | 页码,默认 1 允许为空: False 例子: 1 $minValue: 1 |
|
| pageSize | integer | 每页数量,默认 20,最大 200 允许为空: False 例子: 20 $minValue: 1 $maxValue: 200 |
|
| search | string | 按实体类型编码或显示名搜索 允许为空: False |
|
| filters | json | 通过实体 attributes 命中实体后反向过滤实体类型 允许为空: False |
|
| withDefault | boolean | 是否包含系统默认实体类型,默认 true 允许为空: False |
|
| withEntityCount | boolean | 是否返回实体数量,默认 true 允许为空: False |
参数补充说明¶
请求参数说明
| 参数名 | type | 必选 | 说明 |
|---|---|---|---|
| pageIndex | integer | 否 | 页码,默认 1 |
| pageSize | integer | 否 | 每页数量,默认 20 |
| search | string | 否 | 按实体类型编码或显示名搜索 |
| filters | json | 否 | 通过实体 attributes 过滤,反向筛选实体类型 |
| withDefault | boolean | 否 | 是否包含系统默认类型,默认 true |
| withEntityCount | boolean | 否 | 是否返回实体数量,默认 true |
调用注意事项
- 这是分页接口,建议显式传
pageIndex和pageSize。 - 返回结果中的
extraConfig为当前工作空间视角下的实体类型额外配置。 - 默认类型和自定义类型会同时出现在结果中,具体取决于
withDefault。
请求例子¶
curl 'https://openapi.guance.com/api/v1/unified_catalog/entity_type_cfg/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"pageIndex":1,"pageSize":20,"withDefault":true,"withEntityCount":true}'
响应¶
{
"code": 200,
"content": {
"items": [
{
"uuid": "sys_service",
"entityType": "service",
"name": "服务",
"sourceType": "default",
"extraConfig": {}
},
{
"uuid": "cate_xxxx",
"entityType": "custom_demo",
"name": "自定义类型",
"sourceType": "custom",
"extraConfig": {}
}
],
"pagination": {
"pageIndex": 1,
"pageSize": 20,
"count": 2,
"totalCount": 2
}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-XXXX"
}