# Recipes

# Quick reference

Type Resource Description
GET /api/managed_users/:id/recipes List recipes belonging to a customer account.
GET /api/recipes/search Search for public recipes.
PUT /api/managed_users/:managed_user_id/recipes/:recipe_id/start Start a recipe in a customer account.
PUT /api/managed_users/:managed_user_id/recipes/:recipe_id/stop Stop a recipe in a customer account.

# List recipes in a customer account

Returns a list of recipes belonging to the authenticated user. Recipes are returned in descending ID order. Lifetime task count has task data starting from March 19, 2021.

Recipes can be filtered by state (running/stopped) and subsequently filtered by stopped date and reason.

GET /api/managed_users/:id/recipes

# URL parameters

Name Type Description
id string
required
Workato Embedded customer Account ID/External ID.
External id should be prefixed with a E(eg: EA2300) and the resulting id should be URL encoded.
page integer
optional
Page number (defaults to 1).
per_page integer
optional
Page size (defaults to 10, maximum allowed is 100 per page).
since_id integer
optional
Find recipes with ID less than the given ID.
folder_id string
optional
Return the recipes in the specified folder.
running boolean
optional
If true, returns running recipes.
stopped_after string
optional
Filter out recipes that were stopped after a specified date/time. Date and time should be given in ISO 8601 format.
stop_cause string
optional
Reason that the recipe stopped. Possible reasons include —
trigger_errors_limit: Recipe was stopped due to consecutive trigger errors
action_quota_limit: Customer exceeded plan's task limit
trial_expired: Customer's trial expired
txn_quota_limit: Customer exceeded plan's job limit

# Sample request

curl  -X GET https://www.workato.com/api/managed_users/91829/recipes?active=true \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>'

# Response

{
    "result": [
        {
            "id": 41354,
            "folder_id": 7795,
            "user_id": 7442,
            "name": "Netsuite order sync",
            "created_at": "2020-09-25T01:51:02.046-07:00",
            "updated_at": "2020-09-25T01:51:02.046-07:00",
            "copy_count": 2,
            "trigger_application": "netsuite",
            "action_applications": [
                "salesforce",
                "logger"
            ],
            "running": false,
            "job_succeeded_count": 1,
            "job_failed_count": 0,
            "lifetime_task_count": 0,
            "last_run_at": "2020-10-13T01:46:39.524-07:00",
            "stopped_at": "2020-10-13T02:06:40.400-07:00",
            "stop_cause": "trigger_errors_limit",
            "applications": [
                "netsuite",
                "salesforce",
                "logger"
            ],
            "description": "When there is a trigger event, do action"
        },
        {
            "id": 41351,
            "folder_id": 7795,
            "user_id": 7442,
            "name": "Slack notifications (New orders)",
            "created_at": "2020-09-25T01:13:45.742-07:00",
            "updated_at": "2020-09-25T01:13:45.742-07:00",
            "copy_count": 2,
            "trigger_application": "netsuite",
            "action_applications": [
                "slack",
                "gmail"
            ],
            "running": false,
            "job_succeeded_count": 2,
            "job_failed_count": 0,
            "last_run_at": "2020-09-25T01:13:52.002-07:00",
            "stopped_at": "2020-09-25T01:18:54.795-07:00",
            "stop_cause": "action_quota_limit",
            "applications": [
                "netsuite",
                "slack",
                "gmail"
            ],
            "description": "When there is a trigger event, do action"
        }
    ]
}

# Search for public recipes

Searches for public recipes and returns a list. Returns an empty list when no matching connectors are found.

GET /api/recipes/search

# URL parameters

Name Type Description
term string
optional
Search term.
boost_owned boolean
optional
If true, returned results will give priority to recipes in your account. Defaults to false.
page integer
optional
Page number. Defaults to 0.
per_page integer
optional
Page size. Defaults to 20, max 20.

# Payload

Name Type Description
applications string
required
Comma separated connector identifiers (e.g: salesforce,service_now).

# Sample request

curl  -X GET https://www.workato.com/api/recipes/search?per_page=1 \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>' \
      -H 'Content-Type: application/json' \
      -d '{
            "applications": "salesforce,service_now"
          }'

# Response

{
  "items": [
    {
      "id": 59,
      "user_id": 50,
      "name": "Recipe 58",
      "created_at": "2015-05-26T22:53:39.032Z",
      "updated_at": "2015-05-26T22:53:39.032Z",
      "copy_count": 1,
      "trigger_application": null,
      "action_applications": [
        "salesforce",
        "service_now"
      ],
      "applications": [
        "salesforce"
      ],
      "description": "Recipe description 58",
      "parameters_schema": []
    }
  ]
}

# Start recipe in a customer account

Starts a recipe in a customer account specified by recipe ID.

PUT /api/managed_users/:managed_user_id/recipes/:recipe_id/start

# URL parameters

Name Type Description
managed_user_id string
required
Workato Embedded customer Account ID/External ID.
External id should be prefixed with a E(eg: EA2300) and the resulting id should be URL encoded.
recipe_id integer
optional
Recipe ID.

# Sample request

curl  -X PUT https://www.workato.com/api/managed_users/91929/recipes/1028949/start \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>'

# Response

{
  "success": true
}

# Stop recipe in a customer account

Stops a recipe in a customer account specified by recipe ID.

PUT /api/managed_users/:managed_user_id/recipes/:recipe_id/stop

# URL parameters

Name Type Description
managed_user_id string
required
Workato Embedded customer Account ID/External ID.
External id should be prefixed with a E(eg: EA2300) and the resulting id should be URL encoded.
recipe_id interger
optional
Recipe ID.

# Sample request

curl  -X PUT https://www.workato.com/api/managed_users/91929/recipes/1028949/stop \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>'

# Response

{
  "success": true
}