Skip to main content
POST
Create a job

Authorizations

Authorization
string
header
required

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" '

Path Parameters

environmentId
string<uuid>
required

Environment ID

Body

application/json
name
string
required

name is case insensitive

healthchecks
object
required
description
string
cpu
integer
default:500

unit is millicores (m). 1000m = 1 cpu

Example:

1250

memory
integer
default:512

unit is MB. 1024 MB = 1GB

Example:

1024

gpu
integer
default:0
Required range: x >= 0
Example:

1

max_nb_restart
integer
default:0

Maximum number of restart allowed before the job is considered as failed 0 means that no restart/crash of the job is allowed

Required range: x >= 0
max_duration_seconds
integer

Maximum number of seconds allowed for the job to run before killing it and mark it as failed

Required range: x >= 0
auto_preview
boolean

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 | null

Port where to run readiness and liveliness probes checks. The port will not be exposed externally

Required range: x >= 1
source
object
schedule
object

If you want to define a Cron job, only the cronjob property must be filled
A Lifecycle job should contain at least one property on_XXX among the 3 properties: on_start, on_stop, on_delete

auto_deploy
boolean | null

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

annotations_groups
object[]
labels_groups
object[]
icon_uri
string<uri>

Icon URI representing the job.

Response

Create job

id
string<uuid>
required
read-only
created_at
string<date-time>
required
read-only
environment
object
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

Example:

16000

maximum_memory
integer
required

Maximum memory that can be allocated to the job based on organization cluster configuration. unit is MB. 1024 MB = 1GB

Example:

16384

maximum_gpu
integer
default:0
required

Maximum memory that can be allocated to the job based on organization cluster configuration. unit is MB. 1024 MB = 1GB

Required range: x >= 0
Example:

2

name
string
required

name is case insensitive

cpu
integer
required

unit is millicores (m). 1000m = 1 cpu

Example:

1250

memory
integer
required

unit is MB. 1024 MB = 1GB

Example:

1024

gpu
integer
default:0
required
Required range: x >= 0
Example:

1

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.

source
object
required
healthchecks
object
required
icon_uri
string<uri>
required

Icon URI representing the job.

service_type
enum<string>
required

type of the service (application, database, job, ...)

Available options:
APPLICATION,
DATABASE,
CONTAINER,
JOB,
HELM,
TERRAFORM,
ARGOCD_APP
job_type
enum<string>
required

type of job

Available options:
LIFECYCLE,
CRON
schedule
object
required
updated_at
string<date-time>
read-only
description
string
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

Required range: x >= 0
max_duration_seconds
integer

Maximum number of seconds allowed for the job to run before killing it and mark it as failed

Required range: x >= 0
port
integer | null

Port where to run readiness and liveliness probes checks. The port will not be exposed externally

Required range: x >= 1
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

annotations_groups
object[]
labels_groups
object[]