跳转至

数据集字段管理 API

此 API 支持提取信息,以及在 Tagetik 应用程序数据集中创建、修改和删除字段。

API 标题: AIH Dataset swagger openapi 3.0.3
描述: 用于 AIH 数据库应用程序中数据集字段管理的 API
版本: 1.000
身份验证: OAuth2、API Key、JWT、Basic Auth
基础 URL: https://tenantxyz.api.saastagetik.com/basic https://tenantxyz.api.saastagetik.com/jwt https://tenantxyz.api.saastagetik.com/apikey https://tenantxyz.api.saastagetik.com/oauth2

前提条件

请求格式:JSON

响应格式:JSON

共享标头

  • Content-Type:application/json
  • Authorisation:Bearer

URL

/api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasets/{datasetID}/fields

操作 Http 方法 请求正文 路径变量 查询字符串参数 应答正文 HTTP 响应正文 响应状态(异常)
Create POST Dataset Field Dataset Field 201 (Created) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Read GET Dataset Field ID Dataset Field 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised)
Delete DELETE Dataset Field ID Dataset Field 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised)
Replace PUT Dataset Field Dataset Field ID Dataset Field 200 (OK) 201 (Created) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Search GET filter sort skip take (可选参数) List of Dataset Fields 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Search Size GET filter sort skip take (可选参数) Quantity of Dataset Fields 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Update PATCH Dataset Field Dataset Field ID Dataset Field 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Bulk POST Dataset Field(s) Success 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)

"filter" 接受字段 "id, descriptions.[language], fieldType, formatType, personalDataProtection, encoded, timeDimensionRollup, conversionType, dimensionType, hierarchyId, values.dictionary.id, mandatory, key, editability, referenceType, updateInfo.user, updateInfo.date 和 updateInfo.origin

请求中支持的字段

Dataset Field 支持的基数 支持的值
id - string(必填)
oid - string
descriptions.[lingua] - string(一个必填)
fieldType - TEXT_MEASURE, NUMBER_MEASURE, DATE_MEASURE, COMMENTS_AND_ATTACHMENTS_MEASURE, LEAF_DIMENSION, HIERARCHY_NODE_DIMENSION, HIERARCHY_LEVEL_DIMENSION (必填)
position - integer
mandatory - true/false
key - true/false
editable - EDITABLE, EDITABLE_ONLY_ON_NEW_ROWS, READ_ONLY
referenceType - ATTRIBUTE, CONDITION, LEVEL, FILTER
sortPosition - string
sortType - string
values.dictionary.id - string
values.dictionary.queryCodeField - string
values.dictionary.queryDescriptionField string
values.dictionary.outOfDictionaryAllowed - string
values.displayMode - CODE, DESCRIPTION, CODE_AND_DESCRIPTIO
dimensionType - string
hierarchyId - string

'descriptions' 字段由键值数组组成,其中键是某种语言的缩写形式,值是字符串

'index' 和 'sort' 字段仅接受与数据集自身字段对应的值

'values.dictionary.id' 字段仅接受与 AW 中现有字典对应的值

响应中的附加字段

Dataset Field 支持的值
status IDLE, IN_USE, OFFLINE, OFFLINE_IN_PROGRESS, UPDATING, VERSION_UPGRADING, INCONSISTENT
updateInfo.user string
updateInfo.date date
updateInfo.origin INPUT_WEB

请求示例

显示数据集中所有字段的列表

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasets/123459/fields
正文 -
响应示例 [ { "id": "AAAAA", "oid": "IVQFZGZDRRVVVIK", "fieldType": "TEXT_MEASURE", "values": { "dictionary": { "id": null, "queryCodeField": null, "queryDescriptionField": null, "outOfDictionaryAllowed": false }, "displayMode": "CODE" }, "mandatory": false, "key": false, "position": 36, "editability": "EDITABLE", "referenceType": null, "sortType": "ASC", "sortPosition": null, "updateInfo": { "user": "USER1", "date": "2025-10-28T15:52:14.563+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "AAAA", "en": null, "ja": null, "aa": null }, "formatType": "PLAIN", "personalDataProtection": false, "encoded": false, "length": 255, "defaultValue": null, "maxDictMultiselectable": null }, { "id": "DIMENSION", "oid": "SLJMNDXDZJFBFSQ", "fieldType": "LEAF_DIMENSION", "values": { "dictionary": { "id": null, "queryCodeField": null, "queryDescriptionField": null, "outOfDictionaryAllowed": false }, "displayMode": "CODE" }, "mandatory": false, "key": false, "position": 31, "editability": "EDITABLE", "referenceType": null, "sortType": "DESC", "sortPosition": "10", "updateInfo": { "user": "USER1", "date": "2025-08-28T13:18:21.761+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "ADDEL", "en": "ADDEL", "ja": null, "aa": null }, "dimensionType": "ADDEL" } ]

显示数据集中的特定字段

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasets/123459/fields/AAAAA
正文 -
响应示例 { "id": "AAAAA", "oid": "IVQFZGZDRRVVVIK", "fieldType": "TEXT_MEASURE", "values": { "dictionary": { "id": null, "queryCodeField": null, "queryDescriptionField": null, "outOfDictionaryAllowed": false }, "displayMode": "CODE" }, "mandatory": false, "key": false, "position": 36, "editability": "EDITABLE", "referenceType": null, "sortType": "ASC", "sortPosition": null, "updateInfo": { "user": "USER1", "date": "2025-10-28T15:52:14.563+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "AAAA", "en": null, "ja": null, "aa": null }, "formatType": "PLAIN", "personalDataProtection": false, "encoded": false, "length": 255, "defaultValue": null, "maxDictMultiselectable": null }

显示字段数量

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasets/123459/fields-count
正文 -
响应示例 12

创建新字段

方法 POST
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasets/123459/fields
正文 { "id": "TESTF", "descriptions": { "it": "RFTEST-it", "en": "RFTEST-en" }, "fieldType": "TEXT_MEASURE", "position": 0, "sortType": "ASC", "sortPosition": "1" }
响应示例 { "id": "TESTF", "oid": "MDQXDUARCMZIYBX", "fieldType": "TEXT_MEASURE", "values": { "dictionary": { "id": null, "queryCodeField": null, "queryDescriptionField": null, "outOfDictionaryAllowed": false }, "displayMode": null }, "mandatory": false, "key": false, "position": 0, "editability": "EDITABLE", "referenceType": null, "sortType": "ASC", "sortPosition": "1", "updateInfo": { "user": "USERT", "date": "2026-01-16T16:22:30.339+0000", "origin": "INPUT_WEB" }, "descriptions": { "en": "CREATED", "it": "CREATO", "ja": null, "aa": null }, "formatType": "PLAIN", "personalDataProtection": false, "encoded": false, "length": 255, "defaultValue": null, "maxDictMultiselectable": null }

编辑字段

方法 PATCH
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasets/123459/fields/TESTF
正文 { "id": "TESTF", "descriptions": { "it": "MODIFIED", "en": "MODIFICATO" }, "position": 0, "sortType": "ASC", "sortPosition": "1" }
响应示例 { "id": "TESTF", "oid": "MDQXDUARCMZIYBX", "fieldType": "TEXT_MEASURE", "values": { "dictionary": { "id": null, "queryCodeField": null, "queryDescriptionField": null, "outOfDictionaryAllowed": false }, "displayMode": null }, "mandatory": false, "key": false, "position": 0, "editability": "EDITABLE", "referenceType": null, "sortType": "ASC", "sortPosition": "1", "updateInfo": { "user": "USERT", "date": "2026-01-16T16:22:30.339+0000", "origin": "INPUT_WEB" }, "descriptions": { "en": "MODIFIED", "it": "MODIFICATO", "ja": null, "aa": null }, "formatType": "PLAIN", "personalDataProtection": false, "encoded": false, "length": 255, "defaultValue": null, "maxDictMultiselectable": null }

创建一个字段、编辑另一个字段并删除另一个字段

方法 POST
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasets/123459/fields-bulk
正文 { "saveMode": "LOOSE", "post": [ { "id": "DFIELD4", "descriptions": { "it": "Dataset Field post created", "en": "Field Dataset post created" }, "fieldType": "TEXT_MEASURE" }, { "id": "DFIELD5", "descriptions": { "it": "Dataset Field post created", "en": "Field Dataset post created" }, "fieldType": "TEXT_MEASURE" } ], "patch": [ { "key": { "id": "DFIELD1" }, "data": { "descriptions": { "it": "UpdatePatchBulk", "en": "PatchUpdateBulk" }, "fieldType": "TEXT_MEASURE" } } ], "delete": [ { "id": "DFIELD6" } ] }
响应示例 { "code": "SUCCESS" }