> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datanumia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# get the list of jobs

> Returns the list of jobs that can be requested
Results are paginated.




## OpenAPI

````yaml /api-reference/persons-sites-service-offers.yaml get /smt-jobs
openapi: 3.0.3
info:
  title: Person, Site and Service Offer lifecycle
  description: >
    This API manages the lifecycle of persons, sites and service offers as
    described
    [here](https://datanumia.stoplight.io/docs/DatanumiaHome/YXBpOjQ0ODQzMjMy-person-site-and-service-offer-lifecycle)

    Please refer to the following link to get a better understanding of the
    [core
    concepts](https://datanumia.stoplight.io/docs/DatanumiaHome/ZG9jOjM4MDg2NDE5-core-concepts)
    of the Home platform.


    <b>Important notice with regard to those APIs:</b>

    - When subscribing or deleting multiple subscribed offers on a site or
    subscribed offers on multiple sites please provide all sites and subscribe
    offer data in a single POST subscriptions call.

    - They are idempotent. Launching multiple times the same operation will lead
    to the same result

    - They require a complete snapshot of all the objects involved in the
    operation. Those new objects overwrite the existing one. In other words,
    missing properties will be considered empty or null when operations will be
    executed on existing person/site objects
  termsOfService: TODO
  contact:
    email: api@datanumia.com
  version: 2.0.0
servers:
  - url: https://api.home.datanumia.com/api/v2
    description: Production Server
security: []
paths:
  /smt-jobs:
    get:
      tags:
        - bulk mode smt
      summary: get the list of jobs
      description: |
        Returns the list of jobs that can be requested
        Results are paginated.
      operationId: getCustomerJobs
      parameters:
        - name: page
          in: query
          description: the page to be fetched. Default value is 0
          example: 0
          schema:
            type: integer
        - name: size
          in: query
          description: the page size to be fetched. Default value is 100. Max value is 100
          example: 0
          schema:
            type: integer
            default: 100
            maximum: 100
        - name: state
          in: query
          description: the current state of the jobs be fetched
          example:
            - DONE
            - ERROR
          schema:
            type: array
            items:
              type: string
              enum:
                - ERROR
                - DONE
                - IN_PROGRESS
                - SUBMITTED
                - TIMEOUT
        - name: beginTs
          in: query
          description: >
            Define the start timestamp for the range of jobs. Jobs objects
            having their state updated within the range are returned.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date'T'partial-time'Z'


            Default is now -7 days. Period between beginTs and endTs is at most
            30 days.
          schema:
            type: string
            format: date-time
          example: '2021-07-21T17:32:28Z'
        - name: endTs
          in: query
          description: >
            Define the end timestamp for the range of jobs. Jobs objects having
            their state updated within the range are returned.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date'T'partial-time'Z'


            Default is now. Period between beginTs and endTs is at most 30 days.
          schema:
            type: string
            format: date-time
          example: '2021-08-21T17:32:28Z'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobsList'
        '400':
          description: Functional Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errorCode: INVALID_AUTHORIZATION_HEADER_VALUE
                errorDescription: The Authorization header is invalid
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errorCode: ACCESS_DENIED
                errorDescription: >-
                  The Authorization token does not have permission to the
                  resource
        '500':
          description: Server error
          content: {}
      security:
        - Bearer:
            - home:referential:smt-jobs:read
components:
  schemas:
    JobsList:
      required:
        - page
        - _links
        - _embedded
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/JobsListLinks'
        page:
          $ref: '#/components/schemas/Page'
        _embedded:
          $ref: '#/components/schemas/JobsListEmbedded'
    ErrorResponse:
      required:
        - errorCode
        - errorDescription
      type: object
      properties:
        errorCode:
          description: The error code. Refer to the table bellow
          type: string
        errorDescription:
          type: string
          description: The error description
      description: ErrorResponse
    JobsListLinks:
      required:
        - first
        - prev
        - self
        - next
        - last
      type: object
      properties:
        first:
          $ref: '#/components/schemas/JobsListLinkFirst'
        prev:
          $ref: '#/components/schemas/JobsListLinkPrev'
        self:
          $ref: '#/components/schemas/JobsListLinkSelf'
        next:
          $ref: '#/components/schemas/JobsListLinkNext'
        last:
          $ref: '#/components/schemas/JobsListLinkLast'
    Page:
      required:
        - size
        - totalElements
        - totalPages
        - number
      type: object
      properties:
        totalElements:
          type: integer
          description: number of items in the result
          example: 122
        totalPages:
          type: integer
          description: number of pages in the result
          example: 2
        number:
          type: integer
          description: current page returned
          example: 1
        size:
          type: integer
          description: page size
          example: 100
    JobsListEmbedded:
      required:
        - jobs
      type: object
      properties:
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/JobEmbeddedResponse'
    JobsListLinkFirst:
      required:
        - href
      type: object
      properties:
        href:
          type: string
          example: >-
            https://<DATANUMIA_ROOT_URL>/smt-jobs?page=0&beginTs=2021-07-21T00:00:00Z&endTs=2021-07-28T00:00:00Z
    JobsListLinkPrev:
      required:
        - href
      type: object
      properties:
        href:
          type: string
          example: >-
            https://<DATANUMIA_ROOT_URL>/smt-jobs?page=0&beginTs=2021-07-21T00:00:00Z&endTs=2021-07-28T00:00:00Z
    JobsListLinkSelf:
      required:
        - href
      type: object
      properties:
        href:
          type: string
          example: >-
            https://<DATANUMIA_ROOT_URL>/smt-jobs?page=1&beginTs=2021-07-21T00:00:00Z&endTs=2021-07-28T00:00:00Z
    JobsListLinkNext:
      required:
        - href
      type: object
      properties:
        href:
          type: string
          example: >-
            https://<DATANUMIA_ROOT_URL>/smt-jobs?page=1&beginTs=2021-07-21T00:00:00Z&endTs=2021-07-28T00:00:00Z
    JobsListLinkLast:
      required:
        - href
      type: object
      properties:
        href:
          type: string
          example: >-
            https://<DATANUMIA_ROOT_URL>/smt-jobs?page=1&beginTs=2021-07-21T00:00:00Z&endTs=2021-07-28T00:00:00Z
    JobEmbeddedResponse:
      required:
        - archive
        - state
      type: object
      properties:
        archive:
          type: string
          description: |
            Name of the archive associated with this job execution.
          example: myOperationsArchive.tar.gz
        state:
          $ref: '#/components/schemas/JobEmbeddedResponseState'
        report:
          $ref: '#/components/schemas/JobEmbeddedReport'
        _links:
          $ref: '#/components/schemas/JobLinks'
    JobEmbeddedResponseState:
      type: object
      required:
        - current
        - ts
      properties:
        current:
          type: string
          description: |
            current state of the bulk job.
          enum:
            - ERROR
            - DONE
            - IN_PROGRESS
            - SUBMITTED
            - TIMEOUT
          example: DONE
        ts:
          type: string
          description: >
            Timestamp of the state  change in Home as defined by RFC 3339,
            section 5.6 using the following format: full-date'T'partial-time'Z'
          format: date-time
          example: '2017-07-21T17:32:28Z'
    JobEmbeddedReport:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDescriptionJob'
        overview:
          $ref: '#/components/schemas/ExecutionReportOverview'
    JobLinks:
      required:
        - self
      type: object
      properties:
        self:
          $ref: '#/components/schemas/JobLinkSelf'
    ErrorDescriptionJob:
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_ARCHIVE_FORMAT
        message:
          type: string
    ExecutionReportOverview:
      properties:
        nbOperationsTotal:
          type: integer
          description: |
            number of executed smt operations
          example: 146
        nbOperationsOK:
          type: integer
          description: |
            number of successful smt operations
          example: 146
        nbOperationsKO:
          type: integer
          description: |
            number of failed smt operations
          example: 0
    JobLinkSelf:
      required:
        - href
      type: object
      properties:
        href:
          type: string
          example: https://<DATANUMIA_ROOT_URL>/smt-jobs/{job-id}
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````