Scaleway logo
Serverless Jobs API

A job run is the execution of a job definition


List all job runs with filters

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

List all job runs with filters › path Parameters

region
​string · enum · required

The region you want to target

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

List all job runs with filters › query Parameters

page
​integer · int32
page_size
​integer · uint32
Enum values:
created_at_asc
created_at_desc
Default: created_at_asc
job_definition_id
​string
project_id
​string
organization_id
​string
Enum values:
unknown_state
initialized
validated
queued
running
succeeded
failed
interrupting
Default: unknown_state
Enum values:
unknown_state
initialized
validated
queued
running
succeeded
failed
interrupting
Enum values:
unknown_reason
invalid_request
timeout
cancellation
technical_error
image_not_found
invalid_image
memory_usage_exceeded

List all job runs with filters › Responses


Get a job run by its unique identifier

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

Get a job run 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_run_id
​string · required

UUID of the job run to get.

Get a job run by its unique identifier › Responses

200
id
​string

UUID of the job run. (UUID format)

job_definition_id
​string

UUID of the job definition. (UUID format)

created_at
​string | null · date-time

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

updated_at
​string | null · date-time

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

started_at
​string | null · date-time

Start date of the job run. (RFC 3339 format)

terminated_at
​string | null · date-time

Termination date of the job run. (RFC 3339 format)

run_duration
​string | null

Duration of the job run. (in seconds)

State of the job run.

Enum values:
unknown_state
initialized
validated
queued
running
succeeded
failed
interrupting
Default: unknown_state

Reason for failure if the job failed.

Enum values:
unknown_reason
invalid_request
timeout
cancellation
technical_error
image_not_found
invalid_image
memory_usage_exceeded
Default: unknown_reason
exit_code
​integer | null · int32

Exit code of the job.

error_message
​string | null

Error message if the job failed.

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).

​object

Environment variables of the job run.

startup_command
​string[]

Job startup command.

args
​string[]

Job arguments passed to the startup command at runtime.

attempts
​integer | null · uint32

Number of run attempts.

region
​string

The region you want to target


Stop a job run using its unique identifier

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

Stop a job run using its unique identifier › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the job run to stop.

Stop a job run using its unique identifier › Request Body

Stop a job run using its unique identifier › Responses

200
id
​string

UUID of the job run. (UUID format)

job_definition_id
​string

UUID of the job definition. (UUID format)

created_at
​string | null · date-time

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

updated_at
​string | null · date-time

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

started_at
​string | null · date-time

Start date of the job run. (RFC 3339 format)

terminated_at
​string | null · date-time

Termination date of the job run. (RFC 3339 format)

run_duration
​string | null

Duration of the job run. (in seconds)

State of the job run.

Enum values:
unknown_state
initialized
validated
queued
running
succeeded
failed
interrupting
Default: unknown_state

Reason for failure if the job failed.

Enum values:
unknown_reason
invalid_request
timeout
cancellation
technical_error
image_not_found
invalid_image
memory_usage_exceeded
Default: unknown_reason
exit_code
​integer | null · int32

Exit code of the job.

error_message
​string | null

Error message if the job failed.

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).

​object

Environment variables of the job run.

startup_command
​string[]

Job startup command.

args
​string[]

Job arguments passed to the startup command at runtime.

attempts
​integer | null · uint32

Number of run attempts.

region
​string

The region you want to target