跳转至

字典管理 API

此 API 支持提取信息,以及创建、修改和删除 Tagetik 应用程序的字典。

API 标题: AIH Dictionaries 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}/dictionaries

操作 Http 方法 请求正文 路径变量 查询字符串参数 应答正文 HTTP 响应正文 响应状态(异常)
Create POST Dictionary Dictionary 201 (Created) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Read GET Dictionary ID Dictionary 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised)
Delete DELETE Dictionary ID Dictionary 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised)
Replace PUT Dictionary Dictionary ID Dictionary 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 Dictionaries 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 Dictionaries 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Update PATCH Dictionary Dictionary ID Dictionary 200 (OK) 405 (Method not permitted) 404 (Not found) 403 (Access to unauthorised resource) 401 (Unauthorised) 400 (Invalid request)
Bulk POST Dictionary(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], updateInfo.user, updateInfo.date 和 updateInfo.origin"

请求中支持的字段

Dictionary 字段 支持的基数 支持的值
id - string(必填)
oid - string
descriptions.[lingua] - string(一个必填)
queryBody.oracle - string
queryBody.sqlServer - string
queryBody.hana - string
queryBody.postgres - string
queryBody.others - string
personalDataManagement 无限制 string
connection - string

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

响应中的附加字段

Dictionary 字段 支持的值
updateInfo.user string
updateInfo.date date
updateInfo.origin INPUT_WEB

请求示例

显示所有字典的列表

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/dictionaries
正文 -
响应示例 [ { "id": "DICT", "oid": "MDSFDXVAAETKQNC", "queryBody": { "oracle": null, "sqlServer": null, "hana": null, "postgres": "select * from TABLENAME", "others": null }, "personalDataManagement": [], "connection": "DATABASE_CONNECTION", "updateInfo": { "user": "USERT", "date": "2025-04-03T13:44:42.279+0000", "origin": "MDM" }, "descriptions": { "it": "API_DIC", "en": null, "ja": null, "aa": null } }, { "id": "000012", "oid": "XMIOCXOJUXYCAPQ", "queryBody": { "oracle": null, "sqlServer": null, "hana": null, "postgres": "select COLUMN from TABLENAME", "others": null }, "personalDataManagement": [], "connection": "Current", "updateInfo": { "user": "USERT", "date": "2025-04-03T13:44:38.440+0000", "origin": "MDM" }, "descriptions": { "it": "API_DIC", "en": null, "ja": null, "aa": null } } ]

显示特定字典

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/dictionaries/DICT
请求体 -
响应示例 { "id": "DICT", "queryBody": { "oracle": null, "sqlServer": null, "hana": null, "postgres": "select COLUMN from TABLENAME", "others": null }, "personalDataManagement": [], "connection": null, "updateInfo": { "user": "USERT", "date": "2024-09-03T09:52:03.801+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "Dizionario", "en": "Dictionary", "ja": null, "aa": null } }

显示字典的数量

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/dictionaries-count
请求体 -
响应示例 12

创建新字典

创建新字典
方法 POST
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/dictionaries
请求体 { "id": "NEW", "queryBody": { "oracle": null, "sqlServer": "select * from TABLE", "hana": null, "postgres": null, "others": null }, "personalDataManagement": [], "connection": "SQL_DATABASE", "descriptions": { "it": "Sequel", "en": null, "ja": null, "aa": null } }
响应示例 { "id": "NEW", "oid": "WCIREDPBEPXVCQD", "queryBody": { "oracle": null, "sqlServer": "select * from TABLE", "hana": null, "postgres": null, "others": null }, "personalDataManagement": [], "connection": "SQL_DATABASE", "updateInfo": { "user": "USERT", "date": "2026-01-19T16:25:28.442+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "Sequel", "en": null, "ja": null, "aa": null } }

编辑字典

方法 PATCH
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/dictionaries/SQL
请求体 { "id": "SQL", "queryBody": { "oracle": null, "secured-sqlServer": "select ELEM from TABLE", "hana": null, "postgres": null, "others": null }, "personalDataManagement": [], "connection": "SQL_DATABASE", "descriptions": { "it": "Sequel", "en": null, "ja": null, "aa": null } }
响应示例 { "id": "SQL", "oid": "JQKNFEQWHBIRVSD", "queryBody": { "oracle": null, "sqlServer": "select ELEM from TABLE", "hana": null, "postgres": null, "others": null }, "personalDataManagement": [], "connection": "SQL_DATABASE", "updateInfo": { "user": "USERT", "date": "2026-01-19T16:27:01.709+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "Sequel", "en": null, "ja": null, "aa": null } }

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

方法 POST
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/dictionaries-bulk
请求体 { "saveMode": "LOOSE", "post": [ { "id": "POSTBU", "queryBody": { "oracle": null, "sqlServer": null, "hana": null, "postgres": "select * from TABLE2", "others": null }, "personalDataManagement": [], "connection": null, "descriptions": { "it": "Bulk Post", "en": "Post Bulk", "ja": null, "aa": null } } ], "patch": [ { "key": { "id": "PATCHB" }, "data": { "queryBody": { "oracle": null, "sqlServer": null, "hana": null, "postgres": "select * from TABLE", "others": null }, "personalDataManagement": [], "connection": null, "descriptions": { "it": "Bulk Patch Edited", "en": "Edited Patch Bulk", "ja": null, "aa": null } } } ], "delete": [ { "id": "DELETB" } ] }
响应示例 { "code": "SUCCESS" }