对象类型详情
更新时间:2026-09-24
接口描述
获取指定对象类型的完整详情,并返回与其相关的已发布 linkType 列表。为新接口。
权限说明
需具备对应工作空间及本体(ontology)的查看权限。
注意事项
workspaceId、ontology、apiName 不存在或无权限时,请求会失败。
请求结构
Plain Text
1GET /v1/workspaces/{workspaceId}/ontologies/{ontology}/objectTypes/{apiName}/fullMetadata/published HTTP/1.1
2Host: databuilder.bd.baidubce.com
3Authorization: authorization string
请求头域
除公共头域(含 Authorization 鉴权)外,无其它特殊头域。
请求参数
| 参数名 | 是否是 path 参数 | 是否必须 | 含义 |
|---|---|---|---|
| workspaceId | 是 | 是 | 工作空间 ID |
| ontology | 是 | 是 | 本体名称 |
| apiName | 是 | 是 | 对象类型的 apiName |
响应头域
除公共头域外,无其它特殊头域。
响应参数
| 变量名 | 类型 | 说明 |
|---|---|---|
| requestId | String | 请求 ID |
| code | String | 成功返回 SUCCESS |
| message | String | 失败时返回错误信息 |
| result | Object | 已有的 objectType 详情信息;其中 linkTypes 为已发布的相关 linkType 列表(返回结构类似 linkType list) |
错误码
通用错误码可参考如下(本体接口专属错误码待确认,以最新实现为准):
| 错误码 | 错误描述 | HTTP 状态码 | 中文解释 |
|---|---|---|---|
| AccessDenied | 无操作权限 | 403 | 暂无操作权限 |
| IllegalArgument | 参数非法 | 400 | 用户提供参数错误 |
请求示例
Plain Text
1GET /v1/workspaces/{workspaceId}/ontologies/{ontology}/objectTypes/{apiName}/fullMetadata/published
2Host: databuilder.bd.baidubce.com
3Authorization: xxxxxx
响应示例
JSON
1{
2 "requestId": "fe3ab3e0-cdc7-46d9-ac66-67f718b6e48f",
3 "code": "SUCCESS",
4 "result": {
5 "objectType": {
6 "privileges": [
7 "EXECUTE",
8 "MODIFY",
9 "MANAGE",
10 "VIEW"
11 ],
12 "sourceFolderId": "folder_a07c_e27a97bb8b7c",
13 "sourceStructureDataId": "8c3fe1486c971909",
14 "sourceStructureDataFileId": "file_b921_021bc986a63a",
15 "sourceType": "none",
16 "icon": {
17 "name": "customer",
18 "color": "brand"
19 },
20 "name": "Employee",
21 "chineseName": "雇员",
22 "objectTypeId": "employee",
23 "description": "注释AA",
24 "status": "experimental",
25 "visibility": "normal",
26 "id": 2049336586859622400,
27 "apiName": "employee",
28 "rid": "7660dbf740bb4f4dbeee70e3d480f4a3",
29 "primaryKey": "id",
30 "primaryKeyApiName": "id",
31 "titleKey": "name",
32 "titleKeyApiName": "name",
33 "saveLocation": "file_aaa5_9e568f751140",
34 "propertyCount": 7,
35 "creatorId": "59379ca3dbfc4b798f7b8f32c4adec12",
36 "creatorName": "admin",
37 "modifyUserId": "59379ca3dbfc4b798f7b8f32c4adec12",
38 "modifyUserName": "admin",
39 "createdTime": "2026-04-29T11:54:46",
40 "updatedTime": "2026-05-25T15:25:39",
41 "publisherId": "59379ca3dbfc4b798f7b8f32c4adec12",
42 "publisherName": "admin",
43 "publishedTime": "2026-05-18T21:49:20",
44 "properties": [
45 {
46 "name": "id",
47 "apiName": "id",
48 "propertyId": "id",
49 "status": "experimental",
50 "visibility": "normal",
51 "indexStatus": "indexed",
52 "dataType": "INTEGER",
53 "description": "",
54 "nullable": false,
55 "defaultValue": "",
56 "constraints": null,
57 "sortable": true
58 },
59 {
60 "name": "name",
61 "apiName": "name",
62 "propertyId": "name",
63 "status": "experimental",
64 "visibility": "normal",
65 "indexStatus": "indexed",
66 "dataType": "STRING",
67 "description": "",
68 "nullable": false,
69 "defaultValue": "",
70 "constraints": {
71 "fullText": false,
72 "length": 65533
73 },
74 "sortable": false
75 },
76 {
77 "name": "department",
78 "apiName": "department",
79 "propertyId": "department",
80 "status": "experimental",
81 "visibility": "normal",
82 "indexStatus": "indexed",
83 "dataType": "STRING",
84 "description": "部门",
85 "nullable": true,
86 "defaultValue": "",
87 "constraints": {
88 "fullText": false,
89 "length": 65533
90 },
91 "sortable": false
92 },
93 {
94 "name": "salary",
95 "apiName": "salary",
96 "propertyId": "salary",
97 "status": "experimental",
98 "visibility": "normal",
99 "indexStatus": "indexed",
100 "dataType": "DECIMAL",
101 "description": "",
102 "nullable": true,
103 "defaultValue": "",
104 "constraints": {
105 "precision": 10,
106 "scale": 2
107 },
108 "sortable": false
109 },
110 {
111 "name": "age",
112 "apiName": "age",
113 "propertyId": "age",
114 "status": "experimental",
115 "visibility": "normal",
116 "indexStatus": "indexed",
117 "dataType": "INTEGER",
118 "description": "",
119 "nullable": true,
120 "defaultValue": "",
121 "constraints": null,
122 "sortable": false
123 },
124 {
125 "name": "managerId",
126 "apiName": "managerId",
127 "propertyId": "manager_id",
128 "status": "experimental",
129 "visibility": "normal",
130 "indexStatus": "indexed",
131 "dataType": "INTEGER",
132 "description": "",
133 "nullable": true,
134 "defaultValue": "",
135 "constraints": null,
136 "sortable": false
137 },
138 {
139 "name": "createdAt",
140 "apiName": "createdAt",
141 "propertyId": "created_at",
142 "status": "experimental",
143 "visibility": "normal",
144 "indexStatus": "indexed",
145 "dataType": "TIMESTAMP",
146 "description": "",
147 "nullable": true,
148 "defaultValue": "",
149 "constraints": null,
150 "sortable": false
151 }
152 ],
153 "derivedPropertyProperties": {},
154 "mappingProperties": {},
155 "embeddingProperties": {}
156 },
157 "linkTypes": [
158 {
159 "privileges": [
160 "EXECUTE",
161 "MODIFY",
162 "MANAGE",
163 "VIEW"
164 ],
165 "saveLocation": "file_b3be_bcd164a654b0",
166 "linkId": "employee-project",
167 "rid": "7cb5c84c5a8a426b82dae83c956d1706",
168 "status": "experimental",
169 "ontologyName": "whb_demo01",
170 "description": "雇员<->项目 \n一个项目对应一个 leader ID\n一个 lieaderid 对应多个项目\n注释",
171 "sourceChineseName": "雇员",
172 "sourceLinkApiName": "employeeToproject",
173 "sourceLinkVisibility": "normal",
174 "sourceObjectApiName": "employee",
175 "sourceCardinality": "one",
176 "sourceForeignKey": "id",
177 "sourceObjectIcon": {
178 "name": "customer",
179 "color": "brand"
180 },
181 "targetChineseName": "项目",
182 "targetLinkApiName": "projectToemployee",
183 "targetLinkVisibility": "normal",
184 "targetObjectApiName": "project",
185 "targetCardinality": "many",
186 "targetForeignKey": "leaderId",
187 "targetObjectIcon": {
188 "name": "customer",
189 "color": "brand"
190 },
191 "creatorId": "59379ca3dbfc4b798f7b8f32c4adec12",
192 "creatorName": "admin",
193 "modifyUserId": "59379ca3dbfc4b798f7b8f32c4adec12",
194 "modifyUserName": "admin",
195 "createdTime": "2026-05-06T15:16:57",
196 "updatedTime": "2026-05-25T15:25:41",
197 "publisherId": "59379ca3dbfc4b798f7b8f32c4adec12",
198 "publisherName": "admin",
199 "publishedTime": "2026-05-25T15:25:41"
200 }
201 ]
202 }
203}
result 中 objectType 详情字段与 linkTypes 元素结构待确认,以最新接口返回为准。
评价此篇文章
