Scaleway logo
Serverless Functions API

Tokens allow you to manage access control to your function.


List all tokens

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

List all tokens › path Parameters

region
​string · enum · required

The region you want to target

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

List all tokens › query Parameters

page
​integer · int32

Page number.

page_size
​integer · uint32

Number of tokens per page.

Sort order for the tokens.

Enum values:
created_at_asc
created_at_desc
Default: created_at_asc
function_id
​string

UUID of the function the token is associated with.

namespace_id
​string

UUID of the namespace the token is associated with.

List all tokens › Responses

200
total_count
​integer · uint32

deprecated

Create a new revocable token

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

Deprecated in favor of IAM authentication.

Create a new revocable token › path Parameters

region
​string · enum · required

The region you want to target

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

Create a new revocable token › Request Body

function_id
​string | null

UUID of the function to associate the token with.

namespace_id
​string | null

UUID of the namespace to associate the token with.

description
​string | null

Description of the token.

expires_at
​string | null · date-time

Date on which the token expires. (RFC 3339 format)

Create a new revocable token › Responses

200
id
​string

UUID of the token.

token
​string

String of the token.

function_id
​string | null

UUID of the function the token is associated with.

namespace_id
​string | null

UUID of the namespace the token is associated with.

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

Status of the token.

Enum values:
unknown
ready
deleting
error
creating
Default: unknown
description
​string | null

Description of the token.

expires_at
​string | null · date-time

Date on which the token expires. (RFC 3339 format)


Get a token

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

Get a token › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the token to get.

Get a token › Responses

200
id
​string

UUID of the token.

token
​string

String of the token.

function_id
​string | null

UUID of the function the token is associated with.

namespace_id
​string | null

UUID of the namespace the token is associated with.

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

Status of the token.

Enum values:
unknown
ready
deleting
error
creating
Default: unknown
description
​string | null

Description of the token.

expires_at
​string | null · date-time

Date on which the token expires. (RFC 3339 format)


Delete a token

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

Delete a token › path Parameters

region
​string · enum · required

The region you want to target

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

UUID of the token to delete.

Delete a token › Responses

200
id
​string

UUID of the token.

token
​string

String of the token.

function_id
​string | null

UUID of the function the token is associated with.

namespace_id
​string | null

UUID of the namespace the token is associated with.

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

Status of the token.

Enum values:
unknown
ready
deleting
error
creating
Default: unknown
description
​string | null

Description of the token.

expires_at
​string | null · date-time

Date on which the token expires. (RFC 3339 format)