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

# List Jobs by Connection ID

> List all the jobs for a given Connection.



## OpenAPI

````yaml get /provisioning/organizations/{organization_id}/connections/{connection_id}/jobs
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - description: Production API (US)
    url: https://api.leen.dev/v1
  - description: Production API (EU)
    url: https://api.eu-c1.leen.dev/v1
  - description: Production API (APAC)
    url: https://api.ap-se2.leen.dev/v1
security: []
paths:
  /provisioning/organizations/{organization_id}/connections/{connection_id}/jobs:
    get:
      tags:
        - provisioning
      summary: List Jobs by Connection ID
      description: List all the jobs for a given Connection.
      operationId: list_connection_jobs
      parameters:
        - in: path
          name: connection_id
          required: true
          schema:
            format: uuid
            title: Connection Id
            type: string
        - in: path
          name: organization_id
          required: true
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            title: Organization Id
        - in: query
          name: limit
          required: false
          schema:
            default: 100
            minimum: 0
            title: Limit
            type: integer
        - in: query
          name: offset
          required: false
          schema:
            default: 0
            minimum: 0
            title: Offset
            type: integer
        - description: Partial or exact match for Connection Job ID
          in: query
          name: id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Partial or exact match for Connection Job ID
            title: Id
        - description: Connection Job Status filter, comma separated
          in: query
          name: status
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Connection Job Status filter, comma separated
            examples:
              - running,success
            title: Status
        - description: >-
            Datetime filter, only return jobs which started at this datetime or
            after
          in: query
          name: started_at_since
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            description: >-
              Datetime filter, only return jobs which started at this datetime
              or after
            examples:
              - '2021-01-01T00:00:00+00:00'
            title: Started At Since
        - in: header
          name: X-CONNECTION-INVITE-TOKEN
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Connection-Invite-Token
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OffsetPaginatedResponse_ConnectionJobRespModel_
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - API-Key: []
components:
  schemas:
    OffsetPaginatedResponse_ConnectionJobRespModel_:
      properties:
        count:
          description: Number of items return in the response
          title: Count
          type: integer
        items:
          description: The records on this page.
          items:
            $ref: '#/components/schemas/ConnectionJobRespModel'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total number of items that can be returned
          title: Total
      required:
        - count
        - items
      title: OffsetPaginatedResponse[ConnectionJobRespModel]
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ConnectionJobRespModel:
      properties:
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Why the run failed, in one line. Null unless `status` is `FAILED`.
            For per-operation detail, read `state`.
          title: Failure Reason
        finished_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the run ended, successfully or not. Null while it is running.
          title: Finished At
        id:
          description: Leen's identifier for this sync run.
          format: uuid
          title: Id
          type: string
        options:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            The options the run was started with, projected against the fields
            this vendor declares. Null when it ran with defaults.
          title: Options
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the run began. Null while it is still queued.
          title: Started At
        state:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            What the run recorded: the last successful run time per data type,
            whether it succeeded overall, and any per-operation failure reasons.
            Null until the run finishes.
          title: State
        status:
          description: >-
            Where the run got to. `QUEUED` before it starts, `RUNNING` while it
            does, then `SUCCESS` or `FAILED`.
          enum:
            - QUEUED
            - RUNNING
            - SUCCESS
            - FAILED
          title: Status
          type: string
        type:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            What triggered the run. `SCHEDULED` for the refresh interval,
            `ON_DEMAND` for one you asked for.
          title: Type
      required:
        - id
        - status
      title: ConnectionJob
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    API-Key:
      in: header
      name: X-API-KEY
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.