数据源字段管理 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¶
| 操作 | Http 方法 | 请求正文 | 路径变量 | 查询字符串参数 | 应答正文 | HTTP 响应正文 | 响应状态(异常) |
|---|---|---|---|---|---|---|---|
| Create | POST | Datasource field | Datasource field | 201 (Created) | 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request) | ||
| Read | GET | Datasource Field ID | Datasource field | 200 (OK) | 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) | ||
| Delete | DELETE | Datasource Field ID | Datasource field | 200 (OK) | 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) | ||
| Replace | PUT | Datasource field | Datasource Field ID | Datasource 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 Datasource 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 Datasource Fields | 200 (OK) | 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request) | ||
| Update | PATCH | Datasource field | Datasource Field ID | Datasource field | 200 (OK) | 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request) | |
| Bulk | POST | Datasource 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, updateInfo.user, updateInfo.date 和 updateInfo.origin"
请求中支持的字段¶
| Datasource Field | 支持的基数 | 支持的值 |
|---|---|---|
| id | - | string(必填) |
| oid | - | string |
| descriptions.[lingua] | - | string(一个必填) |
| fieldType | - | TEXT_MEASURE, NUMBER_MEASURE, DATE_MEASURE, LEAF_DIMENSION (必填) |
| encoded | - | true/false |
| 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_DESCRIPTION |
| timeDimensionRollup | - | SUM, LAST |
| conversionType | - | NONE, AVERAGE, PERIOD_AVERAGE, FINAL |
'descriptions' 字段由键值数组组成,其中键是某种语言的缩写形式,值是字符串
'values.dictionary.id' 字段仅接受与 AW 中现有字典对应的值
响应中的附加字段¶
| Datasource Field | 支持的值 |
|---|---|
| updateInfo.user | string |
| updateInfo.date | date |
| updateInfo.origin | INPUT_WEB |
请求示例¶
显示数据源中所有字段的列表
| 方法 | GET |
| URL | /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/123459/fields |
| 正文 | - |
| 响应示例 | [ { "id": "FLAG_ESECUZIONE_DISTRIBUITA", "oid": "ABYXJVVKAJSIXEI", "fieldType": "NUMBER_MEASURE", "values": null, "mandatory": false, "sortType": null, "sortPosition": null, "updateInfo": { "user": "USERT", "date": "2026-01-20T15:34:15.884+0000", "origin": "INPUT_WEB" }, "timeDimensionRollup": "SUM", "conversionType": "NONE", "descriptions": { "it": "FLAG_ESECUZIONE_DISTRIBUITA-it", "en": "FLAG_ESECUZIONE_DISTRIBUITA-en", "ja": null, "aa": null } }, { "id": "GDPR_CHECK_RESULT_DATE", "oid": "IBQKFPGJFESDSNO", "fieldType": "DATE_MEASURE", "values": null, "mandatory": false, "sortType": null, "sortPosition": null, "updateInfo": { "user": "USERT", "date": "2026-01-20T15:34:16.796+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "GDPR_CHECK_RESULT_DATE-it", "en": "GDPR_CHECK_RESULT_DATE-en", "ja": null, "aa": null } } ] |
显示数据源中的特定字段
| 方法 | GET |
| URL | /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/123459/fields/ID_OWS |
| 正文 | - |
| 响应示例 | { "id": "ID_OWS", "oid": "EYAWSUSMMTLMVKB", "fieldType": "TEXT_MEASURE", "values": null, "mandatory": false, "sortType": null, "sortPosition": null, "updateInfo": { "user": "CLAUDIO", "date": "2026-01-20T16:04:49.654+0000", "origin": "INPUT_WEB" }, "encoded": false, "descriptions": { "it": "ID_OWS-it", "en": "ID_OWS-en", "ja": null, "aa": null } } |
显示字段数量
| 显示字段数量 | |
| 方法 | GET |
| URL | /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/123459/fields-count |
| 正文 | - |
| 响应示例 | 12 |
创建新字段
| 方法 | POST |
| URL | /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/123459/fields |
| 正文 | { "id": "ID_OWS", "descriptions": { "it": "ID_OWS-it", "en": "ID_OWS-en" }, "fieldType": "TEXT_MEASURE", "encoded": true, "values": { "dictionary": { "id": "DICT", "queryCodeField": "ID_OWS", "queryDescriptionField": "ID_OWS", "outOfDictionaryAllowed": false }, "displayMode": "CODE" }, "sortType": "ASC", "sortPosition": "1" } |
| 响应示例 | { "id": "ID_OWS", "oid": "PWUYEVRSTIDYTNU", "fieldType": "TEXT_MEASURE", "values": { "dictionary": { "id": "DICT", "queryCodeField": "ID_OWS", "queryDescriptionField": "ID_OWS", "outOfDictionaryAllowed": false }, "displayMode": "CODE" }, "mandatory": false, "sortType": "ASC", "sortPosition": "1", "updateInfo": { "user": "USERT", "date": "2026-01-20T16:26:07.382+0000", "origin": "INPUT_WEB" }, "encoded": true, "descriptions": { "it": "ID_OWS-it", "en": "ID_OWS-en", "ja": null, "aa": null } } |
编辑字段
| 方法 | PATCH |
| URL | /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/123459/fields/ID_OWS |
| 正文 | { "id": "ID_OWS", "descriptions": { "it": "Modifica", "en": "Modified" }, "fieldType": "TEXT_MEASURE", "encoded": true, "values": { "dictionary": { "id": "DICT", "queryCodeField": "ID_OWS", "queryDescriptionField": "ID_OWS", "outOfDictionaryAllowed": false }, "displayMode": "CODE" }, "sortType": "ASC", "sortPosition": "1" } |
| 响应示例 | { "id": "ID_OWS", "oid": "PWUYEVRSTIDYTNU", "fieldType": "TEXT_MEASURE", "values": { "dictionary": { "id": "DICT", "queryCodeField": "ID_OWS", "queryDescriptionField": "ID_OWS", "outOfDictionaryAllowed": false }, "displayMode": "CODE" }, "mandatory": false, "sortType": "ASC", "sortPosition": "1", "updateInfo": { "user": "USERT", "date": "2026-01-20T16:26:07.382+0000", "origin": "INPUT_WEB" }, "encoded": true, "descriptions": { "it": "Modifica", "en": "Modified", "ja": null, "aa": null } } |
创建一个字段、编辑另一个字段并删除另一个字段
| 方法 | POST |
| URL | /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/123459/fields-bulk |
| 正文 | { "saveMode": "LOOSE", "post": [ { "id": "ID_OWS", "descriptions": { "it": "ID_OWS-it", "en": "ID_OWS-en" }, "fieldType": "TEXT_MEASURE", "encoded": true, "timeDimensionRollup": "SUM", "conversionType": "AVERAGE" } ], "delete": [ { "id": "GDPR_CHECK_RESULT_DATE" } ], "patch": [ { "key": { "id": "DESC_OWS1" }, "data": { "descriptions": { "it": "DESC_OWS0-italiano", "en": "DESC_OWS0-english" }, "fieldType": "TEXT_MEASURE", "encoded": true, "timeDimensionRollup": "SUM", "conversionType": "AVERAGE" } } ] } |
| 响应示例 | { "code": "SUCCESS" } |