实体
网关前缀:${API_BASE}/metadata/entities/...
DTO 字段说明(EntityDto)
id字符串(返回时)name字符串,必填,实体名称(如表名或业务名)dataSourceId字符串,必填,关联数据源IDtable字符串,可选,实际表名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"