データソースを追加します。
今すぐお試しください
テスト
RAM 認証
リクエスト構文
POST HTTP/1.1
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| AddModel |
string |
必須 |
リクエストペイロードを作成するには、Quick BI コンソールでデータソースの追加プロセスを再現してください。[Add Data Source] ページで [Test Connection] をクリックすると、restapi/datasource/detect API が呼び出されます。この API 呼び出しのペイロードをテンプレートとして使用し、指定した userId と workspaceId が Quick BI 環境に存在することを確認してください。 重要 一部のデータソースタイプはサポートされていません。パラメーターがテスト API のリクエストペイロードと一致しているにもかかわらずリクエストが失敗する場合、そのデータソースタイプはこの OpenAPI でサポートされていない可能性があります。 重要 リクエストに encode フィールドを含めないでください。この API は、暗号化モードでのデータソースの作成や、ファイルのアップロードが必要な認証方式をサポートしていません。 |
{ "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", } |
データソース別のリクエストペイロード例:
AnalyticDB
{ "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 for MySQL
{ "showName":"mysql", "address":"", "port": 3306, "dsType":"mysql", "username":"xxx", "password":"xxx", "schema": null, "instance":"test", "workspaceId":"xxx", "userId":"xxx" }AnalyticDB for 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": "public", "port": "80", "dsType": "hologres", "userId": "fec0741xxxxx061e6a951a2", "config": { "initialSql": "Set timezone = '-10'" }, "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "username": "LTAI4GDxxxxxLEpsdxkW9", "password": "nVvUqwPUzxxxxxA3sCqockS7" }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 }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" } } }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 (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_hive", "config": { "category": "application", "engineType": "hive" } }Dataphin (JDBC, Public)
{ "workspaceId": "87f73904-xxxx-xxxx-b1ee-5a3a03a8eb45", "userId": "fec0741xxxxx061e6a951a2", "dsType": "dataphin_v2", "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 |
レスポンスのスキーマです。 |
||
| RequestId |
string |
リクエスト ID です。 |
D787E1********DF8D885 |
| Result |
string |
データソースの ID です。 |
472b241b-c651-****-****-ee719d6faf45 |
| Success |
boolean |
リクエストが成功したかどうかを示します。有効な値:
|
true |
例
成功レスポンス
JSONJSON
{
"RequestId": "D787E1********DF8D885",
"Result": "472b241b-c651-****-****-ee719d6faf45",
"Success": true
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。