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

# Fetch jobs

> Returns a list of job details for a specified tenant. Note that this endpoint does not return raw data fetched in jobs.



## OpenAPI

````yaml get /{env_id}/{flow_id}/{tenant}/jobs
openapi: 3.1.0
info:
  title: hotglue API
  version: '1.2'
servers:
  - url: https://api.hotglue.com
security:
  - sec0: []
paths:
  /{env_id}/{flow_id}/{tenant}/jobs:
    get:
      summary: Fetch jobs
      description: >-
        Returns a list of job details for a specified tenant. Note that this
        endpoint does not return raw data fetched in jobs.
      operationId: jobs-retrieve
      parameters:
        - name: env_id
          in: path
          description: ID of environment
          schema:
            type: string
          required: true
        - name: flow_id
          in: path
          description: ID of flow
          schema:
            type: string
          required: true
        - name: tenant
          in: path
          description: ID of tenant
          schema:
            type: string
          required: true
        - name: count
          in: query
          description: Number of jobs to return (sorted chronologically)
          schema:
            type: integer
            format: int32
            default: 5
        - name: scheduled
          in: query
          description: Query for scheduled jobs only
          schema:
            type: boolean
        - name: job_type
          in: query
          description: For V2 flows, define whether you fetch "read" or "write" type jobs
          schema:
            type: string
            enum:
              - read
              - write
        - name: page
          in: query
          description: Pagination key used to fetch additional records. Defaults to page=1
          schema:
            type: integer
            format: int32
            default: 1
        - name: from
          in: query
          description: Start date filter (ISO 8601 format)
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date filter (ISO 8601 format)
          schema:
            type: string
            format: date
        - name: include_state
          in: query
          description: Include job state in response if true
          schema:
            type: boolean
            default: false
        - name: include_export_details
          in: query
          description: Include export details in response if true
          schema:
            type: boolean
            default: true
        - name: ignore_empty_jobs
          in: query
          description: Ignore jobs with no records processed
          schema:
            type: boolean
            default: false
        - name: sync_type
          in: query
          description: Type of sync
          schema:
            type: string
            enum:
              - incremental_sync
              - auto_sync
              - full_sync
              - real_time_sync
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    - job_id: lmaEbA
                      env_id: dev.example-env.hotglue.xyz
                      job_name: test_job:_V-vgdlLN
                      tenant: default
                      started_by: default
                      flow: l8odS2mce
                      s3_root: default/flows/l8odS2mce/jobs/lmaEbA
                      start_time: '2020-12-30T18:01:01.828266+00:00'
                      state: {}
                      tap: quickbooks:sandbox
                      status: ETL_FAILED
                      message: ETL error...
                      last_updated: '2020-12-30T20:31:00.081282+00:00'
              schema:
                type: array
                items:
                  type: object
                  properties:
                    job_id:
                      type: string
                      example: lmaEbA
                    env_id:
                      type: string
                      example: dev.example-env.hotglue.xyz
                    job_name:
                      type: string
                      example: test_job:_V-vgdlLN
                    tenant:
                      type: string
                      example: default
                    started_by:
                      type: string
                      example: default
                    flow:
                      type: string
                      example: l8odS2mce
                    s3_root:
                      type: string
                      example: default/flows/l8odS2mce/jobs/lmaEbA
                    start_time:
                      type: string
                      example: '2020-12-30T18:01:01.828266+00:00'
                    state:
                      type: object
                      properties: {}
                    tap:
                      type: string
                      example: quickbooks:sandbox
                    status:
                      type: string
                      example: ETL_FAILED
                      enum:
                        - JOB_CREATED
                        - DISCOVER_STARTED
                        - DISCOVER_FAILED
                        - SYNC_STARTED
                        - SYNC_FAILED
                        - SYNC_SUCCESS
                        - ETL_STARTED
                        - ETL_FAILED
                        - ETL_SUCCESS
                        - EXPORT_STARTED
                        - EXPORT_FAILED
                        - JOB_COMPLETED
                    message:
                      type: string
                      example: ETL error...
                    last_updated:
                      type: string
                      example: '2020-12-30T20:31:00.081282+00:00'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key

````