跳到主要内容

实体

网关前缀:${API_BASE}/metadata/entities/...

DTO 字段说明(EntityDto)

  • id 字符串(返回时)
  • name 字符串,必填,实体名称(如表名或业务名)
  • dataSourceId 字符串,必填,关联数据源ID
  • table 字符串,可选,实际表名
  • description 字符串,可选,描述
  • fields 数组(返回时),字段列表

创建实体

  • POST /entities
  • 示例:
curl -X POST \
"${API_BASE}/metadata/entities" \
-H "Content-Type: application/json" \
-d '{
"name":"orders",
"dataSourceId":"ds-1001",
"table":"orders",
"description":"Orders table"
}'

更新/删除/按ID查询

  • PUT /entities/{id}
  • DELETE /entities/{id}
  • GET /entities/{id}
curl -X PUT "${API_BASE}/metadata/entities/en-5001" -H "Content-Type: application/json" -d '{"description":"Orders table (updated)"}'
curl -X DELETE "${API_BASE}/metadata/entities/en-5001"
curl -X GET "${API_BASE}/metadata/entities/en-5001"

按名称查询

  • GET /entities/name/{name}
curl -X GET "${API_BASE}/metadata/entities/name/orders"

搜索与按数据源过滤

  • GET /entities?keyword=&page=&pageSize=&sortBy=&sortDirection=
  • GET /entities/datasource/{dataSourceId}
curl "${API_BASE}/metadata/entities?keyword=order&page=0&pageSize=10"
curl -X GET "${API_BASE}/metadata/entities/datasource/ds-1001"