APIクライアント
以下のエンドポイントを使用すると、Developer API経由でAPIクライアントを管理できます。 これにより、新しいチームのオンボーディング時に新しいAPIクライアントをプログラムで作成したり、すべてのAPIクライアントのAPIトークンを定期的にローテーションしたりできます。
レート制限
APIクライアントリソースには、次のレート制限があります:
| タイプ | リソース | 制限 |
|---|---|---|
| すべて | すべてのAPIクライアントエンドポイント | 1分あたり60リクエスト |
クイックリファレンス
| タイプ | リソース | 説明 |
|---|---|---|
| GET | /api/developer_api_clients | Developer APIクライアントの一覧を表示します。 |
| POST | /api/developer_api_clients | Developer APIクライアントを作成します。 |
| GET | /api/developer_api_clients/:id | IDによるDeveloper APIクライアントを取得します。 |
| PUT | /api/developer_api_clients/:id | Developer APIクライアントを更新します。 |
| DELETE | /api/developer_api_clients/:id | Developer APIクライアントを削除します。 |
| POST | /api/developer_api_clients/:id/regenerate | Developer APIクライアントトークンを再生成します。 |
| GET | /api/developer_api_client_roles | Developer APIクライアントロールの一覧を表示します。 |
Developer APIクライアントの一覧
すべてのDeveloper APIクライアントを一覧表示します。
GET /api/developer_api_clientsクエリパラメーター
| 名前 | タイプ | 説明 |
|---|---|---|
| per_page | integer | 単一ページで返すAPIクライアントの数。 デフォルトは100です。 最大は100です。 |
| page | integer | 取得するAPIクライアントのページ番号。 デフォルトは1です。 |
サンプルリクエスト
shell
curl -X GET https://www.workato.com/api/developer_api_clients \
-H 'Authorization: Bearer <api_token>'レスポンス
json
{
"result": {
"count": 3,
"items": [
{
"id": 40947,
"name": "Test",
"api_privilege_group_id": 26779,
"created_at": "2023-02-22T01:55:35.739-08:00",
"updated_at": "2023-02-28T01:23:18.046-08:00",
"all_folders": false,
"folder_ids": [
26138,
26136
],
"environment_name": "Development",
"environment_id": 3218,
"ip_allow_list": "192.0.2.10,198.51.100.5",
"token": {
"updated_at": "2023-02-22T09:55:36.427Z"
}
},
]
}
}Developer APIクライアントの作成
Developer APIクライアントを作成します。
POST /api/developer_api_clientsペイロード
| 名前 | タイプ | 説明 |
|---|---|---|
| name | 文字列 | APIクライアントの名前 |
| api_privilege_group_id | integer | APIクライアントロールID |
| all_folders | boolean 必須 | APIクライアントがすべてのフォルダにアクセスできるかどうかを示すフラグ |
| folder_ids | array | フォルダIDの配列。 all_foldersがfalseの場合は必須です。 |
| environment_name | string | Environmentの名前。 ワークスペースでEnvironmentが有効になっている場合は必須です。 |
| ip_allow_list | string 任意 | APIクライアントへのアクセスを許可されたIPアドレスの配列。 指定しない場合、デフォルトですべてのIPになります。 |
サンプルリクエスト
shell
curl -X POST https://www.workato.com/api/developer_api_clients \
-H 'Authorization: Bearer <api_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Test Client",
"api_privilege_group_id": 26779,
"environment_name": "Development",
"all_folders": true,
"ip_allow_list": "192.0.2.10,198.51.100.5"
}'レスポンス
json
{
"result": {
"id": 40948,
"name": "Test Client",
"api_privilege_group_id": 26779,
"created_at": "2023-02-28T02:09:07.255-08:00",
"updated_at": "2023-02-28T02:09:07.586-08:00",
"all_folders": true,
"environment_name": "Development",
"environment_id": 3218,
"ip_allow_list": "192.0.2.10,198.51.100.5",
"token": {
"updated_at": "2023-02-28T10:09:07.579Z",
"value": "wrkaus-eyJhbGciOiJSUz..."
}
}
}IDによるDeveloper APIクライアントの取得
IDでDeveloper APIクライアントを取得します。
GET /api/developer_api_clients/:idパスパラメーター
| 名前 | タイプ | 説明 |
|---|---|---|
| id | integer required | APIクライアントのID。 |
サンプルリクエスト
shell
curl -X GET https://www.workato.com/api/developer_api_clients/123 \
-H 'Authorization: Bearer <api_token>'レスポンス
json
{
"result": {
"id": 40948,
"name": "Test Client",
"api_privilege_group_id": 26779,
"created_at": "2023-02-28T02:09:07.255-08:00",
"updated_at": "2023-02-28T02:09:07.586-08:00",
"all_folders": true,
"environment_name": "Development",
"environment_id": 3218,
"token": {
"updated_at": "2023-02-28T10:09:07.579Z"
},
"user": {
"id": 3218,
"name": "Workato Customer Success test"
}
}
}Developer APIクライアントの更新
Developer APIクライアントを更新します。
PUT /api/developer_api_clients/:idパスパラメータ
| 名前 | タイプ | 説明 |
|---|---|---|
| id | integer required | APIクライアントのID。 |
ペイロード
| 名前 | タイプ | 説明 |
|---|---|---|
| name | 文字列 | APIクライアントの名前 |
| api_privilege_group_id | integer | APIクライアントロールID |
| all_folders | boolean 必須 | APIクライアントがすべてのフォルダにアクセスできるかどうかを示すフラグ |
| folder_ids | array | フォルダIDの配列。 all_foldersがfalseの場合は必須です。 |
| environment_name | string | Environmentの名前。 ワークスペースでEnvironmentが有効になっている場合は必須です。 |
| ip_allow_list | string 任意 | APIクライアントへのアクセスを許可されたIPアドレスの配列。 指定しない場合、デフォルトですべてのIPになります。 |
サンプルリクエスト
shell
curl -X PUT https://www.workato.com/api/developer_api_clients/123 \
-H 'Authorization: Bearer <api_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Test Client",
"api_privilege_group_id": 26779,
"environment_name": "Development",
"all_folders": true,
"ip_allow_list": "192.0.2.10,198.51.100.5"
}'レスポンス
json
{
"result": {
"id": 40948,
"name": "Test Client",
"api_privilege_group_id": 26779,
"created_at": "2023-02-28T02:09:07.255-08:00",
"updated_at": "2023-02-28T02:09:07.586-08:00",
"all_folders": true,
"environment_name": "Development",
"environment_id": 3218,
"ip_allow_list": "192.0.2.10,198.51.100.5",
"token": {
"updated_at": "2023-02-28T10:09:07.579Z"
},
"user": {
"id": 3218,
"name": "Workato Customer Success test"
}
}
}Developer APIクライアントの削除
Developer APIクライアントを削除します。
DELETE /api/developer_api_clients/:idパスパラメータ
| 名前 | タイプ | 説明 |
|---|---|---|
| id | integer required | APIクライアントのID。 |
サンプルリクエスト
shell
curl -X DELETE https://www.workato.com/api/developer_api_clients/123 \
-H 'Authorization: Bearer <api_token>'レスポンス
json
{
"result": "success"
}Developer APIクライアントトークンの再生成
APIクライアントのAPIトークンを再生成します。 これにより、以前のAPIトークンが無効になります。
POST /api/developer_api_clients/:id/regenerateパスパラメータ
| 名前 | タイプ | 説明 |
|---|---|---|
| id | integer required | APIクライアントのID。 |
サンプルリクエスト
shell
curl -X POST https://www.workato.com/api/developer_api_clients/123/regenerate \
-H 'Authorization: Bearer <api_token>'レスポンス
json
{
"result": {
"id": 40890,
"name": "Test new API client",
"api_privilege_group_id": 26779,
"created_at": "2023-01-29T22:30:12.930-08:00",
"updated_at": "2023-02-28T02:19:16.542-08:00",
"all_folders": true,
"environment_name": "Development",
"environment_id": 3218,
"token": {
"updated_at": "2023-02-28T10:19:16.530Z",
"value": "wrkaus-eyJhbGc..."
}
}
}Developer APIクライアントロールの一覧
すべてのDeveloper APIクライアントロールを一覧表示します。
GET /api/developer_api_client_rolesクエリパラメータ
| 名前 | タイプ | 説明 |
|---|---|---|
| per_page | integer | 単一ページで返すAPIクライアントの数。 デフォルトは100です。 最大は100です。 |
| page | integer | 取得するAPIクライアントのページ番号。 デフォルトは1です。 |
サンプルリクエスト
shell
curl -X GET https://www.workato.com/api/developer_api_client_roles \
-H 'Authorization: Bearer <api_token>'レスポンス
json
{
"result": {
"items": [
{
"id": 26779,
"name": "Admin",
"created_at": "2023-01-18T04:31:03.302-08:00",
"updated_at": "2023-02-28T01:23:01.427-08:00"
},
...
],
"count": 3,
"page": 1,
"per_page": 100
}
}Last updated: