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

# List jobs

> List jobs given a `next` or `previous` cursor and a limit. If cursor is not provided you will get the beginning of the search set



## OpenAPI

````yaml /openAPI/openapi-20240301.json get /jobs
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /jobs:
    get:
      tags:
        - Jobs
      summary: List jobs
      description: >-
        List jobs given a `next` or `previous` cursor and a limit. If cursor is
        not provided you will get the beginning of the search set
      operationId: List-jobs
      parameters:
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The cursor indicating a unique set of results - this should be
              auto generated and you get it from the `next` and `previous`
              fields of the response
            examples:
              - V2VsbCBhcmV1IGN1cmlvdxM=
            title: Cursor
          description: >-
            The cursor indicating a unique set of results - this should be auto
            generated and you get it from the `next` and `previous` fields of
            the response
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: The number of results to return - defaults to 10
            examples:
              - 10
            title: Limit
          description: The number of results to return - defaults to 10
        - name: sort_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - sort_key=id
            title: Sort Key
        - name: sort_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - sort_key=asc
            title: Sort Type
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: order
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            examples:
              - order=created_at
            title: Order
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Id
        - name: id__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Id  In
        - name: id__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Id  Isnull
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name
        - name: name__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name  Ilike
        - name: name__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name  Like
        - name: name__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name  In
        - name: name__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Name  Isnull
        - name: description
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Description
        - name: description__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Description  Ilike
        - name: description__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Description  Like
        - name: description__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Description  In
        - name: description__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Description  Isnull
        - name: resource
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Resource
        - name: resource__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Resource  In
        - name: resource__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Resource  Isnull
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status  In
        - name: status__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Status  Isnull
        - name: job_type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/JobType'
              - type: 'null'
            title: Job Type
        - name: job_type__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Job Type  In
        - name: job_type__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Job Type  Isnull
        - name: operation_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Operation Type
        - name: operation_type__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Operation Type  In
        - name: operation_type__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Operation Type  Isnull
        - name: created_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At
        - name: created_at__neq
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Neq
        - name: created_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Gt
        - name: created_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Gte
        - name: created_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Lt
        - name: created_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created At  Lte
        - name: created_at__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Created At  Isnull
        - name: created_at__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Created At  In
        - name: is_default
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Default
        - name: file_path
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: File Path
        - name: file_path__ilike
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: File Path  Ilike
        - name: file_path__like
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: File Path  Like
        - name: file_path__in
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: File Path  In
        - name: file_path__isnull
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: File Path  Isnull
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResults_JobResponseSchema_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    JobType:
      type: string
      enum:
        - manual
        - automated
      title: JobType
    PaginatedResults_JobResponseSchema_:
      properties:
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
          description: The cursor for the next page of results
          examples:
            - V2VsbCBhcmV1IGN1cmlvdxM=
        previous:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous
          description: The cursor for the previous page of results
          examples:
            - GmBsbCBhcmV1IGN1cmlvdxM=
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: The total count of rows
        results:
          items:
            $ref: '#/components/schemas/JobResponseSchema'
          type: array
          title: Results
          description: The results for the current page
      type: object
      required:
        - results
      title: PaginatedResults[JobResponseSchema]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Job Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Job name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Job Description
        job_type:
          anyOf:
            - $ref: '#/components/schemas/JobType'
            - type: 'null'
          description: Job Type Manual/Automated
        job_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Job Data
          description: Job Data
        status:
          $ref: '#/components/schemas/JobStatus'
          description: Job status
        resource:
          $ref: '#/components/schemas/Resource'
          description: Job Resource
        file_path:
          anyOf:
            - type: string
            - type: 'null'
          title: File Path
          description: Job file download url
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Job Created dated
        output_log:
          anyOf:
            - $ref: '#/components/schemas/OutputLog'
            - type: 'null'
          description: Job Outcomes Result
        execution_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Execution Params
          description: Job Execution Params
      type: object
      required:
        - id
        - status
        - resource
      title: JobResponseSchema
      description: Create Job Response Schema
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    JobStatus:
      type: string
      enum:
        - pending
        - in_progress
        - success
        - partial_success
        - failed
      title: JobStatus
    Resource:
      type: string
      enum:
        - contracts
        - invoices
        - sandbox
        - usage_report
        - custom_email
        - customer
        - monitoring
        - payment
        - journal_entry
        - credit_note
        - revenue_posting
        - entitlements
        - account_balance
        - performance_obligation
        - revenue_recognition
        - organisation
        - revenue_contracts
      title: Resource
    OutputLog:
      properties:
        failure_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Failure Count
          description: Failure Count
          default: 0
        skipped_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Skipped Count
          description: Skipped Count
          default: 0
        success_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Success Count
          description: Success Count
          default: 0
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: Total Count
          default: 0
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
          description: Reason for Job Failure
        in_progress_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: In Progress Count
          description: In Progress Count
          default: 0
      type: object
      title: OutputLog
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    OrganisationAuth:
      type: apiKey
      in: header
      name: organisation
      x-default: <your-organisation-id>

````