# Retrieve a list of jobs

Lists all publishing jobs for a specific tenant, including jobs that are `in progress`, `completed`, `failed`, and so on. This endpoint supports two types of pagination:
- Offset pagination
- Checkpoint pagination

When you use offset pagination, only the first 1000 records are returned.  To retrieve a list of jobs, your token must include one of the following scopes ` xmcpub.jobs.a:r`, `xmcpub.jobs.t:r`, or `xmcpub.jobs.t:rl`.

Endpoint: GET /authoring/publishing/v1/jobs
Version: v1.0
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Query parameters:

  - `pageNumber` (integer)
    The page number of the results to return. The first page is `1`. This parameter must be used only in offset pagination requests as it indicates that offset pagination should be used.

  - `pageSize` (integer)
    The number of results per page.

  - `source` (array)
    The source value to use when filtering jobs. Use a pipe to specify multiple values  (for example, `?source=Pages|Sites`). Wildcards are not supported.

  - `system.createdBy.id` (array)
    The ID of the creator to use when filtering jobs. Use a pipe to specify multiple values  (for example, `?system.createdBy.id=Qbu3QmWtnQoU0my5jX9MFxBYIeQrFhd2|auth0|000b2fc5fa6b9e5883b6245b`). Wildcards are not supported.

  - `system.createdBy.name` (array)
    The name of the creator to use when filtering jobs. Use a pipe to specify multiple values  (for example, `?system.createdBy.name=John+Doe|John+Smith`). Wildcards are not supported.

  - `system.status` (array)
    The status value to use when filtering jobs. Use a pipe to specify multiple values (for example, `?system.status=Queued|Running`).

  - `system.queuedTime` (array)
    The job queued time to filter entries by. Use `&` to include more than one filter (for example, `?system.queuedTime=>2024-10-14T00:00:00.000Z&system.queuedTime=<2024-12-31T00:00:00.000Z`).  Only `=>DATE` and `=<DATE` filters are supported.

  - `system.startTime` (array)
    The job start time to filter entries by. Use `&` to include more than one filter (for example, `?system.startTime=>2024-10-14T00:00:00.000Z&system.startTime=<2024-12-31T00:00:00.000Z`). Only `=>DATE` and `=<DATE` filters are supported.

  - `system.finishTime` (array)
    The job finish time to filter entries by. Use `&` to include more than one filter (for example, `?system.finishTime=>2024-10-14T00:00:00.000Z&system.finishTime=<2024-12-31T00:00:00.000Z`). Only `=>DATE` and `=<DATE` filters are supported.

  - `sortBy` (string)
    Field to sort jobs by. You can specify whether to sort by ascending or descending order, using the format `field:order`, where order can be `1` for ascending or `-1` for descending (for example, `name:1`). The following fields are supported: `name`, `source`, `system.status`, `system.queuedTime`, `system.startTime`, `system.finishTime`.

## Header parameters:

  - `x-sc-continuation` (string)
    Continuation token value from which to start the selection (checkpoint pagination). The first time you call this endpoint using checkpoint pagination, omit this header.

## Response 200:

  - `200` (unknown)
    Jobs successfully retrieved

## Response 200 fields (application/json):

  - `totalCount` (integer, required)
    The total count of items.

  - `pageNumber` (integer, required)
    The page number.

  - `pageSize` (integer, required)
    The page size.

  - `data` (array, required)
    The collection of data for response.

  - `data.id` (string, required)
    The ID of the job.

  - `data.description` (string)
    The description of the job.

  - `data.name` (string, required)
    The name of the job.

  - `data.options` (object, required)
    The options the publishing job was created with.

  - `data.options.xmc` (object)
    XMC publishing options.

  - `data.options.xmc.locales` (array, required)
    Locales in which content is to be published.

  - `data.source` (string, required)
    The source of the job.

  - `data.statistics` (object)
    The job statistics.

  - `data.statistics.lastReportTime` (string)
    The last time the statistics were updated.

  - `data.statistics.itemsSent` (integer)
    The number of items sent.

  - `data.statistics.itemsProcessed` (integer)
    The number of items processed.

  - `data.statistics.itemsFailed` (integer)
    The number of items failed.

  - `data.statistics.xmc` (object)
    Additional fields of the XMC statistics.

  - `data.statistics.xmc.additionalItemsSent` (integer)
    The number of additional items sent.

  - `data.statistics.xmc.itemsAcknowledged` (integer)
    The number of items acknowledged.

  - `data.statistics.xmc.itemsDeleted` (integer)
    The number of items deleted.

  - `data.statistics.xmc.itemsSkipped` (integer)
    The number of items skipped.

  - `data.statistics.xmc.itemsSendingComplete` (boolean)
    Indicates whether the sending of items is complete.

  - `data.system` (object)
    The system data of a job.

  - `data.system.organizationId` (string, required)
    The ID of the organization that the job belongs to.

  - `data.system.tenantId` (string, required)
    The ID of the tenant that the job belongs to.

  - `data.system.tenantJobId` (string)
    The job ID on the tenant side.

  - `data.system.status` (string, required)
    The status of the job.
    Enum: "Queued", "Running", "Completed", "Failed", "Canceled", "Canceling"

  - `data.system.queuedTime` (string)
    The time when the job was queued.

  - `data.system.startTime` (string)
    The time when the job was started.

  - `data.system.finishTime` (string)
    The time when the job was finished.

  - `data.system.createdBy` (object)
    The service client description.

  - `data.system.createdBy.id` (string, required)
    The ID of service client.

  - `data.system.createdBy.name` (string, required)
    The name of service client.

  - `data.system.createdBy.type` (string, required)
    The type of service client.
    Enum: "Application", "User"

  - `data.permissions` (object, required)
    The permissions of the current user or application to work with the job.

  - `data.permissions.canViewDetails` (boolean)
    Whether details of the publishing job can be viewed.

  - `data.permissions.canCancel` (boolean)
    Whether the publishing job can be canceled.

  - `next` (string, required)
    Continuation token for the next page.

## Response 400:

  - `400` (unknown)
    Invalid parameters in request query string

## Response 400 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request or invalid access token

## Response 401 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 403:

  - `403` (unknown)
    Forbidden. Possible reasons:
  - Authorization failed (required scopes and/or roles are missing)
  - Context tenant cannot be resolved from the access token

## Response 403 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

