APIクライアント

このページは機械翻訳により提供されています。翻訳内容と英語版に相違がある場合は、英語版が優先されます。

以下のエンドポイントを使用すると、Developer API経由でAPIクライアントを管理できます。 これにより、新しいチームのオンボーディング時に新しいAPIクライアントをプログラムで作成したり、すべてのAPIクライアントのAPIトークンを定期的にローテーションしたりできます。

レート制限

APIクライアントリソースには、次のレート制限があります:

タイプリソース制限
すべてすべてのAPIクライアントエンドポイント1分あたり60リクエスト

クイックリファレンス

タイプリソース説明
GET/api/developer_api_clientsDeveloper APIクライアントの一覧を表示します。
POST/api/developer_api_clientsDeveloper APIクライアントを作成します。
GET/api/developer_api_clients/:idIDによるDeveloper APIクライアントを取得します。
PUT/api/developer_api_clients/:idDeveloper APIクライアントを更新します。
DELETE/api/developer_api_clients/:idDeveloper APIクライアントを削除します。
POST/api/developer_api_clients/:id/regenerateDeveloper APIクライアントトークンを再生成します。
GET/api/developer_api_client_rolesDeveloper APIクライアントロールの一覧を表示します。

Developer APIクライアントの一覧

すべてのDeveloper APIクライアントを一覧表示します。

GET /api/developer_api_clients

クエリパラメーター

名前タイプ説明
per_pageinteger単一ページで返すAPIクライアントの数。 デフォルトは100です。 最大は100です。
pageinteger取得する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_idintegerAPIクライアントロールID
all_foldersboolean
必須
APIクライアントがすべてのフォルダにアクセスできるかどうかを示すフラグ
folder_idsarrayフォルダIDの配列。 all_foldersがfalseの場合は必須です。
environment_namestringEnvironmentの名前。 ワークスペースでEnvironmentが有効になっている場合は必須です。
ip_allow_liststring
任意
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

パスパラメーター

名前タイプ説明
idinteger
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

パスパラメータ

名前タイプ説明
idinteger
required
APIクライアントのID。

ペイロード

名前タイプ説明
name文字列APIクライアントの名前
api_privilege_group_idintegerAPIクライアントロールID
all_foldersboolean
必須
APIクライアントがすべてのフォルダにアクセスできるかどうかを示すフラグ
folder_idsarrayフォルダIDの配列。 all_foldersがfalseの場合は必須です。
environment_namestringEnvironmentの名前。 ワークスペースでEnvironmentが有効になっている場合は必須です。
ip_allow_liststring
任意
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

パスパラメータ

名前タイプ説明
idinteger
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

パスパラメータ

名前タイプ説明
idinteger
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_pageinteger単一ページで返すAPIクライアントの数。 デフォルトは100です。 最大は100です。
pageinteger取得する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: