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

# Get job by ID



## OpenAPI

````yaml /api-reference/openapi.yaml get /job/{jobId}
openapi: 3.0.0
info:
  version: 1.0.4
  title: Qovery API
  description: >
    - Qovery is the fastest way to deploy your full-stack apps on any Cloud
    provider.

    - ℹ️ The API is stable and still in development.
  contact:
    name: Qovery Product Team
    url: https://www.qovery.com
    email: support+api+documentation@qovery.com
  x-logo:
    url: https://console.qovery.com/assets/logos/logo-white.svg
    altText: Qovery
servers:
  - url: https://api.qovery.com
security:
  - bearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: Account
  - name: Account Info
  - name: Alert Receivers
  - name: Alert Rules
  - name: Admin
  - name: ArgoCD
  - name: Application
  - name: Application Actions
  - name: Application Configuration
  - name: Application Database
  - name: Application Deployment Restriction
  - name: Application Deployment History
  - name: Application Environment Variable
  - name: Application Logs
  - name: Application Main Calls
  - name: Application Secret
  - name: Application Annotations Group
  - name: Applications
  - name: AutoscalingPolicy
  - name: Container
  - name: Container Actions
  - name: Container Configuration
  - name: Container Database
  - name: Container Deployment History
  - name: Container Environment Variable
  - name: Container Logs
  - name: Container Main Calls
  - name: Container Registry
  - name: Container Secret
  - name: Container Annotations Group
  - name: Containers
  - name: Deployment Stage Main Calls
  - name: Job
  - name: Job Actions
  - name: Job Configuration
  - name: Job Database
  - name: Job Deployment Restriction
  - name: Job Deployment History
  - name: Job Environment Variable
  - name: Job Logs
  - name: Job Main Calls
  - name: Job Registry
  - name: Job Secret
  - name: Job Annotations Group
  - name: Jobs
  - name: KedaTriggerAuthentication
  - name: Helm
  - name: Helm Actions
  - name: Helm Configuration
  - name: Helm Database
  - name: Helm Deployment Restriction
  - name: Helm Deployment History
  - name: Helm Logs
  - name: Helm Main Calls
  - name: Helm Repository
  - name: Helms
  - name: Backups
  - name: Billing
  - name: Cloud Provider
  - name: Cloud Provider Credentials
  - name: Clusters
  - name: Custom Domain
  - name: Container Custom Domain
  - name: Database
  - name: Database Actions
  - name: Database Application
  - name: Database Container
  - name: Database Deployment History
  - name: Database Main Calls
  - name: Database Annotations Group
  - name: Databases
  - name: Environment
  - name: Environment Actions
  - name: Environment Deployment History
  - name: Environment Deployment Rule
  - name: Environment Logs
  - name: Environment Main Calls
  - name: Environment Secret
  - name: Environment Variable
  - name: Environments
  - name: Git
  - name: Github App
  - name: Git repositories
  - name: Members
  - name: Organization
  - name: Organization Account Git Repositories
  - name: Organization Cluster Lock
  - name: Organization Main Calls
  - name: Organization Custom Role
  - name: Organization Event
  - name: Organization Api Token
  - name: Organization Webhook
  - name: Organization Annotations Group
  - name: Organization Labels Group
  - name: Organization Enterprise Connection
  - name: Project
  - name: Project Deployment Rule
  - name: Project Environment Variable
  - name: Project Main Calls
  - name: Project Secret
  - name: Projects
  - name: Referral & Rewards
  - name: Terraforms
  - name: Terraform Main Calls
  - name: Terraform Resources
  - name: Terraform Deployment History
  - name: Terraform Deployment Restriction
  - name: Container Registries
  - name: Helm Repositories
  - name: User Sign Up
  - name: Variable Main Calls
  - name: Helm Custom Domain
  - name: Lifecycle Template Main Calls
paths:
  /job/{jobId}:
    get:
      tags:
        - Job Main Calls
      summary: Get job by ID
      operationId: getJob
      parameters:
        - $ref: '#/components/parameters/jobId'
      responses:
        '200':
          description: Get job by ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    jobId:
      name: jobId
      in: path
      description: Job ID
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    JobResponse:
      oneOf:
        - $ref: '#/components/schemas/LifecycleJobResponse'
        - $ref: '#/components/schemas/CronJobResponse'
      discriminator:
        propertyName: job_type
        mapping:
          LIFECYCLE:
            $ref: '#/components/schemas/LifecycleJobResponse'
          CRON:
            $ref: '#/components/schemas/CronJobResponse'
    LifecycleJobResponse:
      allOf:
        - $ref: '#/components/schemas/BaseJobResponse'
        - type: object
          required:
            - job_type
            - schedule
          properties:
            job_type:
              $ref: '#/components/schemas/JobTypeEnum'
            schedule:
              type: object
              properties:
                on_start:
                  type: object
                  properties:
                    arguments:
                      type: array
                      items:
                        type: string
                    entrypoint:
                      type: string
                      description: optional entrypoint when launching container
                on_stop:
                  type: object
                  properties:
                    arguments:
                      type: array
                      items:
                        type: string
                    entrypoint:
                      type: string
                      description: optional entrypoint when launching container
                on_delete:
                  type: object
                  properties:
                    arguments:
                      type: array
                      items:
                        type: string
                    entrypoint:
                      type: string
                      description: optional entrypoint when launching container
                lifecycle_type:
                  $ref: '#/components/schemas/JobLifecycleTypeEnum'
            annotations_groups:
              $ref: '#/components/schemas/OrganizationAnnotationsGroupResponseList'
            labels_groups:
              $ref: '#/components/schemas/OrganizationLabelsGroupResponseList'
      title: ''
    CronJobResponse:
      allOf:
        - $ref: '#/components/schemas/BaseJobResponse'
        - type: object
          required:
            - job_type
            - schedule
          properties:
            job_type:
              $ref: '#/components/schemas/JobTypeEnum'
            schedule:
              type: object
              required:
                - cronjob
              properties:
                cronjob:
                  type: object
                  required:
                    - timezone
                    - scheduled_at
                  properties:
                    arguments:
                      type: array
                      items:
                        type: string
                    entrypoint:
                      type: string
                      description: optional entrypoint when launching container
                    timezone:
                      type: string
                      description: tz identifier at which the schedule at will be executed
                    scheduled_at:
                      type: string
                      format: cron
                      description: >
                        Can only be set if the event is CRON.  

                        Represent the cron format for the job schedule without
                        seconds.  

                        For example: `* * * * *` represent the cron to launch
                        the job every minute.  

                        See https://crontab.guru/ to WISIWIG interface.  

                        Timezone is UT
            annotations_groups:
              $ref: '#/components/schemas/OrganizationAnnotationsGroupResponseList'
            labels_groups:
              $ref: '#/components/schemas/OrganizationLabelsGroupResponseList'
    BaseJobResponse:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          required:
            - environment
            - maximum_cpu
            - maximum_memory
            - maximum_gpu
            - name
            - cpu
            - memory
            - gpu
            - auto_preview
            - source
            - healthchecks
            - icon_uri
            - service_type
          properties:
            environment:
              $ref: '#/components/schemas/ReferenceObject'
            maximum_cpu:
              type: integer
              description: >-
                Maximum cpu that can be allocated to the job based on
                organization cluster configuration. unit is millicores (m).
                1000m = 1 cpu
              example: 16000
            maximum_memory:
              type: integer
              description: >-
                Maximum memory that can be allocated to the job based on
                organization cluster configuration. unit is MB. 1024 MB = 1GB
              example: 16384
            maximum_gpu:
              type: integer
              description: >-
                Maximum memory that can be allocated to the job based on
                organization cluster configuration. unit is MB. 1024 MB = 1GB
              x-stoplight:
                id: 7o0e6wrgnxgcc
              minimum: 0
              default: 0
              example: 2
            name:
              type: string
              description: name is case insensitive
            description:
              type: string
            cpu:
              type: integer
              description: unit is millicores (m). 1000m = 1 cpu
              example: 1250
            memory:
              type: integer
              description: unit is MB. 1024 MB = 1GB
              example: 1024
            gpu:
              type: integer
              x-stoplight:
                id: 50sj2wtkdypgg
              default: 0
              minimum: 0
              example: 1
            max_nb_restart:
              type: integer
              minimum: 0
              description: >
                Maximum number of restart allowed before the job is considered
                as failed

                0 means that no restart/crash of the job is allowed
            max_duration_seconds:
              type: integer
              minimum: 0
              description: >
                Maximum number of seconds allowed for the job to run before
                killing it and mark it as failed
            auto_preview:
              type: boolean
              description: >
                Indicates if the 'environment preview option' is enabled for
                this container.  

                If enabled, a preview environment will be automatically cloned
                when `/preview` endpoint is called.  

                If not specified, it takes the value of the `auto_preview`
                property from the associated environment.
            port:
              type: integer
              minimum: 1
              description: >-
                Port where to run readiness and liveliness probes checks. The
                port will not be exposed externally
              default: null
              nullable: true
            source:
              nullable: false
              oneOf:
                - required:
                    - image
                  properties:
                    image:
                      $ref: '#/components/schemas/ContainerSource'
                  type: object
                - required:
                    - docker
                  properties:
                    docker:
                      $ref: '#/components/schemas/JobSourceDockerResponse'
                  type: object
            healthchecks:
              $ref: '#/components/schemas/Healthcheck'
            auto_deploy:
              type: boolean
              description: >
                Specify if the job will be automatically updated after receiving
                a new image tag or a new commit according to the source type. 

                The new image tag shall be communicated via the "Auto Deploy
                job" endpoint
                https://api-doc.qovery.com/#tag/Jobs/operation/autoDeployJobEnvironments
            icon_uri:
              type: string
              format: uri
              description: Icon URI representing the job.
              x-stoplight:
                id: p1secr7kxozsd
            service_type:
              $ref: '#/components/schemas/ServiceTypeEnum'
    JobTypeEnum:
      type: string
      description: type of job
      enum:
        - LIFECYCLE
        - CRON
    JobLifecycleTypeEnum:
      title: JobLifecycleTypeEnum
      x-stoplight:
        id: tz1t23a291l51
      enum:
        - GENERIC
        - TERRAFORM
        - CLOUDFORMATION
    OrganizationAnnotationsGroupResponseList:
      type: array
      items:
        $ref: '#/components/schemas/OrganizationAnnotationsGroupResponse'
    OrganizationLabelsGroupResponseList:
      type: array
      items:
        $ref: '#/components/schemas/OrganizationLabelsGroupResponse'
      title: ''
    Base:
      type: object
      required:
        - id
        - created_at
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    ReferenceObject:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
    ContainerSource:
      type: object
      required:
        - image_name
        - tag
        - registry
      properties:
        image_name:
          type: string
          description: >
            The image name pattern differs according to chosen container
            registry provider:

            * `ECR`: `repository`

            * `SCALEWAY_CR`: `namespace/image`

            * `DOCKER_HUB`: `image` or `repository/image`

            * `PUBLIC_ECR`: `registry_alias/repository`
        tag:
          type: string
          description: tag of the image container
        registry_id:
          type: string
          description: tag of the image container
        registry:
          $ref: '#/components/schemas/ContainerRegistryProviderDetailsResponse'
    JobSourceDockerResponse:
      title: JobSourceDockerResponse
      x-stoplight:
        id: s59m8wajnieny
      type: object
      properties:
        git_repository:
          $ref: '#/components/schemas/ApplicationGitRepository'
        dockerfile_path:
          type: string
          x-stoplight:
            id: 72djyl4mjhxny
          description: >-
            The path of the associated Dockerfile. Only if you are using
            build_mode = DOCKER
          nullable: true
        dockerfile_raw:
          type: string
          x-stoplight:
            id: 7s4l0qg285y48
          description: >-
            The content of your dockerfile if it is not stored inside your git
            repository
          nullable: true
        docker_target_build_stage:
          type: string
          x-stoplight:
            id: 8o1faq3bgz92i
          description: The target build stage in the Dockerfile to build
          nullable: true
    Healthcheck:
      type: object
      nullable: false
      properties:
        readiness_probe:
          $ref: '#/components/schemas/Probe'
        liveness_probe:
          $ref: '#/components/schemas/Probe'
    ServiceTypeEnum:
      type: string
      x-stoplight:
        id: d66063cd29913
      description: type of the service (application, database, job, ...)
      enum:
        - APPLICATION
        - DATABASE
        - CONTAINER
        - JOB
        - HELM
        - TERRAFORM
        - ARGOCD_APP
    OrganizationAnnotationsGroupResponse:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          required:
            - name
            - annotations
            - scopes
          properties:
            name:
              type: string
            annotations:
              type: array
              items:
                $ref: '#/components/schemas/Annotation'
            scopes:
              type: array
              items:
                $ref: '#/components/schemas/OrganizationAnnotationsGroupScopeEnum'
    OrganizationLabelsGroupResponse:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          required:
            - name
            - labels
          properties:
            name:
              type: string
            labels:
              type: array
              items:
                $ref: '#/components/schemas/Label'
      title: ''
    ContainerRegistryProviderDetailsResponse:
      type: object
      required:
        - id
        - name
        - url
        - kind
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        url:
          type: string
          description: URL of the container registry
        kind:
          $ref: '#/components/schemas/ContainerRegistryKindEnum'
    ApplicationGitRepository:
      type: object
      required:
        - provider
        - owner
        - name
        - url
      properties:
        has_access:
          type: boolean
        provider:
          $ref: '#/components/schemas/GitProviderEnum'
        owner:
          type: string
          example: John Doe
        url:
          type: string
          format: uri
        name:
          type: string
          description: repository name
          example: simple-node-app
        branch:
          type: string
        root_path:
          type: string
        deployed_commit_id:
          type: string
          description: Git commit ID corresponding to the deployed version of the app
        deployed_commit_date:
          type: string
          readOnly: true
          format: date-time
          description: Git commit date corresponding to the deployed version of the app
        deployed_commit_contributor:
          type: string
          description: Git commit user corresponding to the deployed version of the app
        deployed_commit_tag:
          type: string
          example: v1.0.1
        git_token_id:
          type: string
          nullable: true
        git_token_name:
          type: string
          nullable: true
      title: ''
    Probe:
      type: object
      nullable: true
      properties:
        type:
          type: object
          properties:
            tcp:
              type: object
              nullable: true
              properties:
                port:
                  type: integer
                host:
                  type: string
                  default: null
                  nullable: true
            http:
              type: object
              nullable: true
              properties:
                path:
                  type: string
                  default: /
                scheme:
                  type: string
                  default: HTTP
                port:
                  type: integer
            exec:
              type: object
              nullable: true
              description: >-
                Execute a command inside the container. The probe succeeds if
                the command exits with status code 0.
              properties:
                command:
                  type: array
                  description: >-
                    Command to execute inside the container, specified as an
                    array of strings. The first element is the executable,
                    followed by its arguments. Example: ["sh", "-c", "test -f
                    /tmp/healthy"]
                  example:
                    - sh
                    - '-c'
                    - test -f /tmp/healthy
                  items:
                    type: string
                  minItems: 1
            grpc:
              type: object
              nullable: true
              properties:
                service:
                  type: string
                  default: null
                  nullable: true
                port:
                  type: integer
        initial_delay_seconds:
          type: integer
          default: 30
        period_seconds:
          type: integer
          default: 10
        timeout_seconds:
          type: integer
          default: 5
        success_threshold:
          type: integer
          default: 1
        failure_threshold:
          type: integer
          default: 9
    Annotation:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
        value:
          type: string
    OrganizationAnnotationsGroupScopeEnum:
      type: string
      description: Annotations Group Scope
      enum:
        - DEPLOYMENTS
        - STATEFUL_SETS
        - SERVICES
        - INGRESS
        - GATEWAY_API_ROUTES
        - HPA
        - PODS
        - SECRETS
        - JOBS
        - CRON_JOBS
    Label:
      type: object
      required:
        - key
        - value
        - propagate_to_cloud_provider
      properties:
        key:
          type: string
        value:
          type: string
        propagate_to_cloud_provider:
          type: boolean
    ContainerRegistryKindEnum:
      type: string
      enum:
        - ECR
        - SCALEWAY_CR
        - DOCKER_HUB
        - GITHUB_CR
        - GITHUB_ENTERPRISE_CR
        - GITLAB_CR
        - PUBLIC_ECR
        - DOCR
        - GENERIC_CR
        - GCP_ARTIFACT_REGISTRY
        - AZURE_CR
      description: The type of your container registry
    GitProviderEnum:
      type: string
      enum:
        - BITBUCKET
        - GITHUB
        - GITLAB
  responses:
    '401':
      description: Access token is missing or invalid
    '403':
      description: Access forbidden
    '404':
      description: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT tokens should be used with OIDC account (human to machine). JWT
        tokens used by the Qovery console to communicate with the API have a
        TTL. Curl Example ' curl https://console.qovery.com/organization -H
        "Authorization: Bearer $qovery_token" '
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token API are generated by Qovery to manage machine to machine
        interaction and do not have a TTL. Curl Example ' curl
        https://console.qovery.com/organization -H "Authorization: Token
        $qovery_token" '

````