Scaleway logo
Serverless Jobs API

A job definition is a template that contains all the information necessary to run a job


List all your job definitions with filters

GET
https://api.scaleway.com
/serverless-jobs/v1alpha2/regions/{region}/job-definitions

List all your job definitions with filters › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

List all your job definitions with filters › query Parameters

page
​integer · int32
page_size
​integer · uint32
Enum values:
created_at_asc
created_at_desc
Default: created_at_asc
project_id
​string
organization_id
​string

List all your job definitions with filters › Responses


Create a new job definition in a specified Project

POST
https://api.scaleway.com
/serverless-jobs/v1alpha2/regions/{region}/job-definitions

Create a new job definition in a specified Project › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

Create a new job definition in a specified Project › Request Body

name
​string · pattern: ^[A-Za-z0-9-_]{3,50}… · required

Name of the job definition.

cpu_limit
​integer · uint32 · required

CPU limit of the job (in mvCPU).

memory_limit
​integer · uint32 · required

Memory limit of the job (in MiB).

local_storage_capacity
​integer · uint32 · required

Local storage capacity of the job (in MiB).

image_uri
​string · pattern: ^((?:(?:(?:[a-zA-Z0-… · required

Image to use for the job.

project_id
​string · required

UUID of the Scaleway Project containing the job.

startup_command
​string[]

Job startup command. Overrides the default defined in the job image. The main executable or entrypoint script to run. If both command and startup_command are provided, only startup_command will be used.

args
​string[]

Job arguments. Overrides the default arguments defined in the job image. Passed to the startup command at runtime. Environment variables and secrets can be included, and will be expanded before the arguments are used.

​object

Environment variables of the job.

description
​string

Description of the job.

job_timeout
​string | null

Timeout of the job in seconds. (in seconds)

Retry policy upon a job failure.

Create a new job definition in a specified Project › Responses

200
id
​string

UUID of the job definition. (UUID format)

name
​string

Name of the job definition.

project_id
​string

UUID of the Scaleway Project containing the job. (UUID format)

created_at
​string | null · date-time

Creation date of the job definition. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the job definition. (RFC 3339 format)

cpu_limit
​integer · uint32

CPU limit of the job (in mvCPU).

memory_limit
​integer · uint32

Memory limit of the job (in MiB).

local_storage_capacity
​integer · uint32

Local storage capacity of the job (in MiB).

image_uri
​string

Image to use for the job.

​object

Environment variables of the job.

job_timeout
​string | null

Timeout of the job in seconds. (in seconds)

description
​string

Description of the job.

Configure a cron for the job.

startup_command
​string[]

Job startup command.

args
​string[]

Job arguments passed to the startup command at runtime.

Retry behaviour in case of job failure.

region
​string

The region you want to target


Get a job definition by its unique identifier

GET
https://api.scaleway.com
/serverless-jobs/v1alpha2/regions/{region}/job-definitions/{job_definition_id}

Get a job definition by its unique identifier › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
job_definition_id
​string · required

UUID of the job definition to get.

Get a job definition by its unique identifier › Responses

200
id
​string

UUID of the job definition. (UUID format)

name
​string

Name of the job definition.

project_id
​string

UUID of the Scaleway Project containing the job. (UUID format)

created_at
​string | null · date-time

Creation date of the job definition. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the job definition. (RFC 3339 format)

cpu_limit
​integer · uint32

CPU limit of the job (in mvCPU).

memory_limit
​integer · uint32

Memory limit of the job (in MiB).

local_storage_capacity
​integer · uint32

Local storage capacity of the job (in MiB).

image_uri
​string

Image to use for the job.

​object

Environment variables of the job.

job_timeout
​string | null

Timeout of the job in seconds. (in seconds)

description
​string

Description of the job.

Configure a cron for the job.

startup_command
​string[]

Job startup command.

args
​string[]

Job arguments passed to the startup command at runtime.

Retry behaviour in case of job failure.

region
​string

The region you want to target


Update an existing job definition associated with the specified unique identifier

PATCH
https://api.scaleway.com
/serverless-jobs/v1alpha2/regions/{region}/job-definitions/{job_definition_id}

Update an existing job definition associated with the specified unique identifier › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
job_definition_id
​string · required

UUID of the job definition to update.

Update an existing job definition associated with the specified unique identifier › Request Body

name
​string | null · pattern: ^[A-Za-z0-9-_]{3,50}…

Name of the job definition.

cpu_limit
​integer | null · uint32

CPU limit of the job (in mvCPU).

memory_limit
​integer | null · uint32

Memory limit of the job (in MiB).

local_storage_capacity
​integer | null · uint32

Local storage capacity of the job (in MiB).

image_uri
​string | null · pattern: ^((?:(?:(?:[a-zA-Z0-…

Image to use for the job.

startup_command
​array | null

Job startup command. Overrides the default defined in the job image. The main executable or entrypoint script to run. If both command and startup_command are provided, only startup_command will be used.

args
​array | null

Job arguments. Overrides the default arguments defined in the job image. Passed to the startup command at runtime. Environment variables and secrets can be included, and will be expanded before the arguments are used.

environment_variables
​object | null

Environment variables of the job.

description
​string | null

Description of the job.

job_timeout
​string | null

Timeout of the job in seconds. (in seconds)

Update an existing job definition associated with the specified unique identifier › Responses

200
id
​string

UUID of the job definition. (UUID format)

name
​string

Name of the job definition.

project_id
​string

UUID of the Scaleway Project containing the job. (UUID format)

created_at
​string | null · date-time

Creation date of the job definition. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the job definition. (RFC 3339 format)

cpu_limit
​integer · uint32

CPU limit of the job (in mvCPU).

memory_limit
​integer · uint32

Memory limit of the job (in MiB).

local_storage_capacity
​integer · uint32

Local storage capacity of the job (in MiB).

image_uri
​string

Image to use for the job.

​object

Environment variables of the job.

job_timeout
​string | null

Timeout of the job in seconds. (in seconds)

description
​string

Description of the job.

Configure a cron for the job.

startup_command
​string[]

Job startup command.

args
​string[]

Job arguments passed to the startup command at runtime.

Retry behaviour in case of job failure.

region
​string

The region you want to target


Delete an existing job definition by its unique identifier

DELETE
https://api.scaleway.com
/serverless-jobs/v1alpha2/regions/{region}/job-definitions/{job_definition_id}

Delete an existing job definition by its unique identifier › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
job_definition_id
​string · required

UUID of the job definition to delete.

Delete an existing job definition by its unique identifier › Responses

No data returned

Run an existing job definition using its unique identifier and create a new job run

POST
https://api.scaleway.com
/serverless-jobs/v1alpha2/regions/{region}/job-definitions/{job_definition_id}/start

Run an existing job definition using its unique identifier and create a new job run › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
job_definition_id
​string · required

UUID of the job definition to start.

Run an existing job definition using its unique identifier and create a new job run › Request Body

startup_command
​array | null

Contextual startup command for this specific job run. Overrides the default defined in the job image. The main executable or entrypoint script to run. If both command and startup_command are provided, only startup_command will be used.

args
​array | null

Contextual arguments for this specific job run. Overrides the default arguments defined in the job image. Passed to the contextual startup command at runtime. Environment variables and secrets can be included, and will be expanded before the arguments are used.

environment_variables
​object | null

Contextual environment variables for this specific job run.

replicas
​integer | null · uint32

Number of jobs to run.

Run an existing job definition using its unique identifier and create a new job run › Responses