Scaleway logo
Serverless Functions API

A function defines a procedure on how to change one element into another. The function remains static, while the variables that pass through it can vary.


List all your functions

GET
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions

List all your functions › path Parameters

region
​string · enum · required

The region you want to target

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

List all your functions › query Parameters

namespace_id
​string · required

UUID of the namespace the function belongs to.

page
​integer · int32

Page number.

page_size
​integer · uint32

Number of functions per page.

Order of the functions.

Enum values:
created_at_asc
created_at_desc
name_asc
name_desc
Default: created_at_asc
name
​string

Name of the function.

organization_id
​string

UUID of the Organization the function belongs to.

project_id
​string

UUID of the Project the function belongs to.

List all your functions › Responses

200

Array of functions.

total_count
​integer · uint32

Total number of functions.


Create a new function

POST
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions

Create a new function in the specified region for a specified Organization or Project.

Create a new function › path Parameters

region
​string · enum · required

The region you want to target

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

Create a new function › Request Body

name
​string

Name of the function to create.

namespace_id
​string

UUID of the namespace the function will be created in.

environment_variables
​object | null

Environment variables of the function.

min_scale
​integer | null · uint32

Minimum number of instances to scale the function to.

max_scale
​integer | null · uint32

Maximum number of instances to scale the function to.

runtime
​scaleway.functions.v1beta1.Function.Runtime · enum

Runtime to use with the function.

Enum values:
unknown_runtime
golang
python
python3
node8
node10
node14
node16
Default: unknown_runtime
memory_limit
​integer | null · uint32

Memory limit of the function in MB.

timeout
​string | null

Request processing time limit for the function. (in seconds)

handler
​string | null

Handler to use with the function.

privacy
​scaleway.functions.v1beta1.Function.Privacy · enum

Privacy setting of the function.

Enum values:
unknown_privacy
public
private
Default: unknown_privacy
description
​string | null

Description of the function.

​scaleway.functions.v1beta1.Secret[]
http_option
​scaleway.functions.v1beta1.Function.HttpOption · enum

Configure how HTTP and HTTPS requests are handled. Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
  • enabled: Serve both HTTP and HTTPS traffic.
Enum values:
unknown_http_option
enabled
redirected
Default: unknown_http_option
sandbox
​scaleway.functions.v1beta1.Function.Sandbox · enum

Execution environment of the function.

Enum values:
unknown_sandbox
v1
v2
Default: unknown_sandbox
tags
​string[]

Tags of the Serverless Function.

private_network_id
​string | null

ID of the Private Network the function is connected to. When connected to a Private Network, the function can access other Scaleway resources in this Private Network.

Create a new function › Responses

200
id
​string

UUID of the function.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the function.

name
​string

Name of the function.

namespace_id
​string

UUID of the namespace the function belongs to.

status
​scaleway.functions.v1beta1.Function.Status · enum

Status of the function.

Enum values:
unknown
ready
deleting
error
locked
creating
pending
created
Default: unknown
​object

Environment variables of the function.

min_scale
​integer · uint32

Minimum number of instances to scale the function to.

max_scale
​integer · uint32

Maximum number of instances to scale the function to.

runtime
​scaleway.functions.v1beta1.Function.Runtime · enum

Runtime of the function.

Enum values:
unknown_runtime
golang
python
python3
node8
node10
node14
node16
Default: unknown_runtime
memory_limit
​integer · uint32

Memory limit of the function in MB.

cpu_limit
​integer · uint32

CPU limit of the function.

timeout
​string | null

Request processing time limit for the function. (in seconds)

handler
​string

Handler to use for the function.

error_message
​string | null

Error message if the function is in "error" state.

build_message
​string | null

Description of the current build step.

privacy
​scaleway.functions.v1beta1.Function.Privacy · enum

Privacy setting of the function.

Enum values:
unknown_privacy
public
private
Default: unknown_privacy
description
​string | null

Description of the function.

domain_name
​string

Domain name associated with the function.

​scaleway.functions.v1beta1.SecretHashedValue[]

Secret environment variables of the function.

region
​string

Region in which the function is deployed.

http_option
​scaleway.functions.v1beta1.Function.HttpOption · enum

Configuration for handling of HTTP and HTTPS requests. Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
  • enabled: Serve both HTTP and HTTPS traffic.
Enum values:
unknown_http_option
enabled
redirected
Default: enabled
runtime_message
​string
sandbox
​scaleway.functions.v1beta1.Function.Sandbox · enum

Execution environment of the function.

Enum values:
unknown_sandbox
v1
v2
Default: unknown_sandbox
created_at
​string | null · date-time

Creation date of the function. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the function. (RFC 3339 format)

ready_at
​string | null · date-time

Last date when the function was successfully deployed and set to ready. (RFC 3339 format)

tags
​string[]

List of tags applied to the Serverless Function.

private_network_id
​string | null

ID of the Private Network the function is connected to. When connected to a Private Network, the function can access other Scaleway resources in this Private Network.


Get a function

GET
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions/{function_id}

Get the function associated with the specified ID.

Get a function › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the function.

Get a function › Responses

200
id
​string

UUID of the function.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the function.

name
​string

Name of the function.

namespace_id
​string

UUID of the namespace the function belongs to.

status
​scaleway.functions.v1beta1.Function.Status · enum

Status of the function.

Enum values:
unknown
ready
deleting
error
locked
creating
pending
created
Default: unknown
​object

Environment variables of the function.

min_scale
​integer · uint32

Minimum number of instances to scale the function to.

max_scale
​integer · uint32

Maximum number of instances to scale the function to.

runtime
​scaleway.functions.v1beta1.Function.Runtime · enum

Runtime of the function.

Enum values:
unknown_runtime
golang
python
python3
node8
node10
node14
node16
Default: unknown_runtime
memory_limit
​integer · uint32

Memory limit of the function in MB.

cpu_limit
​integer · uint32

CPU limit of the function.

timeout
​string | null

Request processing time limit for the function. (in seconds)

handler
​string

Handler to use for the function.

error_message
​string | null

Error message if the function is in "error" state.

build_message
​string | null

Description of the current build step.

privacy
​scaleway.functions.v1beta1.Function.Privacy · enum

Privacy setting of the function.

Enum values:
unknown_privacy
public
private
Default: unknown_privacy
description
​string | null

Description of the function.

domain_name
​string

Domain name associated with the function.

​scaleway.functions.v1beta1.SecretHashedValue[]

Secret environment variables of the function.

region
​string

Region in which the function is deployed.

http_option
​scaleway.functions.v1beta1.Function.HttpOption · enum

Configuration for handling of HTTP and HTTPS requests. Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
  • enabled: Serve both HTTP and HTTPS traffic.
Enum values:
unknown_http_option
enabled
redirected
Default: enabled
runtime_message
​string
sandbox
​scaleway.functions.v1beta1.Function.Sandbox · enum

Execution environment of the function.

Enum values:
unknown_sandbox
v1
v2
Default: unknown_sandbox
created_at
​string | null · date-time

Creation date of the function. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the function. (RFC 3339 format)

ready_at
​string | null · date-time

Last date when the function was successfully deployed and set to ready. (RFC 3339 format)

tags
​string[]

List of tags applied to the Serverless Function.

private_network_id
​string | null

ID of the Private Network the function is connected to. When connected to a Private Network, the function can access other Scaleway resources in this Private Network.


Update an existing function

PATCH
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions/{function_id}

Update the function associated with the specified ID.

When updating a function, the function is automatically redeployed to apply the changes. This behavior can be changed by setting the redeploy field to false in the request.

Update an existing function › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the function to update.

Update an existing function › Request Body

environment_variables
​object | null

Environment variables of the function to update.

min_scale
​integer | null · uint32

Minimum number of instances to scale the function to.

max_scale
​integer | null · uint32

Maximum number of instances to scale the function to.

runtime
​scaleway.functions.v1beta1.Function.Runtime · enum

Runtime to use with the function.

Enum values:
unknown_runtime
golang
python
python3
node8
node10
node14
node16
Default: unknown_runtime
memory_limit
​integer | null · uint32

Memory limit of the function in MB.

timeout
​string | null

Processing time limit for the function. (in seconds)

redeploy
​boolean | null

Redeploy failed function.

handler
​string | null

Handler to use with the function.

privacy
​scaleway.functions.v1beta1.Function.Privacy · enum

Privacy setting of the function.

Enum values:
unknown_privacy
public
private
Default: unknown_privacy
description
​string | null

Description of the function.

​scaleway.functions.v1beta1.Secret[]

Secret environment variables of the function. During an update, secret environment variables that are not specified in this field will be kept unchanged.

In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:

JSONCode
{ "secret_environment_variables":[ {"key":"TO_DELETE"} ] } ```.
http_option
​scaleway.functions.v1beta1.Function.HttpOption · enum

Configure how HTTP and HTTPS requests are handled. Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
  • enabled: Serve both HTTP and HTTPS traffic.
Enum values:
unknown_http_option
enabled
redirected
Default: unknown_http_option
sandbox
​scaleway.functions.v1beta1.Function.Sandbox · enum

Execution environment of the function.

Enum values:
unknown_sandbox
v1
v2
Default: unknown_sandbox
tags
​array | null

Tags of the Serverless Function.

private_network_id
​string | null

ID of the Private Network the function is connected to. When connected to a Private Network, the function can access other Scaleway resources in this Private Network.

Update an existing function › Responses

200
id
​string

UUID of the function.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the function.

name
​string

Name of the function.

namespace_id
​string

UUID of the namespace the function belongs to.

status
​scaleway.functions.v1beta1.Function.Status · enum

Status of the function.

Enum values:
unknown
ready
deleting
error
locked
creating
pending
created
Default: unknown
​object

Environment variables of the function.

min_scale
​integer · uint32

Minimum number of instances to scale the function to.

max_scale
​integer · uint32

Maximum number of instances to scale the function to.

runtime
​scaleway.functions.v1beta1.Function.Runtime · enum

Runtime of the function.

Enum values:
unknown_runtime
golang
python
python3
node8
node10
node14
node16
Default: unknown_runtime
memory_limit
​integer · uint32

Memory limit of the function in MB.

cpu_limit
​integer · uint32

CPU limit of the function.

timeout
​string | null

Request processing time limit for the function. (in seconds)

handler
​string

Handler to use for the function.

error_message
​string | null

Error message if the function is in "error" state.

build_message
​string | null

Description of the current build step.

privacy
​scaleway.functions.v1beta1.Function.Privacy · enum

Privacy setting of the function.

Enum values:
unknown_privacy
public
private
Default: unknown_privacy
description
​string | null

Description of the function.

domain_name
​string

Domain name associated with the function.

​scaleway.functions.v1beta1.SecretHashedValue[]

Secret environment variables of the function.

region
​string

Region in which the function is deployed.

http_option
​scaleway.functions.v1beta1.Function.HttpOption · enum

Configuration for handling of HTTP and HTTPS requests. Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
  • enabled: Serve both HTTP and HTTPS traffic.
Enum values:
unknown_http_option
enabled
redirected
Default: enabled
runtime_message
​string
sandbox
​scaleway.functions.v1beta1.Function.Sandbox · enum

Execution environment of the function.

Enum values:
unknown_sandbox
v1
v2
Default: unknown_sandbox
created_at
​string | null · date-time

Creation date of the function. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the function. (RFC 3339 format)

ready_at
​string | null · date-time

Last date when the function was successfully deployed and set to ready. (RFC 3339 format)

tags
​string[]

List of tags applied to the Serverless Function.

private_network_id
​string | null

ID of the Private Network the function is connected to. When connected to a Private Network, the function can access other Scaleway resources in this Private Network.


Delete a function

DELETE
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions/{function_id}

Delete the function associated with the specified ID.

Delete a function › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the function to delete.

Delete a function › Responses

200
id
​string

UUID of the function.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the function.

name
​string

Name of the function.

namespace_id
​string

UUID of the namespace the function belongs to.

status
​scaleway.functions.v1beta1.Function.Status · enum

Status of the function.

Enum values:
unknown
ready
deleting
error
locked
creating
pending
created
Default: unknown
​object

Environment variables of the function.

min_scale
​integer · uint32

Minimum number of instances to scale the function to.

max_scale
​integer · uint32

Maximum number of instances to scale the function to.

runtime
​scaleway.functions.v1beta1.Function.Runtime · enum

Runtime of the function.

Enum values:
unknown_runtime
golang
python
python3
node8
node10
node14
node16
Default: unknown_runtime
memory_limit
​integer · uint32

Memory limit of the function in MB.

cpu_limit
​integer · uint32

CPU limit of the function.

timeout
​string | null

Request processing time limit for the function. (in seconds)

handler
​string

Handler to use for the function.

error_message
​string | null

Error message if the function is in "error" state.

build_message
​string | null

Description of the current build step.

privacy
​scaleway.functions.v1beta1.Function.Privacy · enum

Privacy setting of the function.

Enum values:
unknown_privacy
public
private
Default: unknown_privacy
description
​string | null

Description of the function.

domain_name
​string

Domain name associated with the function.

​scaleway.functions.v1beta1.SecretHashedValue[]

Secret environment variables of the function.

region
​string

Region in which the function is deployed.

http_option
​scaleway.functions.v1beta1.Function.HttpOption · enum

Configuration for handling of HTTP and HTTPS requests. Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
  • enabled: Serve both HTTP and HTTPS traffic.
Enum values:
unknown_http_option
enabled
redirected
Default: enabled
runtime_message
​string
sandbox
​scaleway.functions.v1beta1.Function.Sandbox · enum

Execution environment of the function.

Enum values:
unknown_sandbox
v1
v2
Default: unknown_sandbox
created_at
​string | null · date-time

Creation date of the function. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the function. (RFC 3339 format)

ready_at
​string | null · date-time

Last date when the function was successfully deployed and set to ready. (RFC 3339 format)

tags
​string[]

List of tags applied to the Serverless Function.

private_network_id
​string | null

ID of the Private Network the function is connected to. When connected to a Private Network, the function can access other Scaleway resources in this Private Network.


Deploy a function

POST
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions/{function_id}/deploy

Deploy a function associated with the specified ID.

Deploy a function › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the function to deploy.

Deploy a function › Request Body

Deploy a function › Responses

200
id
​string

UUID of the function.

srn
​string · pattern: ^srn://functions\.[^…

SRN of the function.

name
​string

Name of the function.

namespace_id
​string

UUID of the namespace the function belongs to.

status
​scaleway.functions.v1beta1.Function.Status · enum

Status of the function.

Enum values:
unknown
ready
deleting
error
locked
creating
pending
created
Default: unknown
​object

Environment variables of the function.

min_scale
​integer · uint32

Minimum number of instances to scale the function to.

max_scale
​integer · uint32

Maximum number of instances to scale the function to.

runtime
​scaleway.functions.v1beta1.Function.Runtime · enum

Runtime of the function.

Enum values:
unknown_runtime
golang
python
python3
node8
node10
node14
node16
Default: unknown_runtime
memory_limit
​integer · uint32

Memory limit of the function in MB.

cpu_limit
​integer · uint32

CPU limit of the function.

timeout
​string | null

Request processing time limit for the function. (in seconds)

handler
​string

Handler to use for the function.

error_message
​string | null

Error message if the function is in "error" state.

build_message
​string | null

Description of the current build step.

privacy
​scaleway.functions.v1beta1.Function.Privacy · enum

Privacy setting of the function.

Enum values:
unknown_privacy
public
private
Default: unknown_privacy
description
​string | null

Description of the function.

domain_name
​string

Domain name associated with the function.

​scaleway.functions.v1beta1.SecretHashedValue[]

Secret environment variables of the function.

region
​string

Region in which the function is deployed.

http_option
​scaleway.functions.v1beta1.Function.HttpOption · enum

Configuration for handling of HTTP and HTTPS requests. Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
  • enabled: Serve both HTTP and HTTPS traffic.
Enum values:
unknown_http_option
enabled
redirected
Default: enabled
runtime_message
​string
sandbox
​scaleway.functions.v1beta1.Function.Sandbox · enum

Execution environment of the function.

Enum values:
unknown_sandbox
v1
v2
Default: unknown_sandbox
created_at
​string | null · date-time

Creation date of the function. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the function. (RFC 3339 format)

ready_at
​string | null · date-time

Last date when the function was successfully deployed and set to ready. (RFC 3339 format)

tags
​string[]

List of tags applied to the Serverless Function.

private_network_id
​string | null

ID of the Private Network the function is connected to. When connected to a Private Network, the function can access other Scaleway resources in this Private Network.


Get a download URL of a function

GET
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions/{function_id}/download-url

Get a download URL for a function associated with the specified ID.

Get a download URL of a function › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the function to get the download URL for.

Get a download URL of a function › Responses

200
url
​string
​object

Get an upload URL of a function

GET
https://api.scaleway.com
/functions/v1beta1/regions/{region}/functions/{function_id}/upload-url

Get an upload URL of a function associated with the specified ID.

Get an upload URL of a function › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the function to get the upload URL for.

Get an upload URL of a function › query Parameters

content_length
​integer · uint64 · required

Size of the archive to upload in bytes.

Get an upload URL of a function › Responses

200
url
​string

Upload URL to upload the function to.

​object

HTTP headers.


List function runtimes

GET
https://api.scaleway.com
/functions/v1beta1/regions/{region}/runtimes

List available function runtimes.

List function runtimes › path Parameters

region
​string · enum · required

The region you want to target

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

List function runtimes › Responses

200

Array of runtimes available.

total_count
​integer · uint32

Total number of runtimes.