# 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.  {% admonition type="info" name="Note" %}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. {% /admonition %}

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

## 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).
    Enum: "Queued", "Running", "Completed", "Failed", "Canceled", "Canceling"

  - `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=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=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=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 fields (application/json):

  - `body` (OffsetPagingPublishJobsResponse (object) or CheckpointPagingPublishJobsResponse (object)) — one of:
    - OffsetPagingPublishJobsResponse:
      - `data` (array,null, required)
        The collection of data for response.
      - `data.id` (string,null, required)
        The ID of the job.
      - `data.name` (string,null, required)
        The name of the job.
      - `data.options` (object, required)
        The options the publishing job was created with.
      - `data.options.xmc` (object,null) — one of:
        XMC publishing options.
        - Items:
          - `mode` (string, required)
            Mode of the items publish job.
            Enum: "Republish", "Smart"
          - `publishChildren` (boolean, required)
            Whether to publish children items recursively.
          - `publishRelatedItems` (boolean, required)
            Whether to publish related items.
          - `locales` (array, required)
            Locales in which content is to be published.
        - Site:
          - `mode` (string, required)
            Mode of the site publish job.
            Enum: "Republish", "Incremental", "Smart"
          - `locales` (array, required)
            Locales in which content is to be published.
      - `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.
      - `data.source` (string,null, required)
        The source of the job.
      - `data.description` (string,null)
        The description 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,null, required)
        The ID of the organization that the job belongs to.
      - `data.system.status` (string, required)
        The status of the job.
        Enum: same as `system.status` (6 values)
      - `data.system.tenantId` (string, required)
        The ID of the tenant that the job belongs to.
      - `data.system.tenantJobId` (string,null)
        The job ID on the tenant side.
      - `data.system.queuedTime` (string,null)
        The time when the job was queued.
      - `data.system.startTime` (string,null)
        The time when the job was started.
      - `data.system.finishTime` (string,null)
        The time when the job was finished.
      - `data.system.createdBy` (object)
        The service client description.
      - `data.system.createdBy.id` (string,null, required)
        The ID of service client.
      - `data.system.createdBy.name` (string,null, required)
        The name of service client.
      - `data.system.createdBy.type` (string, required)
        The type of service client.
        Enum: "Application", "User"
      - `data.system.canceledBy` (object)
        The service client description.
      - `pageNumber` (integer, required)
        The page number.
      - `pageSize` (integer, required)
        The page size.
      - `totalCount` (integer, required)
        The total count of items.
    - CheckpointPagingPublishJobsResponse:
      - `data` (array,null, required)
        The collection of data for response.
      - `data.id` (string,null, required)
        The ID of the job.
      - `data.name` (string,null, required)
        The name of the job.
      - `data.options` (object, required)
        The options the publishing job was created with.
      - `data.options.xmc` (object,null) — one of:
        XMC publishing options.
        - Items:
          - `mode` (string, required)
            Mode of the items publish job.
            Enum: same as `mode` in "Items" (2 values)
          - `publishChildren` (boolean, required)
            Whether to publish children items recursively.
          - `publishRelatedItems` (boolean, required)
            Whether to publish related items.
          - `locales` (array, required)
            Locales in which content is to be published.
        - Site:
          - `mode` (string, required)
            Mode of the site publish job.
            Enum: same as `mode` in "Site" (3 values)
          - `locales` (array, required)
            Locales in which content is to be published.
      - `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.
      - `data.source` (string,null, required)
        The source of the job.
      - `data.description` (string,null)
        The description 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,null, required)
        The ID of the organization that the job belongs to.
      - `data.system.status` (string, required)
        The status of the job.
        Enum: same as `system.status` (6 values)
      - `data.system.tenantId` (string, required)
        The ID of the tenant that the job belongs to.
      - `data.system.tenantJobId` (string,null)
        The job ID on the tenant side.
      - `data.system.queuedTime` (string,null)
        The time when the job was queued.
      - `data.system.startTime` (string,null)
        The time when the job was started.
      - `data.system.finishTime` (string,null)
        The time when the job was finished.
      - `data.system.createdBy` (object)
        The service client description.
      - `data.system.createdBy.id` (string,null, required)
        The ID of service client.
      - `data.system.createdBy.name` (string,null, required)
        The name of service client.
      - `data.system.createdBy.type` (string, required)
        The type of service client.
        Enum: same as `data.system.createdBy.type` in "OffsetPagingPublishJobsResponse" (2 values)
      - `data.system.canceledBy` (object)
        The service client description.
      - `next` (string,null, required)
        Continuation token for the next page.

## Response 400 fields (application/json):

  - `type` (string,null)

  - `title` (string,null)

  - `status` (integer,null)

  - `detail` (string,null)

  - `instance` (string,null)


