---
title: "List jobs"
method: GET
path: "/environment/{environmentId}/job"
tags: ["Jobs"]
---

# List jobs

`GET /environment/{environmentId}/job`

## Request

- Base URL: `https://api.qovery.com`
- URL: `https://api.qovery.com/environment/{environmentId}/job`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/qovery/apis/qovery-api/docs/environment/:environmentId/job/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `environmentId` string, uuid, required

## Query parameters

- `toUpdate` boolean

## Response `200`

List jobs

- JobResponseList
  - `results` JobResponse[]
    - union
      - LifecycleJobResponse
        - `id` string, uuid, required
        - `created_at` string, date-time, required
        - `updated_at` string, date-time
        - `environment` ReferenceObject, required
          - `id` string, uuid, required
        - `maximum_cpu` integer, required: Maximum cpu that can be allocated to the job based on organization cluster configuration. unit is millicores (m). 1000m = 1 cpu
        - `maximum_memory` integer, required: Maximum memory that can be allocated to the job based on organization cluster configuration. unit is MB. 1024 MB = 1GB
        - `maximum_gpu` integer, required: Maximum memory that can be allocated to the job based on organization cluster configuration. unit is MB. 1024 MB = 1GB
        - `name` string, required: name is case insensitive
        - `description` string
        - `cpu` integer, required: unit is millicores (m). 1000m = 1 cpu
        - `memory` integer, required: unit is MB. 1024 MB = 1GB
        - `gpu` integer, required
        - `max_nb_restart` integer: 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` integer: Maximum number of seconds allowed for the job to run before killing it and mark it as failed
        - `auto_preview` boolean, required: 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` integer, nullable: Port where to run readiness and liveliness probes checks. The port will not be exposed externally
        - `source` union, required
          - object
            - `image` ContainerSource, required
              - …
          - object
            - `docker` JobSourceDockerResponse, required
              - …
        - `healthchecks` Healthcheck, required
          - `readiness_probe` Probe, nullable
            - `type` object
              - …
            - `initial_delay_seconds` integer
            - `period_seconds` integer
            - `timeout_seconds` integer
            - `success_threshold` integer
            - `failure_threshold` integer
          - `liveness_probe` Probe, nullable
            - `type` object
              - …
            - `initial_delay_seconds` integer
            - `period_seconds` integer
            - `timeout_seconds` integer
            - `success_threshold` integer
            - `failure_threshold` integer
        - `auto_deploy` boolean: 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` string, uri, required: Icon URI representing the job.
        - `service_type` 'APPLICATION' | 'DATABASE' | 'CONTAINER' | 'JOB' | 'HELM' | 'TERRAFORM', required: type of the service (application, database, job, ...)
        - `job_type` 'LIFECYCLE' | 'CRON', required: type of job
        - `schedule` object, required
          - `on_start` object
            - `arguments` string[]
            - `entrypoint` string: optional entrypoint when launching container
          - `on_stop` object
            - `arguments` string[]
            - `entrypoint` string: optional entrypoint when launching container
          - `on_delete` object
            - `arguments` string[]
            - `entrypoint` string: optional entrypoint when launching container
          - `lifecycle_type` 'GENERIC' | 'TERRAFORM' | 'CLOUDFORMATION'
        - `annotations_groups` OrganizationAnnotationsGroupResponse[]
          - `id` string, uuid, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time
          - `name` string, required
          - `annotations` Annotation[], required
            - `key` string, required
            - `value` string, required
          - `scopes` OrganizationAnnotationsGroupScopeEnum[], required
        - `labels_groups` OrganizationLabelsGroupResponse[]
          - `id` string, uuid, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time
          - `name` string, required
          - `labels` Label[], required
            - `key` string, required
            - `value` string, required
            - `propagate_to_cloud_provider` boolean, required
      - CronJobResponse
        - `id` string, uuid, required
        - `created_at` string, date-time, required
        - `updated_at` string, date-time
        - `environment` ReferenceObject, required
          - `id` string, uuid, required
        - `maximum_cpu` integer, required: Maximum cpu that can be allocated to the job based on organization cluster configuration. unit is millicores (m). 1000m = 1 cpu
        - `maximum_memory` integer, required: Maximum memory that can be allocated to the job based on organization cluster configuration. unit is MB. 1024 MB = 1GB
        - `maximum_gpu` integer, required: Maximum memory that can be allocated to the job based on organization cluster configuration. unit is MB. 1024 MB = 1GB
        - `name` string, required: name is case insensitive
        - `description` string
        - `cpu` integer, required: unit is millicores (m). 1000m = 1 cpu
        - `memory` integer, required: unit is MB. 1024 MB = 1GB
        - `gpu` integer, required
        - `max_nb_restart` integer: 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` integer: Maximum number of seconds allowed for the job to run before killing it and mark it as failed
        - `auto_preview` boolean, required: 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` integer, nullable: Port where to run readiness and liveliness probes checks. The port will not be exposed externally
        - `source` union, required
          - object
            - `image` ContainerSource, required
              - …
          - object
            - `docker` JobSourceDockerResponse, required
              - …
        - `healthchecks` Healthcheck, required
          - `readiness_probe` Probe, nullable
            - `type` object
              - …
            - `initial_delay_seconds` integer
            - `period_seconds` integer
            - `timeout_seconds` integer
            - `success_threshold` integer
            - `failure_threshold` integer
          - `liveness_probe` Probe, nullable
            - `type` object
              - …
            - `initial_delay_seconds` integer
            - `period_seconds` integer
            - `timeout_seconds` integer
            - `success_threshold` integer
            - `failure_threshold` integer
        - `auto_deploy` boolean: 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` string, uri, required: Icon URI representing the job.
        - `service_type` 'APPLICATION' | 'DATABASE' | 'CONTAINER' | 'JOB' | 'HELM' | 'TERRAFORM', required: type of the service (application, database, job, ...)
        - `job_type` 'LIFECYCLE' | 'CRON', required: type of job
        - `schedule` object, required
          - `cronjob` object, required
            - `arguments` string[]
            - `entrypoint` string: optional entrypoint when launching container
            - `timezone` string, required: tz identifier at which the schedule at will be executed
            - `scheduled_at` string, cron, required: 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` OrganizationAnnotationsGroupResponse[]
          - `id` string, uuid, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time
          - `name` string, required
          - `annotations` Annotation[], required
            - `key` string, required
            - `value` string, required
          - `scopes` OrganizationAnnotationsGroupScopeEnum[], required
        - `labels_groups` OrganizationLabelsGroupResponse[]
          - `id` string, uuid, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time
          - `name` string, required
          - `labels` Label[], required
            - `key` string, required
            - `value` string, required
            - `propagate_to_cloud_provider` boolean, required

## Other responses

- `401`: Access token is missing or invalid
- `403`: Access forbidden
- `404`: Resource not found

---

[API](https://skmtc.dev/qovery/apis/qovery-api.md) - [All operations](https://skmtc.dev/qovery/apis/qovery-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qovery/apis/qovery-api/revisions/93c4960a44ba?raw)
