接続管理API
Version 26.1.9516
Version 26.1.9516
接続管理API
接続管理API は次のアクションをサポートします。
以下のセクションでは、各アクションについて説明します。
すべての接続をリスト
次のコマンドは、CData Sync アプリケーションのすべての接続のリストを返します。
GET http://MyDomain.com:8019/api.rsc/connections(Name)
クエリパラメータ
| 名前 | 説明 |
|---|---|
| Name | 取得する接続の名前を指定します。 |
接続を作成
次のコマンドは、Sync アプリケーションで新しい接続を作成します。
POST http://MyDomain.com:8019/api.rsc/connections
ボディパラメータ
| 名前 | 説明 |
|---|---|
| Name(必須) | 作成する接続の名前を指定します。 |
| ProviderName | 接続するコネクタの名前を指定します(例:CData Salesforce connector)。 |
| ConnectionString | データ接続のための接続文字列を指定します。 |
リクエスト例
{
"Name": "MyNewConnection",
"ProviderName": "CData Salesforce",
"ConnectionString": "user=MyUser;Password=MyPassword;SecurityToken=MyToken"
}
接続を編集
次のコマンドは、既存の接続を編集します。
PUT http://MyDomain.com:8019/api.rsc/connections(Name)
Note:実行中のジョブで使用されている接続を編集することはできません。
クエリパラメータ
| 名前 | 説明 |
|---|---|
| Name(必須) | 編集する接続の名前を指定します。 |
ボディパラメータ
| 名前 | 説明 |
|---|---|
| ConnectionString | データ接続のための接続文字列を指定します。 |
リクエスト例
{
"ConnectionString": "user=MyUser;Password=MyPassword;SecurityToken=MyNewToken"
}
接続を削除
次のコマンドは、Sync アプリケーションから接続を削除します。
DELETE http://MyDomain.com:8019/api.rsc/connections(Name)
Note:実行中のジョブで使用されている接続を削除することはできません。
クエリパラメータ
| 名前 | 説明 |
|---|---|
| Name | 削除する接続の名前を指定します。 |
接続をテスト
次のコマンドは、以前に作成した接続をテストします。
POST http://MyDomain.com:8019/api.rsc/testConnection
Note:レスポンスは、成功メッセージかエラーメッセージのいずれかです。
ボディパラメータ
| 名前 | 説明 |
|---|---|
| ConnectionName | テストする接続の名前を指定します。 |
リクエスト例
{
"ConnectionName": "MyConnection"
}
テーブルをリスト
次のコマンドは、接続の利用可能なテーブルのリストを取得します。
POST http://MyDomain.com:8019/api.rsc/getConnectionTables
ボディパラメータ
| 名前 | 説明 |
|---|---|
| ConnectionName | テーブルを取得する接続の名前を指定します。 |
| TableOrView | リストする種類(テーブルまたはビュー)を指定します。このパラメータの値はTABLES、VIEWS、またはALL です。 |
| Schema | 特定のスキーマにテーブルを制限します。 |
| IncludeSchema | [Schema].[Table] 形式のテーブル名を持つスキーマを含めるかどうかを指定します。 |
| IncludeCatalog | [Catalog].[Schema].[Table]) 形式のテーブル名を持つカタログを含めるかどうかを指定します。 |
リクエスト例
{
"ConnectionName": "MyConnection",
"TableOrView": "ALL",
"IncludeSchema": "True"
}
カラムをリスト
次のコマンドは、テーブルの利用可能なカラムのリストを取得します。
POST http://MyDomain.com:8019/api.rsc/getConnectionTableColumns
ボディパラメータ
| 名前 | 説明 |
|---|---|
| ConnectionName | テーブルを取得する接続の名前を指定します。 |
| Table | カラムを取得するテーブルの名前を指定します。 |
リクエスト例
{
"ConnectionName": "MyConnection",
"Table": "Accounts"
}
OAuth 認証情報をリセット
The following command resets the stored OAuth credentials for an existing connection.
POST http://MyDomain.com:8019/api.rsc/resetOAuthCredentials
This command clears the stored OAuth tokens for the specified connection. The connection is disconnected after the reset, and any operations that require authentication (for example, testing or running jobs) fail until you re-authenticate.
You must have Update Connection permission to perform this action. Users without this permission receive an error message indicating that they do not have sufficient privileges.
Body Parameter
| Name | Description |
|---|---|
| ConnectionName (required) | Specifies the name of the connection for which the stored OAuth credentials are to be reset. |
Example Request
{
"ConnectionName": "MyConnection"
}