younifyd
Menu

List Jobs

List jobs

GET/api/jobs

Use it in a workflow

  1. Add a step and choose the Gorgias connector.
  2. Pick the List Jobs action (under Jobs).
  3. Fill in the fields below, then reference the result from later steps as {{listJobs.response.data}}.

Request

Query parameters

cursorstring

Value indicating your position in the list of all jobs. If omitted, the first jobs of the list will be returned.

limitinteger

Maximum number of jobs to return.

Default 30

order_bystring

Attribute used to order jobs.

One ofcreated_datetime:asccreated_datetime:descDefault "created_datetime:desc"

statusstring | null

Filter jobs by status.

One ofcancel_requestedcanceleddoneerroredfatal_erroredpendingrunningscheduledDefault null

typestring | null

Filter jobs by job type.

One ofapplyMacrodeleteTicketexportTicketimportMacroexportMacroupdateTicketexportTicketDrilldownexportConvertCampaignSalesDrilldownDefault null

Response

Returns 200 with an object. Read it in later steps with {{listJobs.response.data.<field>}}.

dataarray<object>
idinteger

ID of the job.

cancel_requested_datetimestring | null

When the job cancellation was requested.

cancelled_datetimestring | null

When the job was canceled.

created_datetimestring | null

When the job was created.

ended_datetimestring | null

When the job ended.

failed_datetimestring | null

When the job failed.

infoobject

Data concerning the progress of the job. E.g: how many objects the job has already processed.

locked_datetimestring | null

When the job was locked. A job is only locked while it's actively running.

metaobject | null

Metadata associated with the job. You can use this parameter to store structured information (key-value data) about the job. This field is not used by Gorgias.

paramsobject10 fields

The parameters of the job.

scheduled_datetimestring | null

When the job was scheduled to be started. A job cannot be scheduled more than 60 minutes in the future. If unspecified, the job is queued for execution immediately after creation.

started_datetimestring | null

When the job started.

statusstring

The status of the job. Options: cancel_requested, canceled, done, errored, fatal_errored, pending, running, scheduled

One ofcancel_requestedcanceleddoneerroredfatal_erroredpendingrunningscheduled

typestring

The type of the job. Options: applyMacro, deleteTicket, exportTicket, importMacro, exportMacro, updateTicket, exportTicketDrilldown, exportConvertCampaignSalesDrilldown

One ofapplyMacrodeleteTicketexportTicketimportMacroexportMacroupdateTicketexportTicketDrilldownexportConvertCampaignSalesDrilldown

user_idinteger

The ID of the user who created this job.

uristring

URI of the job.

metaobject
next_cursorstring

Value indicating a cursor for the next page.

prev_cursorstring

Value indicating a cursor for the previous page.

json
{
  "data": [
    {
      "id": 1234,
      "cancel_requested_datetime": "2019-11-23T16:31:00.966927",
      "cancelled_datetime": "2019-11-23T16:32:00.966927",
      "created_datetime": "2019-11-23T16:00:00.966927",
      "ended_datetime": "2019-11-23T16:32:00.966927",
      "failed_datetime": "2019-11-23T15:59:41.966927",
      "info": {
        "progress_count": 123
      },
      "locked_datetime": "2019-11-23T16:30:01.966927",
      "meta": {
        "description": "This job closes all tickets created in 2018"
      },
      "params": {
        "ticket_ids": [
          1,
          2,
          3
        ],
        "updates": {
          "status": "open"
        }
      },
      "scheduled_datetime": "2019-11-23T16:30:00.966927",
      "started_datetime": "2019-11-23T16:30:01.966927"
    }
  ],
  "meta": {
    "next_cursor": "WyJuZXh0IiwgIjIwMjEtMDEtMDFUMDE6MDA6MDAiLCA1MV0=",
    "prev_cursor": "WyJuZXh0IiwgIjIwMjEtMDEtMDFUMDE6MDA6MDAiLCA1MV0="
  }
}

Need more? See the Gorgias guide for connection setup and behaviour shared by every action.

Was this page helpful?