新增資料來源串連資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求文法
POST HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| AddModel |
string |
是 |
可參考 QuickBi 資料來源介面的新增資料來源的邏輯,在點擊【串連測試】時會觸發 restapi/datasource/detect 介面,類比該介面的傳參負載,傳入相同模型的 json,外加一個在在 bi 中存在的 userId 和空間 ID 即可。 重要 有小部分資料來源不支援,若參數和測試介面的傳參負載相同,但依舊添加不成功,則表示當前資料來源類型不支援通過該 openapi 建立 重要 encode 欄位請不要傳參,目前 openapi 建立資料來源不支援加密模式,涉及上傳檔案類型的認證也不支援 |
{ "userId": "235345xxxxx24336", "workspaceId": "235345xxxxx24336", "dsType": "postgresql", "config": { "category": "local", "customDriverId": null, "ssl": false, "uploadFile": true, "sslConfig": null }, "showName": "test", "address": "test", "port": "5432", "instance": "postgres", "schema": "public", "userName": "13****34", "password": "12****425", } |
以下是部分資料來源添加的請求參數 demo:
adb
{ "showName": "testadb3.0", "address": "", "port": 3306, "dsType": "adb", "username": "xxx", "password": "xxx", "schema": null, "instance": "test", "workspaceId": "xxx", "userId": "xxx" }maxcompute
{ "showName": "maxcompute", "address": "http://service.xxx.xxx.com/api", "dsType": "odps", "username": "accessId", "password": "accessKey", "schema": "schema", "project": "project name", "config": {"category": "cloud", "customDriverId": null, "mcqa": true, "uploadFile": true}, "workspaceId": "xxx", "userId": "xxx" }hive
{ "showName": "test", "address": "192.168.0.1", "port": "10000", "dsType": "hive", "instance": "hive", "userName": "xxx", "password": "xxx", "config": { "category": "local" }, "workspaceId":"xxx", "userId":"xxx" }gbase
{ "showName": "test", "address": "192.168.0.1", "port": "5258", "dsType": "gbase", "instance": "quickbi_test", "username": "root", "password": "root", "config": { "category": "local" }, "workspaceId": "xxx", "userId": "xxx" }rds-mysql
{ "showName":"mysql", "address":"", "port": 3306, "dsType":"mysql", "username":"xxx", "password":"xxx", "schema": null, "instance":"test", "workspaceId":"xxx", "userId":"xxx" }adb-mysql(vpc)
{ "dsType": "adb", "config": { "category": "cloud", "resource": "adb", "uploadFile": true }, "engineType": "adb", "showName": "mysql", "address": "amvxxxxxxxxxs.com", "port": "3306", "instance": "quxxxxxxxest", "userName": "quixxxxxxxxxxxxst", "password": "Taxxxxxxxx34", "accessId": "LTAxxxxxxxxxxx453bo", "accessKey": "Jy9xxxxxxxxxxxxZ96QqtBa", "instanceId": "amxxxxxxxxxxxl0", "region": "cn-hangzhou", "userId": "ed3xxxxxxxxxxxxxx697b8664", "workspaceId": "086xxxxxxxxxxxxxxxxxcd9a62236c" }hologres
{ "showName": "Hologres", "address": "hgprecn-cn-xxxxxx-cn-shanghai.hologres.aliyuncs.com", "instance": "quickbi_test", "schema": "publick", "port": "80", "dsType": "hologres", "userId": "fec0741xxxxx061e6a951a2", "config": { "initialSql": "Set timezone = '-10'" }, "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "username": "LTAI4GDxxxxxLEpsdxkW9", "password": "nVvUqwPUzxxxxxA3sCqockS7", "workspaceId":"xxx", "userId":"xxx" }impala-ldap
{ "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "userId": "fec0741xxxxx061e6a951a2", "dsType": "impala", "config": { "category": "local", "resource": "ecs", "ssl": false }, "showName": "impala-ldap", "address": "xx.xx.xx.xx", "port": "xxxx", "instance": "default", "dsVersion": "3.x", "username": "xxxxx", "password": "xxxxxxxxx", "instanceId": "i-uf6fxxxxxbt3eh6lb", "noSasl": true, "workspaceId":"xxx", "userId":"xxx" }impala
{ "showName": "impala-test", "address": "192.168.0.1", "port": "21050", "dsType": "impala", "dsVersion": "3.x", "instance": "test", "userName": "xxx", "password": "xxx", "config": { "category": "local", "ssh" : { "host": "192.168.0.2", "username": "xxxx", "password": "xxx", "port": "22" } }, "workspaceId":"xxx", "userId":"xxx" }dataphin-Dataphin_odps
{ "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "userId": "fec0741xxxxx061e6a951a2", "dsType": "dataphin_odps", "address": "f6c64214dc27400xxxxxx-cn-shanghai.alicloudapi.com", "username": "20xxx18", "password": "33paqqexxxxg07qzj28", "instance": "test_ds", "showName": "1_1_dataphin_odps", "config": { "category": "application", "engineType": "odps" } }dataphin-Dataphin_hive
{ "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "userId": "fec0741xxxxx061e6a951a2", "dsType": "dataphin_hive", "address": "f6c64214dc27400xxxxxx-cn-shanghai.alicloudapi.com", "username": "20xxx18", "password": "33paqqexxxxg07qzj28", "instance": "test_ds", "showName": "1_1_dataphin_odps", "config": { "category": "application", "engineType": "hive" } }DataPhin_JDBC_public
{ "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "userId": "fec0741xxxxx061e6a951a2", "dsType": "odps", "config": { "engineType": "hive", "category": "application", "dataphinConfig": { "tenantId": "305xxx306", "delegationUid": "@dataphin", "accountType": "ACCOUNT_NAME", "authMode": "DELEGATION" }, "resource": "clb", "initialSql": "Set timezone = '-10'" }, "showName": "DataPhin_JDBC_public", "connectType": "dataphin_v2", "address": "47.xxx.xxx.124", "port": "80", "project": "bbb", "instance": "fxxxk_test", "username": "OIYtGZxxx7zmRpgQpB", "password": "lDbQDnUuxxxxxGsxOd1", "parentDsType": "dataphin", "accessId": "[3eo[x>>", "accessKey": "bHipbB>>", "instanceId": "nnnn", "region": "cn-qingdao" }Dataphin-jdbc-private
{ "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "userId": "fec0741xxxxx061e6a951a2", "dsType": "dataphin_v2", "config": { "engineType": "hive", "category": "application", "dataphinConfig": { "tenantId": "30xxxx6", "authMode": "SIMPLE" }, "resource": "clb", "initialSql": "Set timezone = '-10'" }, "showName": "Dataphin-jdbc-private", "connectType": "dataphin_v2", "address": "47.xxx.x4x.124", "port": "80", "project": "bbb", "instance": "fxxx_test", "username": "kItowxxxxxxx2ZJr0", "password": "kSlPkmS1xxxxxx61zd4SDX", "parentDsType": "dataphin", "accessId": "[3eo[x>>", "accessKey": "bHipbB>>", "instanceId": "nnnn", "region": "cn-qingdao" }SQL Server(vpc)
{ "dsType": "sqlserver", "config": { "category": "local", "resource": "ecs", "uploadFile": true }, "showName": "sqlserver", "address": "rm-bp11xxxxxxncs.com", "port": "1433", "instance": "quixxxxxest", "schema": "dbo", "userName": "quicxxxtest", "password": "Taoxxxx34", "accessId": "LTAI5xxxxxxxKLjjj", "accessKey": "rOYdkxxxxxxxSeel1", "instanceId": "rm-xxxxx502ndmq", "region": "cn-huhehaote", "userId": "ed33389xxxx6697b8664", "workspaceId": "08634xxxx4cd9a62236c" }
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
D787E1********DF8D885 |
| Result |
string |
資料來源 ID。 |
472b241b-c651-****-****-ee719d6faf45 |
| Success |
boolean |
是否請求成功。取值範圍:
|
true |
樣本
正常返回樣本
JSON格式
{
"RequestId": "D787E1********DF8D885",
"Result": "472b241b-c651-****-****-ee719d6faf45",
"Success": true
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Internal.System.Error | An internal system error occurred. | 系統內部異常。 |
| 400 | Invalid.Parameter.Error | The parameter is invalid:%s. | 無效參數%s。 |
| 400 | User.NotIn.Workspace | The user is not a member of the group workspace. | 該使用者不在群空間中。 |
| 400 | Invalid.Workspace | The workspace is not owned by the organization. | 該空間不在組織內。 |
| 400 | Name.RegularExpression.Error | Name format validation failed. | 名稱格式驗證失敗。 |
| 400 | NameExceeded.MaxLength.Error | The name cannot exceed %s characters in length. | 名稱長度不能超過%s個字元。 |
| 400 | Database.PortInvalid.Error | The database port is invalid. | 資料庫連接埠無效。 |
| 400 | Xengnie.TaskExecute.Error | Fail to execute task %s. | 任務執行失敗 %s。 |
| 400 | VpcInstance.Info.Error | Get vpc instance info error.please check vpc config %s. | 擷取VPC執行個體資訊錯誤。請檢查VPC配置 %s。 |
| 400 | VpcInstance.Info.EmptyError | Not found instance. please check vpc config and authorization %s. | 未找到執行個體。請檢查VPC配置和許可權 %s。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。