Menambahkan sumber data.
Coba sekarang
Test
RAM authorization
Sintaks permintaan
POST HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| AddModel |
string |
Yes |
Untuk menyusun muatan permintaan, Anda dapat mereplikasi proses penambahan sumber data di Konsol Quick BI. Di halaman Tambah Sumber Data, saat Anda mengklik Uji Koneksi, API restapi/datasource/detect akan dipanggil. Gunakan muatan panggilan API ini sebagai templat, pastikan userId dan workspaceId yang diberikan ada di lingkungan Quick BI Anda. Penting Beberapa tipe sumber data tidak didukung. Jika parameter Anda cocok dengan muatan permintaan API uji tetapi permintaan tetap gagal, tipe sumber data tersebut kemungkinan tidak didukung oleh OpenAPI ini. Penting Jangan sertakan bidang encode di permintaan Anda. API ini tidak mendukung pembuatan sumber data dalam mode terenkripsi atau penggunaan metode otentikasi yang memerlukan unggahan file. |
{ "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", } |
Contoh muatan permintaan untuk berbagai sumber data:.
AnalyticDB```json { "showName": "testadb3.0", "address": "", "port": 3306, "dsType": "adb", "username": "xxx", "password": "xxx", "schema": null, "instance": "test", "workspaceId": "xxx", "userId": "xxx" }
MaxCompute```json {
"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```json { "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```json { "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 for MySQL```json { "showName":"mysql",
"address":"",
"port": 3306,
"dsType":"mysql",
"username":"xxx",
"password":"xxx",
"schema": null,
"instance":"test",
"workspaceId":"xxx",
"userId":"xxx"
}AnalyticDB for MySQL (VPC)```json { "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```json { "showName": "Hologres",
"address": "hgprecn-cn-xxxxxx-cn-shanghai.hologres.aliyuncs.com",
"instance": "quickbi_test",
"schema": "public",
"port": "80",
"dsType": "hologres",
"userId": "fec0741xxxxx061e6a951a2",
"config": {
"initialSql": "Set timezone = '-10'"
},
"workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45",
"username": "LTAI4GDxxxxxLEpsdxkW9",
"password": "nVvUqwPUzxxxxxA3sCqockS7" }Impala (LDAP)```json {
"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 }Impala```json { "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"
}
} }Dataphin (ODPS)```json {
"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 (Hive)```json {
"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)```json {
"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)```json {
"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)```json { "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" }
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The ID of the request. |
D787E1********DF8D885 |
| Result |
string |
The ID of the data source. |
472b241b-c651-****-****-ee719d6faf45 |
| Success |
boolean |
Indicates whether the request succeeded. Valid values:
|
true |
Contoh
Respons sukses
JSONformat
{
"RequestId": "D787E1********DF8D885",
"Result": "472b241b-c651-****-****-ee719d6faf45",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Internal.System.Error | An internal system error occurred. | |
| 400 | Invalid.Parameter.Error | The parameter is invalid:%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. | |
| 400 | Database.PortInvalid.Error | The database port is invalid. | |
| 400 | Xengnie.TaskExecute.Error | Fail to execute task %s. | |
| 400 | VpcInstance.Info.Error | Get vpc instance info error.please check vpc config %s. | |
| 400 | VpcInstance.Info.EmptyError | Not found instance. please check vpc config and authorization %s. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.