跳转至

数据源管理 API

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

API 标题: AIH Datasources 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}/datasources

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

请求中支持的字段

Datasource 字段 支持的基数 支持的值
id - string(必填)
oid - string
descriptions.[lingua] - string(一个必填)
customQuery.oracle - string
customQuery.sqlServer - string
customQuery.hana - string
customQuery.postgres - string
customQuery.others - string
sort 无限制 string 元组
sort.field - string
sort.sortPosition - integer
sort.sortIndex - ASC, DESC
connection - string

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

响应中的附加字段

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

请求示例

显示所有数据源的列表

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources
正文 -
响应示例 [ { "id": "133123", "oid": "OFWBDBIRCSYXLVC", "sort": [], "customQuery": { "sqlServer": null, "hana": null, "postgres": "select id_ows from ows", "others": null, "oracle": null }, "connection": "Current", "updateInfo": { "user": "USERT", "date": "2026-01-20T15:01:54.875+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "123123-it", "en": "123123-en", "ja": null, "aa": null, "zh": null } }, { "id": "133125", "oid": "YHIZSQGRMUZTHSH", "sort": [], "customQuery": { "sqlServer": null, "hana": null, "postgres": "select id_ows from ows", "others": null, "oracle": null }, "connection": "Current", "updateInfo": { "user": "USERT", "date": "2026-01-20T15:01:56.608+0000", "origin": "INPUT_WEB" }, "descriptions": { "it": "123125-it", "en": "123125-en", "ja": null, "aa": null, "zh": null } } ]

显示特定数据源

方法 GET
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/123123
正文 -
响应示例 { "id": "123123", "oid": "OWHYWGRCDKWSAUY", "sort": [], "customQuery": { "sqlServer": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "hana": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "postgres": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "others": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "oracle": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA" }, "connection": "Current", "updateInfo": { "user": "USERT", "date": "2026-01-20T13:51:46.908+0000", "origin": "INPUT_WEB" }, "descriptions": { "en": "Update Test of Datasource", "it": "Aggiornamento Test di Datasource", "ja": null, "aa": null, "zh": null, "sq": null, "hy": null, "be": null, "ar": null, "am": null, "as": null } }

显示数据源数量

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

创建新数据源

方法 POST
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources
正文 { "id": "123123", "descriptions": { "it": "Aggiornamento Test di Datasource", "en": "Update Test of Datasource" }, "customQuery": { "sqlServer": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "hana": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "postgres": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "others": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "oracle": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA" }, "connection": "Current" }
响应示例 { "id": "123123", "oid": "OWHYWGRCDKWSAUY", "sort": [], "customQuery": { "sqlServer": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "hana": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "postgres": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "others": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "oracle": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA" }, "connection": "Current", "updateInfo": { "user": "USERT", "date": "2026-01-20T13:51:46.908+0000", "origin": "INPUT_WEB" }, "descriptions": { "en": "Update Test of Datasource", "it": "Aggiornamento Test di Datasource", "ja": null, "aa": null, "zh": null, "sq": null, "hy": null, "be": null, "ar": null, "am": null, "as": null } }

修改数据源

方法 PATCH
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources/SQL
正文 { "id": "123123", "descriptions": { "it": "Modificato", "en": "Modified" }, "customQuery": { "sqlServer": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "hana": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "postgres": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "others": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "oracle": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA" }, "connection": "Current" }
响应示例 { "id": "123123", "oid": "OWHYWGRCDKWSAUR", "sort": [], "customQuery": { "sqlServer": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "hana": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "postgres": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "others": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "oracle": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA" }, "connection": "Current", "updateInfo": { "user": "USERT", "date": "2026-01-20T13:51:46.908+0000", "origin": "INPUT_WEB" }, "descriptions": { "en": "Modified", "it": "Modificato", "ja": null, "aa": null, "zh": null, "sq": null, "hy": null, "be": null, "ar": null, "am": null, "as": null } }

创建一个数据源、编辑另一个数据源并删除另一个数据源

方法 POST
URL /api/aih/datamodel/v1/{dbID}/workspaces/{awID}/datasources-bulk
正文 { "saveMode": "LOOSE", "post": [ { "id": "100012", "descriptions": { "en": "bulk-post-en", "it": "bulk-post-it" }, "customQuery": { "sqlServer": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "hana": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "postgres": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "others": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "oracle": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA" }, "connection": "Current" } ], "patch": [ { "key": { "id": "EXISTS" }, "data": { "sort": [], "descriptions": { "it": "EXISTS-it-patch-updated", "en": "EXISTS-en-patch-updated" }, "customQuery": { "sqlServer": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "hana": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "postgres": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "others": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA", "oracle": "SELECT COD_AZIENDA as AZ3, COD_AZIENDA as AZ1, COD_AZIENDA as AZ2 FROM AZIENDA" }, "connection": "Current" } } ], "delete": [ { "id": "EXIST1" } ] }
响应示例 { "code": "SUCCESS" }