# Jobs

Type Resource Description
GET /api/recipes/:recipe_id/jobs List jobs from a recipe.
GET /api/recipes/:recipe_id/jobs/:job_handle Returns a single job's metadata.
POST /api/job/resume Resumes a particular job based on the resume_token you provide. This endpoint returns HTTP status code 204, indicating successful request processing without any content included in the response. This endpoint is leveraged by SDK Wait for resume actions.

# List jobs from a recipe

Returns aggregated job information as well as detailed job information for a specified recipe in Workato.

GET /api/recipes/:recipe_id/jobs

Run-time data not available

Run-time data is the data that flows through the recipe at the time of job execution. This includes the input and output data from individual steps.

This data is available through the Workato platform on the job details page.

# URL parameters

Name Type Description
recipe_id integer
required
Recipe ID.

# Query parameters

Name Type Description
offset_job_id string
optional
Offset job ID.
prev boolean
optional
Defaults to false. When prev=false, this call returns jobs completed prior to the offset_job_id. If prev=true, jobs newer than the offset_job_id are returned.
status string
optional
Filter by status - succeeded, failed or pending.
rerun_only boolean
optional
If true, returns jobs that were rerun only.
offset_run_id integer
(deprecated)
Offset run ID. This parameter has been deprecated.
failed boolean
(deprecated)
If true, returns failed jobs only. This parameter has been deprecated.

# Sample request

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

# Response

{
  "job_succeeded_count": 1,
  "job_failed_count": 1,
  "job_count": 1,
  "items": [
    {
      "id": "j-KGAKfhsz-GYoLe",
      "flow_run_id": 1004,
      "completed_at": "2015-01-02T01:02:03.000Z",
      "started_at": "2015-01-02T01:02:03.000Z",
      "title": "Callable recipes by Workato: new call for recipe: Calling IP address=129.1.1.1, Access profile ID=123456, and Access profile name=recipe_test",
        "is_poll_error": false,
        "error": null,
        "is_error": false
    },
    {
      "id": "j-AD9bJn99-hsCXcs",
      "flow_run_id": 1005,
      "completed_at": "2015-01-02T01:02:03.000Z",
      "started_at": "2015-01-02T01:02:03.000Z",
      "title": "Callable recipes by Workato: new call for recipe: Calling IP address=129.1.1.1, Access profile ID=123456, and Access profile name=recipe_test",
      "is_poll_error": false,
      "error": "Callable recipes by Workato: new call for recipe: Calling IP address=129.1.1.1, Access profile ID=123456, and Access profile name=recipe_test",
      "error_parts": {
        "adapter": "marketo",
        "error_type": "Missing required field",
        "message": "'Filter values' must be present",
        "error_id": "603260f5-a309-45b3-a20e-111d90a28917",
        "error_at": "2020-01-22T01:17:18.021-08:00",
        "input": "<redacted>",
        "inner_message": null
      },
      "is_error": true
    },
  ]
}

# Get a job

Returns a single job's metadata by its job handle.

GET /api/recipes/:recipe_id/jobs/:job_handle

Run-time data not available

Run-time data is the data that flows through the recipe at the time of job execution. This includes the input and output data from individual steps.

This data is available through the Workato platform on the job details page.

# URL parameters

Name Type Description
recipe_id integer
required
Recipe ID.
job_handle string
required
The job's unique identifier.

# Sample request

curl  -X GET 'https://www.workato.com/api/recipes/32723612/jobs/j-AJTAt8w6-wdAgWM' \
      -H 'Authorization: Bearer <api_token>'

# Response

{
  "id": "j-AJTAt8w6-wdAgWM",
  "handle": "j-AJTAt8w6-wdAgWM",
  "recipe_id": 32723676,
  "completed_at": "2023-09-08T13:55:24.731-07:00",
  "started_at": "2023-09-08T13:55:24.606-07:00",
  "title": "Scheduler by Workato: new recurring event: Scheduled time=2023-09-08T13:55:24.177301-07:00, Scheduled day=Friday, and Scheduled week=36",
  "is_poll_error": false,
  "lines": [
    {
      "recipe_line_number": 0,
      "adapter_name": "clock",
      "adapter_operation": "scheduled_event",
      "input": {
        "time_unit": "minutes",
        "trigger_every": "5"
      },
      "output": {
        "scheduled_time": "2023-09-08T13:55:24.177301-07:00",
        "scheduled_day": "Friday",
        "scheduled_week": 36,
        "scheduled_month": "September",
        "last_job_time": "2023-09-08T12:05:31.000000-07:00"
      },
      "mask_data": false,
      "line_stat": {
        "total": 0.0034586129913805053,
        "details": [
          {
            "name": "map_input",
            "count": 1,
            "average": 0.0032869009883143008,
            "total": 0.0032869009883143008,
            "min": 0.0032869009883143008,
            "max": 0.0032869009883143008
          },
          {
            "name": "summarize_output_report",
            "count": 1,
            "average": 0.000025447006919421256,
            "total": 0.000025447006919421256,
            "min": 0.000025447006919421256,
            "max": 0.000025447006919421256
          },
          {
            "name": "event_title",
            "count": 1,
            "average": 0.00013735999527852982,
            "total": 0.00013735999527852982,
            "min": 0.00013735999527852982,
            "max": 0.00013735999527852982
          },
          {
            "name": "summarize_input_report",
            "count": 1,
            "average": 0.00000890500086825341,
            "total": 0.00000890500086825341,
            "min": 0.00000890500086825341,
            "max": 0.00000890500086825341
          }
        ]
      }
    }
  ],
  "error": null,
  "is_error": false,
  "is_repeat": false,
  "is_test": false,
  "is_test_case_job": false,
  "master_job_id": "j-AJTAt8w6-wdAgWM",
  "master_job_handle": "j-AJTAt8w6-wdAgWM",
  "status": "succeeded",
  "calling_recipe_id": null,
  "calling_job_id": null,
  "calling_job_handle": null
}

# Resume a job

Resumes a particular job based on the resume_token you provide. This endpoint returns HTTP status code 204, indicating successful request processing without any content included in the response.

This endpoint is invoked by third-party apps when using SDK Wait for resume actions.

# Payload

Name Type Description
token string
required
The resume_token that matches the particular job you plan to resume.
data hash
optional
Any contextual data you plan to pass back to the job. This data is accessible by the action in the before_resume lambda. The payload's limit is 50MB. For payloads larger than the limit, you can send a reference and allow the action’s execute lambda to make a secondary request to retrieve the data.
POST /api/job/resume

# Sample request

curl -X POST http://www.workato.com/api/job/resume \
     -H "Authorization: Bearer <api_token>" \
     -H "Content-Type: application/json" \
     -d '{
       "token": "<resume_token>",
       "data":  {...}
     }'


Last updated: 4/2/2024, 11:42:24 PM