# API clients

The following endpoints allow you to manage your API clients via developer APIs. This allows you to programmatically create new API clients when onboarding new teams or rotate API tokens regularly for all your API clients.

# Quick reference

Type Resource Description
GET /api/developer_api_clients List Developer API Clients.
POST /api/developer_api_clients Create Developer API Client.
GET /api/developer_api_clients/:id Get Developer API Client by ID.
PUT /api/developer_api_clients/:id Update Developer API Clients.
DELETE /api/developer_api_clients/:id Delete Developer API Client.
POST /api/developer_api_clients/:id/regenerate Regenerate Developer API Client token.
GET /api/developer_api_client_roles List Developer API Client roles.

# List Developer API clients

List all Developer API clients.

GET /api/developer_api_clients

# Query parameters

Name Type Description
per_page integer Number of API clients to return in a single page. Defaults to 100. Max is 100.
page integer Page number of the API clients to fetch. Defaults to 1.

# Sample Request

curl  -X GET https://www.workato.com/api/developer_api_clients \
      -H 'Authorization: Bearer <api_token>'

# Response

{
    "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,
                "token": {
                    "updated_at": "2023-02-22T09:55:36.427Z"
                }
            },
        ]
    }
}

# Create a Developer API client

Create a Developer API client.

POST /api/developer_api_clients

# Payload

Name Type Description
name String Name of the API client
api_privilege_group_id integer API client role ID
all_folders boolean
required
Flag indicating whether API client has access to all folders
folder_ids array Array of folder IDs. Required if all_folders is false.
environment_name string Name of the environment. Required if your workspace has environments enabled.

# Sample Request

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
          }'

# Response

{
    "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",
            "value": "wrkaus-eyJhbGciOiJSUz..."
        }
    }
}

# Get a Developer API client by ID

Get a Developer API client by ID.

GET /api/developer_api_clients/:id

# Path parameters

Name Type Description
id integer
required
ID of the API Client.

# Sample Request

curl  -X GET https://www.workato.com/api/developer_api_clients/123 \
      -H 'Authorization: Bearer <api_token>' 

# Response

{
    "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"
        }
    }
}

# Update a Developer API client

Update a Developer API client.

PUT /api/developer_api_clients/:id

# Path parameters

Name Type Description
id integer
required
ID of the API Client.

# Payload

Name Type Description
name String Name of the API client
api_privilege_group_id integer API client role ID
all_folders boolean
required
Flag indicating whether API client has access to all folders
folder_ids array Array of folder IDs. Required if all_folders is false.
environment_name string Name of the environment. Required if your workspace has environments enabled.

# Sample Request

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
          }'

# Response

{
    "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"
        }
    }
}

# Delete a Developer API client

Delete a Developer API client.

DELETE /api/developer_api_clients/:id

# Path parameters

Name Type Description
id integer
required
ID of the API Client.

# Sample Request

curl  -X DELETE https://www.workato.com/api/developer_api_clients/123 \
      -H 'Authorization: Bearer <api_token>' 

# Response

{
    "result": "success"
}

# Regenerate a Developer API Client token

Regenerates the API token for an API client. This invalidates the previous API token.

POST /api/developer_api_clients/:id/regenerate

# Path parameters

Name Type Description
id integer
required
ID of the API Client.

# Sample Request

curl  -X POST https://www.workato.com/api/developer_api_clients/123/regenerate \
      -H 'Authorization: Bearer <api_token>' 

# Response

{
    "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..."
        }
    }
}

# List Developer API client roles

List all Developer API Client roles.

GET /api/developer_api_client_roles

# Query parameters

Name Type Description
per_page integer Number of API clients to return in a single page. Defaults to 100. Max is 100.
page integer Page number of the API clients to fetch. Defaults to 1.

# Sample Request

curl  -X GET https://www.workato.com/api/developer_api_client_roles \
      -H 'Authorization: Bearer <api_token>'

# Response

{
    "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: 10/18/2023, 7:14:53 PM