Retrieve a list of jobs

Retrieve a list of jobs

GET api/jobs/

Retrieves a list of jobs. A table of job IDs is available in the SC//Reliantâ„¢ Platform Manager dashboard on the Remote Job Execution tab as well.

Request syntax

get api/jobs

Request parameters

The request accepts the following query parameters.

ParameterTypeDescriptionRequiredDefault value
pageIntegerThe page number to retrieve.No1
page_sizeIntegerThe number of results to return for each page.No1000
statusStringFilter the results by Job status. Available values are in_progress, finished, failed, pending, and partially_failed.NoNull
typeStringFilter the results by Job type. Available values are ExportersJob, ServiceCheckJob, RvcJob, Rvc3Job, PuppetJob, ETLImport, HierarchyImport, LocationImport, NodeImport, ServerImport, and StoreImport.NoNull
locationStringFilter the results by location.NoNull
include_payloadBooleanIf true, the response includes the payload information.Nofalse

Response syntax

{
    "page": integer,
    "page_size": integer,
    "pages_total": integer,
    "items_total": integer,
    "jobs": [
        {
            "id": integer,
            "type": "string",
            "status": "string",
            "message": "string",
            "process_time": integer,
            "username": "string",
            "payload": {},
            "created_at": "timestamp",
            "updated_at": "timestamp"
        }
    ]
}

Response parameters

If the action is successful, an HTTP 200 response is returned. The following data is returned in JSON format.

FieldTypeDescription
pageIntegerThe page number of the results.
page_sizeIntegerThe maximum number of jobs on each page.
pages_totalIntegerThe total number of pages for the filtered results.
items_totalIntegerThe total number of jobs that match the filters.
jobsObject arrayThe jobs on this page, newest first. Each job has the fields below.
idIntegerThe ID of the job. Use it to retrieve the job details, for example with GET api/jobs/<id>?include_payload=true.
typeStringThe type of job, for example Rvc3Job or PuppetJob.
statusStringThe status of the job.
messageStringThis field is reserved for internal use.
process_timeIntegerHow long the job took to process, in milliseconds.
usernameStringThe username of the person who initiated the job.
payloadObjectThe results of the job. Only returned when include_payload is true.
created_atTimestampWhen the job was created, in ISO 8601 UTC datetime format.
updated_atTimestampWhen the job was last updated, in ISO 8601 UTC datetime format.

Errors

The following errors can be returned by this API. For a list of additional common errors, see Common errors.

CodeMessageCause
400Validation Failed: status does not have a valid valueThe status filter is not one of the available values.
400Validation Failed: type does not have a valid valueThe type filter is not one of the available values.
404Not foundThe location in the location filter does not exist.
500500 Internal Server Errorpage_size is 0. Use a page size of at least 1.

Examples

Example 1: Retrieve a list of jobs.

This example retrieves the two most recent jobs.

ruby api.rb <customer_code> GET "api/jobs?page_size=2"

Response

{
  "page": 1,
  "page_size": 2,
  "pages_total": 7759,
  "items_total": 15517,
  "jobs": [
    {
      "id": 1782416,
      "type": "Rvc3Job",
      "status": "finished",
      "message": null,
      "process_time": 595,
      "username": "test.user",
      "created_at": "2026-10-12T17:38:50.999Z",
      "updated_at": "2026-10-12T17:38:51.605Z"
    },
    {
      "id": 1782415,
      "type": "Rvc3Job",
      "status": "finished",
      "message": null,
      "process_time": 645,
      "username": "test.user",
      "created_at": "2026-10-12T17:38:41.939Z",
      "updated_at": "2026-10-12T17:38:42.627Z"
    }
  ]
}

Example 2: Retrieve a list of finished jobs of a specific type.

This example retrieves the two most recent finished jobs with type Rvc3Job.

ruby api.rb <customer_code> GET "api/jobs?status=finished&type=Rvc3Job&page_size=2"

Response

{
  "page": 1,
  "page_size": 2,
  "pages_total": 2020,
  "items_total": 4040,
  "jobs": [
    {
      "id": 1782416,
      "type": "Rvc3Job",
      "status": "finished",
      "message": null,
      "process_time": 595,
      "username": "test.user",
      "created_at": "2026-10-12T17:38:50.999Z",
      "updated_at": "2026-10-12T17:38:51.605Z"
    },
    {
      "id": 1782415,
      "type": "Rvc3Job",
      "status": "finished",
      "message": null,
      "process_time": 645,
      "username": "test.user",
      "created_at": "2026-10-12T17:38:41.939Z",
      "updated_at": "2026-10-12T17:38:42.627Z"
    }
  ]
}

Example 3: Retrieve a job with its payload.

This example retrieves the most recent Puppet job, including its payload.

ruby api.rb <customer_code> GET "api/jobs?type=PuppetJob&page_size=1&include_payload=true"

Response

{
  "page": 1,
  "page_size": 1,
  "pages_total": 181,
  "items_total": 181,
  "jobs": [
    {
      "id": 1777046,
      "type": "PuppetJob",
      "status": "finished",
      "message": null,
      "process_time": 1457,
      "username": "test.user",
      "payload": {
        "success_nodes": {
          "sit0001red0": {
            "status": "Currently applying a catalog; last completed run 31 minutes 36 seconds ago"
          }
        }
      },
      "created_at": "2026-10-01T14:16:55.107Z",
      "updated_at": "2026-10-01T14:16:56.576Z"
    }
  ]
}