Functions APIv1alpha2

Download OpenAPI

Introduction

Scaleway Functions is a Function As A Service product which gives users the ability to deploy atomic serverless workloads and only pay for resources used while functions are running.

It provides many advantages, such as:

  • Functions are only executed when a event is triggered, which allows users to save money while code is not running
  • Auto-Scalability:
    • Automated Scaling up and down based on user configuration (e.g. min: 0, max: 100 replicas of my function).
    • Automated Scaling to zero when function is not executed, which saves some money for the user and save Computing resources for the cloud provider.
  • Scale only the endpoint

Main features

  • Fully isolated environments
  • Scaling to zero (save money and computing resources while code is not executed)
  • High Availability and Scalability (Automated and configurable, each function may scale automatically according to incoming workloads)
  • Runtimes for the following programming languages:
    • Golang
    • node.js v8 and v10
    • Python v2.7 and v3.7
    • Container As A Service: deploy any non-root container listening on port \$PORT
  • Multiple event sources:
    • HTTP (request on our Gateway will execute the function)
    • CRON (time-based job, runs according to configurable cron schedule)
  • Integrated with the Scaleway Container Registry product
    • Each of your functions namespace has an associated registry namespace
    • All your functions are available as docker image in this registry namespace
    • Each version of your function matches a tag of this image

A Namespace is basically a project, a group of functions, in which you may set-up environment variables to use in each function.

Please Note that Scaleway Functions operates upon Kubernetes, so we use Docker container technology to execute user's code.

Therefore, we integrate our APIs with Scaleway's Container Registry product to store user's docker images. Each Namespace gets a Container Namespace in which functions images will be pushed.

A Function in Scaleway Functions consists of multiple components:

  • A Runtime (Golang, Python 2/3, Node 8/10...), basically the programming language/environment in which your code will be executed.
  • Environment Variables: You may configure specific environment variables (Database host/credentials for example) which are safely encrypted in our Database, and will be mounted inside your Functions. Note that environment variables set at Namespace level will also be mounted (in every function). Environment variables written at function level override the ones set at namespace level (if two env var have the same name for example).
  • Source code: In order to run in the cloud, a function must contain user's source code based on the programming language chosen in runtime variable.
  • Resources: users may decide how much computing resources to allocate to each function -> Memory Limit (in MB). We will then allocate the right amount of CPU based on Memory Limit choice. The right choice for your functions's resources is very important, as you will be billed based on compute usage over time and the number of functions executions.

Representation of given CPU resources based on configured Memory Limit (in MB) for a function:

Memory (in MB)CPU
12870m
256140m
512280m
1024560m

Where 560mCPU accounts roughly for half of one CPU power of a Scaleway General Purpose instance

Supported runtimes:

  • node8
  • node10
  • python2
  • python3
  • golang 1.X

Containers are applications you deploy with your own runtime:

  • Create a docker image
  • Create a container
  • Push your image in your registry namespace
  • Deploy

They are used, scaled and billed like functions

A Cron is a type of event to trigger a Scaleway Function (or Container), it is basically an add-on to your function.

At the moment, CRONs inside Scaleway Functions send HTTP requests to associated Cloud Function. This is the reason why your function handler has to handle HTTP/APIGateway type of events.

In order to deploy a cron Function, you must first:

  • Create a Namespace
  • Deploy a function (or a container)
  • Create a CRON and associate it to created/deployed function.

You may specify arguments for your cron job, which will be passed into your Function.

Under the hood, CRON event-triggers are basically Kubernetes JOB sending HTTP requests to related function.

By default, creating a function or a container will make it public, meaning that anybody knowing the endpoint could execute it.

A function or a container can be made private with the privacy parameter.

Here is the workflow used to authenticate to a private Scaleway Function:

  • Create a function with privacy private
  • Deploy your function
  • Generate a specific token from our API
  • Send a request to your function and provide the generated token (all unauthenticated requests will be rejected).

Tokens

Privacy works with JWT tokens. A JWT Token can be retrieved from the endpoint GET /jwt/issue. Depending on the parameters, a jwt token can be valid for either a function, a container, or a namespace:

  • /jwt/issue?namespace_id=1: issues JWT valid for all functions inside namespace with ID 1.
  • /jwt/issue?function_id=1: issues JWT valid only for function with id 1.
  • /jwt/issue?container_id=1: issues JWT valid only for container with id 1.

Note that you may (optional) provide an expiration date (formatted "yyyy-mm-ddT00:00:00Z") for the token: example /jwt/issue?expiration_date=2020-01-02T00:00:00Z&namespace_id=1 will generate a token, valid for all functions and containers inside Namespace with id 1, and this token will be valid until January 2nd 2020.

The token will have the following claims:

{
"application_claim": [
{
"namespace_id": "string",
"application_id": "string" // optional: id of function/container
}
]
}

Tokens are not stored by Scaleway and can not be retrieved if lost (but new tokens can be generated).

Token revocation is not yet supported, the best way to reset the tokens is to destroy and recreate the namespaces and all of its functions.

A private function observes this behaviour:

  • If a call is done without SCW_FUNCTIONS_TOKEN header, the call is rejected (Status Code 404)
  • If SCW_FUNCTIONS_TOKEN header is provided, the token is validated using a public key attached to the namespace.

The environment variables SCW_PUBLIC, SCW_PUBLIC_KEY, SCW_NAMESPACE_ID, SCW_APPLICATION_ID are provided by our APIs to validate incoming tokens.

For example, to execute a private function by providing a JWT using curl, you may run the following command:

curl -H "SCW_FUNCTIONS_TOKEN: <generated-token>" <your-function-host>

As the token validation is done in the function runtime, marking a container as private will not do the actual authentication.

Instead, it will set the following environment variables, which you can use in your application to validate incoming requests (token provided by our APIs):

  • SCW_PUBLIC: true or false based on your privacy settings
  • SCW_PUBLIC_KEY: PEM-encoded public Key used to decrypt tokens
  • SCW_NAMESPACE_ID: Current Namespace ID
  • SCW_APPLICATION_ID: Current Container ID

As described above, tokens generated from our API will contain either namespace id or application id in its claims, so you may verify it's validity (after decrypting the JWT with the inject SCW_PUBLIC_KEY).

Whether you decide to use Serverless Framework or directly our API, you'll need your Scaleway Organization ID and a Scaleway Organization Access Key.

  • Install curl
  • Install jq will make it easier to manage JSON output from our APIs

To call Scaleway API, you need an X-Auth-Token. If you don't have one yet, you can create it on the credentials page of your Scaleway account (must be done via web interface).

In order to retrieve your Organization ID and your secret Key, you must go to your console's credentials page:

Then, export then as variables to use them with curl

export TOKEN="<Secret key of your token>"
# Only available in fr-par at the moment
REGION="<choose your location (nl-ams/fr-par)>"
ORGANIZATION_ID="<your organization ID>"

The following sections explain how to use our API, with a tutorial and the auto-generated API documentation. However, we developed a Serverless Framework plugin enabling users to deploy their serverless workloads much more easily with a single serverless deploy command. No magic there, it's just a nice tool calling our API.

If what you are looking for is an easy way to deploy your code, you may prefer Serverless Framework.

Below, you will find a step-by-step guide on how to create a namespace, configure and deploy functions, and trigger your functions via HTTP and CRON.

Customize the name and set your organization ID

curl -X POST "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/namespaces" -H "accept: application/json" -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d "{\"name\": \"your-namespace-name\", \"organization_id\": \"$ORGANIZATION_ID\", \"environment_variables\": {\"YOUR_VARIABLE\": \"content\"}}"

Copy the id field of the response to use at the next steps. For the sake of simplicity we will save the ID to a variable, which we will use in the following examples:

export NAMESPACE_ID="<your namespace id>"

To destroy a namespace (along with all functions and crons) use the following call:

curl -s -H "X-Auth-Token: $TOKEN" -X DELETE "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/namespaces/$NAMESPACE_ID"

Please note that our runtimes are AWS Lambda Compatible, which means that we respect Lambda's format (event, context and callback parameters hold the same keys as AWS Lambda's). Be careful about context though, as we do not provide the exact same keys as Lambda (we don't have cognito services for example).

For this example, we'll be using node10 runtime:

touch handler.js

And inside handler.js file:

// handler.js
module.exports.myHandler = async (event, context, callback) => {
const response = {
body: JSON.stringify({message: "Hello, World"}),
statusCode: 200,
headers: {
MY_HEADER: "its content",
},
}
return response
}

When creating a function, you may customize multiple fields:

  • name: The name of your function
  • namespace_id: ID of the namespace in which you want to create your function
  • runtime: Your function's runtime, check the supported runtimes above
  • memory_limit: Memory (in MB) allocated to your function, see the table of memory/CPU allocation above (increasing the memory limit will increase the cost of your function executions as we allocate more resources to your functions).
  • min_scale: Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function to run all the time.
  • max_scale: Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
  • handler (More details with examples in each language/runtime section below):
    • Python: Path to function handler's file and the function to use as the handler: src/handler.my_handler => file handler.py defining a my_handler function, inside src folder.
    • Node: Path to function handler's file, suffixed the name of the function to use as the handler: src/handler.myHandler => file handler.js exporting a myHandler function, inside src directory.
    • Golang: Path to the package containing the handler: my_handler: the code containing the handler is located inside a my_handler directory (must be package main, and exposing a main function).
curl -X POST \
-H "X-Auth-Token: $TOKEN"\
"https://api.scaleway.com/functions/v1alpha2/regions/$REGION/functions"\
-d "{\"name\": \"function-name\", \"namespace_id\": \"$NAMESPACE_ID\", \"memory_limit\": 128, \"min_scale\": 0, \"max_scale\": 20, \"runtime\": \"node10\", \"handler\": \"handler.myHandler\"}"
FUNCTION_ID = "<your-function-id>"

These steps only apply if you use a Scaleway runtime. In this section, you will upload your code to a S3 bucket, which we'll package and build into a container image.

This container image will then be available in a registry namespace associated to your functions namespace.

export FUNCTION_ARCHIVE="function-$FUNCTION_ID.zip"

You may then create a zip archive with your code:

zip $FUNCTION_ARCHIVE handler.js

Please Note that if you wish to use external dependencies, you will have to package them inside the zip archive as well:

zip -r $FUNCTION_ARCHIVE package.json handler.js node_modules

You need to get the size of your archive in bytes, in order to ask for a presigned URL to upload your source code:

ls -lh
-rw-r--r-- 1 user group 675 Apr 18 15:42 $FUNCTION_ARCHIVE

ARCHIVE_SIZE=675
curl -X GET -H "X-Auth-Token: ${TOKEN}" "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/functions/$FUNCTION_ID/upload-url?content_length=$ARCHIVE_SIZE"

# Example of response from our API
{"url":"https://s3.fr-par.scw.cloud/scw-database-srvless-prod/uploads/function-b0525a73-947d-4ba4-92de-17f267a7ec5a.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=SCW6Z6VKJVG81FQZVB14%2F20190627%2Ffr-par%2Fs3%2Faws4_request\u0026X-Amz-Date=20190627T092839Z\u0026X-Amz-Expires=3600\u0026X-Amz-SignedHeaders=content-length%3Bcontent-type%3Bhost\u0026X-Amz-Signature=e9f3e22f39638dac047f0f4e9ab521c7971cacb01f61f523cb948baa328a0eff","headers":{"content-length":["347"],"content-type":["application/octet-stream"]}}

As you can see, the url is not properly formatted (\u0026...), in order to use it properly to upload your code, you must copy the full URL with quotes (otherwise your terminal might add unwanted \ in the url string):

export FUNCTION_ARCHIVE_URL=$(echo -n "<your-url>")

Note: that you will get an error in the following step if you do not Copy the url with wrapping quotes and save inside a variable using echo -n to replace \u0026 expressions

If you use postman, you can usually export the presigned url as it is, as long as you copy/paste the quotes too.

curl -H "Content-Type: application/octet-stream" --upload-file $FUNCTION_ARCHIVE -H "Content-Length: $ARCHIVE_SIZE" $FUNCTION_ARCHIVE_URL

Then, run the following command to deploy your function:

curl -X POST -H "X-Auth-Token: $TOKEN" "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/functions/$FUNCTION_ID/deploy" -d "{}"

The process may take a little bit of time, as we have to build your source code into an executable function (wrapped by our runtimes), and deploy it to our cloud platform.

Once your function has been properly deployed, you may retrieve your function's HTTP(s) endpoint with the following command:

curl -X GET -H "X-Auth-Token: $TOKEN" "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/functions/$FUNCTION_ID"

FUNCTION_ENDPOINT="<endpoint>"

And then, call your function via its endpoint:

curl -X GET "$FUNCTION_ENDPOINT"

Creating a container is nearly identical to creating a function.

The main difference is that here you don't need to upload your code in a S3 bucket. Instead, you need to build it as a docker image and push it to our registry.

curl -X POST \
-H "X-Auth-Token: $TOKEN" \
"https://api.scaleway.com/functions/v1alpha2/regions/$REGION/containers" \
-d "{\"name\": \"container-name\", \"namespace_id\": \"$NAMESPACE_ID\", \"memory_limit\": 128, \"min_scale\": 0, \"max_scale\": 20}"

Let's export the container_name for later:

export CONTAINER_NAME="<container_name>"
CONTAINER_ID="<container_id>"

First, get your registry_namespace_id

curl -X GET -H "X-Auth-Token: ${TOKEN}" "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/namespaces/$NAMESPACE_ID"
REGISTRY_NAMESPACE_ID="<registry-namespace-id>"

Secondly, get your registry name

curl -X GET -H "X-Auth-Token: ${TOKEN}" "https://api.scaleway.com/registry/v1beta2/regions/$REGION/namespaces/$REGISTRY_NAMESPACE_ID"
REGISTRY_ENDPOINT="<endpoint>"

We suppose you already have a working image here. It can be anything which listens on a env variable \$PORT variable. Note that we run your container as user 1000, not root, so it must be runnable under these conditions

To push your image, we invite you to check the container registry documentation.

docker login $REGISTRY_ENDPOINT -u userdoesnotmatter -p $TOKEN
docker tag myimage $REGISTRY_ENDPOINT/${CONTAINER_NAME}:latest
docker push $REGISTRY_ENDPOINT/${CONTAINER_NAME}:latest
curl -X POST -H "X-Auth-Token: $TOKEN" "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/containers/$CONTAINER_ID/deploy" -d "{}"
curl -X GET -H "X-Auth-Token: $TOKEN" "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/containers/$CONTAINER_ID"
CONTAINER_ENDPOINT="<endpoint>"

curl -X GET "$CONTAINER_ENDPOINT"

Runtimes are environment that you may use to develop their cloud functions.

Scaleway Runtimes are Lambda Compatible -> For API Gateway Proxy event types (as we only support HTTP and CRON, but cron basically sends HTTP requests to deployed functions).

In a common use case with Serverless Framework for example, in which a user has multiple functions in the same repository and would like to upload them all at the same time with a single command, we need a way to know, which file (Python/JavaScript) or package (Golang) to use to execute our functions.

Please Note that in some runtimes, this decision is made at runtime (Python and JavaScript, as they are interpreted languages, so our runtime will only import the handler), while in some others (Golang), it is done at compile/build time (when user deploys a function) as we need to build user's package.

Please Note currently function handler must be a named exported component => module.exports.myHandler = (event, context, callback) => {}

There are multiple ways to return a response from a handler function:

First one: return object with body and statusCode will set the status code as HTTP Response Code, and body as the Response's body, headers as Headers.

  • Stringified body (like AWS Lambda):
module.exports.myHandler = (event, context, callback) => {
return {
statusCode: 201,
body: JSON.stringify({
message: "async function",
}),
headers: {
"Content-Type": "application/json",
},
}
}
  • Not Stringified body (like AWS Lambda):
module.exports.myHandler = (event, context, callback) => {
return {
statusCode: 201,
body: {
message: "async function",
},
headers: {
"Content-Type": "application/json",
},
}
}

Second: return Object/entity (number, boolean, string...) withtout properties body and statusCode will return the response as is:

module.exports.myHandler = (event, context, callback) => {
return {
message: "message",
}

// Or
return JSON.stringify({message: "message"})
// OR
return "Hello, world"
// OR
return 1 // true,false,undefined,null...
}

Use Callback parameter:

module.exports.myHandler = (event, context, callback) => {
const response = {
statusCode: 201,
body: {
message: "async function",
},
headers: {
"Content-Type": "application/json",
},
}

// Successful response
callback(undefined, response)
// Error response
callback(err)
}

Note that you may use life changing async in handlers :)

return a Promise:

module.exports.myHandler = async (event, context, callback) => {
return {
statusCode: 201,
body: {
message: "async function",
},
headers: {
"Content-Type": "application/json",
},
}
}

// OR
module.exports.myHandler = (event, context, callback) => {
const response = {
statusCode: 201,
body: {
message: "async function",
},
headers: {
"Content-Type": "application/json",
},
}

return new Promise((resolve, reject) => {
// do something
if (err) return reject(err)
return resolve(response)
})
}

The Handler name is basically a path to the handler file.

For example, let's say I have two handlers hello.js and world.js inside src/handlers folder:

src
-- handlers
---- hello.js => module.exports.sayHello
---- world.js => module.exports.toTheWorld

Then, you need to provide a custom handler name for each of these handlers, so each of your functions will know which handler file to run: hello -> src/handlers/hello.sayHello and world -> src/handlers/world.toTheWorld.

By default, the handler path is handler.handle (module.exports.handle in handler.js).

If you ever need to push external dependencies for your node.js functions, you will have to package your node_modules directory into your deployment archive.

-- handler.js
-- node_modules
---- <your-dependencies>

You may definitely use tools such as webpack or NCC (CLI tool to build node.js executables, inspired from go CLI), which will package your code into separate files, you will then be able to upload your compiled handler file, which reduces the size of your bundle.

Example:

ncc handler.js -o build/handler.js # -> Builds dist/inde

Then, set up your function handler to be: build/handler.js if you package the whole build directory. Don't forget to point the function handler property to the path of your built handler in your archive (if build/handler.myHandler then handler must be build/handler.js)

Please Note that every handler must be in its own package, identified by package main, and exporting a main function with the following lambda.Start statement:

// Must Always be package main
package main

// Import both packages events and lambda from scaleway-functions-go library
import (
"encoding/json"
"github.com/scaleway/scaleway-functions-go/events"
"github.com/scaleway/scaleway-functions-go/lambda"
)

// Handler - Your handler function, uses APIGatewayProxy event type as your function will always get HTTP formatted events, even for CRON
func Handler(req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
return events.APIGatewayProxyResponse{
Body: "Your response",
StatusCode: 200,
}, nil
}

// Main function is mandatory -> Must call lambda.Start(yourHandler) otherwhise your handler will not be called properly.
func main() {
lambda.Start(Handler)
}

In Golang, as it is a compiled language, you need to provide Scaleway Function API with a handler name pointing to the function's directory.

src
-- handlers
---- hello
------ main.go -> package main in "handlers/hello" subdirectory
---- world
------ main.go -> package main in "handlers/workd" subdirectory
handler.go -> package main at the root of serverless project

Then, you need to provide a custom handler name for each of these handlers, so each of your function will know which handler file to run: hello -> handlers/hello, world -> handlers/world, and for the handler.go at the root of the project -> .

By default, the handler path is . (package main at the root of the archive).

If you need external dependencies for your go handlers, you will have to package a vendor directory containing your dependencies at the root of your archive.

-- handler.go
-- vendor
---- <your-dependencies>

There are multiple ways to return a response from a handler function:

  • Classical response object with HTTP informations:
def my_handler(event, context):
return {
"body": {
"test": "test"
},
"statusCode": 200,
"headers": {
"your-header": "your-value"
}
}
  • Straight response without body:
def my_handler(event, context):
return {"message": "whatever"}
# or
return "my Message"
  • Stringified response body (AWS Lambda):
import json

def my_handler(event, context):
return {
"body": json.dumps({"message": "Hello"}),
"statusCode": 200,
}

The Handler name is basically a path to the handler file, suffixed with the function name to use as a handler.

For example, let's say you have two handlers hello.py and world.py inside src/handlers folder:

src
-- handlers
---- hello.py => def say_hello
---- world.py => def to_the_world

Then, you need to provide a custom handler name for each of these handlers, so each of your functions will know which handler file to run: hello -> src/handlers/hello.say_hello and world -> src/handlers/world.to_the_world.

By default, the handler path is handler.handle (def handle in handler.py).

Additional dependencies must be included inside a package directory at the root of your archive/project:

# At the root of your archive
mkdir package
- requirements.txt
- handlers
--- handler.py => import requests
--- secondHandler.py => import requests
- package
--- requests
--- ...

Standard dependencies

You may install your dependencies to the package directory:

pip install requests --target ./package

Or with a requirements.txt file:

pip install -r requirements.txt --target ./package

Specific libraries (with needs for specific C compiled code)

In some cases, you might need to install libraries which require specific C compiled code such as (for example):

  • numpy
  • tensorflow
  • pandas
  • scikit-learn
  • ...

Our Python runtimes run on top of alpine linux environments, for these specifics dependencies, you will have to install your dependencies inside a docker container, with a specific image, that we are providing to our users.

You may run the following command from the root of your project to install your dependencies before uploading your source code and deploying your function:

docker run --rm -v $(pwd):/home/app/function --workdir /home/app/function rg.fr-par.scw.cloud/scwfunctionsruntimes/python-dep3:v4.0.0 pip install -r requirements.txt --target ./package

This command will run pip install with given requirements.txt file inside a docker container compatible with our function runtimes, and pull the installed dependencies locally to your package directory. As these dependencies have been installed on top of alpine linux with our compatible system libraries, you will be able to upload your source code and deploy your function properly.

Note that the example below uses python3 runtime, but you can easily change the docker image from rg.fr-par.scw.cloud/scwfunctionsruntimes/python-dep3:v4.0.0 to rg.fr-par.scw.cloud/scwfunctionsruntimes/python-dep2:v4.0.0

When deleting a Functions Namespace, we take care of removing all sub-resources such as Functions and CRONs deployed in this namespace.

  • With Serverless Framework:
serverless remove
  • With curl:
curl -X DELETE -H "X-Auth-Token: ${TOKEN}" "https://api.scaleway.com/functions/v1alpha2/regions/$REGION/namespaces/$NAMESPACE_ID"

Please note that deleting a Scaleway Functions namespace will not automatically delete Scaleway Container Registry namespaces linked to your FAAS project. It is your responsibility to manually remove your Registry namespaces via Scaleway Console or API.

If you are using either node or python runtimes, you may use our Offline Gateway plugin (Developed and maintained by Scaleway).

npm install --save-dev serverless-offline-scaleway

And in your serverless File:

plugins:
- serverless-scaleway-functions
- serverless-offline-scaleway

You may now invoke your functions locally via the following command line:

serverless offline start

Node/Python

  • pathParameters: map(string)string - Parameters defined in the path of the HTTP Request
  • queryStringParameters: map(string)string - Query Strings parameters of the HTTP Request
  • body: string|byte() - Body of the HTTP Request, you will have to parse it in your handler to use it properly.
  • headers: map(string)string - HTTP Request Headers
  • method: string - HTTP method used
  • isBase64Encoded: boolean - Whether the request body is base64 encoded.

Golang

You may take a look at our scaleway-functions-go package (events and lambda) packages.

Context typings will be supported soon, you may already use it in functions, but every value be defaults values as our API does not support it right now.

GET
/functions/v1alpha2/regions/{region}/namespaces
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

page
number
Page number. The default value is 1.

page_size
number
Page size. The default value is 20.

order_by
string
Possible values are created_at_asc, created_at_desc, name_asc and name_desc. The default value is created_at_asc.

name
nullable string
200 Response

namespaces
array
id
string

name
string

environment_variables
map
<environment_variableKey>
string

organization_id
string

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.

registry_namespace_id
string

error_message
string

registry_endpoint
string

description
nullable string

region
string

total_count
number
Response Example
{
"namespaces": [
{
"id": "string",
"name": "string",
"environment_variables": {
"<environment_variableKey>": "string"
},
"organization_id": "string",
"status": "ready",
"registry_namespace_id": "string",
"error_message": "string",
"registry_endpoint": "string",
"description": "string",
"region": "string"
}
],
"total_count": 42
}
POST
/functions/v1alpha2/regions/{region}/namespaces
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Body

name
string

environment_variables
nullable object
<key>
string

organization_id
string

description
nullable string
Request Example
{
"name": "string",
"environment_variables": {
"<key>": "string"
},
"organization_id": "string",
"description": "string"
}
200 Response

id
string

name
string

environment_variables
map
<environment_variableKey>
string

organization_id
string

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.

registry_namespace_id
string

error_message
string

registry_endpoint
string

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"environment_variables": {
"<environment_variableKey>": "string"
},
"organization_id": "string",
"status": "ready",
"registry_namespace_id": "string",
"error_message": "string",
"registry_endpoint": "string",
"description": "string",
"region": "string"
}

Get the namespace associated with the given id.

GET
/functions/v1alpha2/regions/{region}/namespaces/{namespace_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

namespace_id
required string
200 Response

id
string

name
string

environment_variables
map
<environment_variableKey>
string

organization_id
string

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.

registry_namespace_id
string

error_message
string

registry_endpoint
string

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"environment_variables": {
"<environment_variableKey>": "string"
},
"organization_id": "string",
"status": "ready",
"registry_namespace_id": "string",
"error_message": "string",
"registry_endpoint": "string",
"description": "string",
"region": "string"
}

Update the space associated with the given id.

PATCH
/functions/v1alpha2/regions/{region}/namespaces/{namespace_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

namespace_id
required string
Body

environment_variables
nullable object
<key>
string

description
nullable string
Request Example
{
"environment_variables": {
"<key>": "string"
},
"description": "string"
}
200 Response

id
string

name
string

environment_variables
map
<environment_variableKey>
string

organization_id
string

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.

registry_namespace_id
string

error_message
string

registry_endpoint
string

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"environment_variables": {
"<environment_variableKey>": "string"
},
"organization_id": "string",
"status": "ready",
"registry_namespace_id": "string",
"error_message": "string",
"registry_endpoint": "string",
"description": "string",
"region": "string"
}

Delete the namespace associated with the given id.

DELETE
/functions/v1alpha2/regions/{region}/namespaces/{namespace_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

namespace_id
required string
200 Response

id
string

name
string

environment_variables
map
<environment_variableKey>
string

organization_id
string

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.

registry_namespace_id
string

error_message
string

registry_endpoint
string

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"environment_variables": {
"<environment_variableKey>": "string"
},
"organization_id": "string",
"status": "ready",
"registry_namespace_id": "string",
"error_message": "string",
"registry_endpoint": "string",
"description": "string",
"region": "string"
}
GET
/functions/v1alpha2/regions/{region}/functions
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

page
number
Page number. The default value is 1.

page_size
number
Page size. The default value is 20.

order_by
string
Possible values are created_at_asc, created_at_desc, name_asc and name_desc. The default value is created_at_asc.

namespace_id
string

name
nullable string
200 Response

functions
array
id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

runtime
string
Possible values are golang, python, python3, node8 and node10. The default value is golang.

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

handler
string

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string

total_count
number
Response Example
{
"functions": [
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"runtime": "golang",
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"handler": "string",
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}
],
"total_count": 42
}
POST
/functions/v1alpha2/regions/{region}/functions
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Body

namespace_id
string

name
string

environment_variables
nullable object
<key>
string

min_scale
nullable number

max_scale
nullable number

runtime
string
Possible values are golang, python, python3, node8 and node10. The default value is golang.

memory_limit
nullable number

timeout
number
(in milliseconds).

handler
nullable string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string
Request Example
{
"namespace_id": "string",
"name": "string",
"environment_variables": {
"<key>": "string"
},
"min_scale": 42,
"max_scale": 42,
"runtime": "golang",
"memory_limit": 42,
"timeout": 42,
"handler": "string",
"privacy": "unknown",
"description": "string"
}
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

runtime
string
Possible values are golang, python, python3, node8 and node10. The default value is golang.

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

handler
string

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"runtime": "golang",
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"handler": "string",
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}

Get the function associated with the given id.

GET
/functions/v1alpha2/regions/{region}/functions/{function_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

function_id
required string
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

runtime
string
Possible values are golang, python, python3, node8 and node10. The default value is golang.

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

handler
string

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"runtime": "golang",
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"handler": "string",
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}

Update the function associated with the given id.

PATCH
/functions/v1alpha2/regions/{region}/functions/{function_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

function_id
required string
Body

environment_variables
nullable object
<key>
string

min_scale
nullable number

max_scale
nullable number

memory_limit
nullable number

timeout
number
(in milliseconds).

redeploy
nullable boolean

handler
nullable string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string
Request Example
{
"environment_variables": {
"<key>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"timeout": 42,
"redeploy": "boolean",
"handler": "string",
"privacy": "unknown",
"description": "string"
}
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

runtime
string
Possible values are golang, python, python3, node8 and node10. The default value is golang.

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

handler
string

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"runtime": "golang",
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"handler": "string",
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}

Delete the function associated with the given id.

DELETE
/functions/v1alpha2/regions/{region}/functions/{function_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

function_id
required string
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

runtime
string
Possible values are golang, python, python3, node8 and node10. The default value is golang.

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

handler
string

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"runtime": "golang",
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"handler": "string",
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}

List available function runtimes

GET
/functions/v1alpha2/regions/{region}/runtimes
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
200 Response

runtimes
array
Response Example
{
"runtimes": [
"golang"
]
}
GET
/functions/v1alpha2/regions/{region}/containers
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

page
number
Page number. The default value is 1.

page_size
number
Page size. The default value is 20.

order_by
string
Possible values are created_at_asc, created_at_desc, name_asc and name_desc. The default value is created_at_asc.

namespace_id
string

name
nullable string
200 Response

containers
array
id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string

total_count
number
Response Example
{
"containers": [
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}
],
"total_count": 42
}
POST
/functions/v1alpha2/regions/{region}/containers
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Body

namespace_id
string

name
string

environment_variables
nullable object
<key>
string

min_scale
nullable number

max_scale
nullable number

memory_limit
nullable number

timeout
number
(in milliseconds).

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string
Request Example
{
"namespace_id": "string",
"name": "string",
"environment_variables": {
"<key>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"timeout": 42,
"privacy": "unknown",
"description": "string"
}
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}

Get the container associated with the given id.

GET
/functions/v1alpha2/regions/{region}/containers/{container_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

container_id
required string
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}

Update the container associated with the given id.

PATCH
/functions/v1alpha2/regions/{region}/containers/{container_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

container_id
required string
Body

environment_variables
nullable object
<key>
string

min_scale
nullable number

max_scale
nullable number

memory_limit
nullable number

timeout
number
(in milliseconds).

redeploy
nullable boolean

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string
Request Example
{
"environment_variables": {
"<key>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"timeout": 42,
"redeploy": "boolean",
"privacy": "unknown",
"description": "string"
}
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}

Delete the container associated with the given id.

DELETE
/functions/v1alpha2/regions/{region}/containers/{container_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

container_id
required string
200 Response

id
string

name
string

namespace_id
string

status
string
Possible values are ready, deleting, error, locked, creating, pending and created. The default value is ready.

environment_variables
map
<environment_variableKey>
string

min_scale
number

max_scale
number

memory_limit
number

cpu_limit
number

endpoint
string

timeout
number
(in milliseconds).

error_message
string

privacy
string
Possible values are unknown, public and private. The default value is unknown.

description
nullable string

region
string
Response Example
{
"id": "string",
"name": "string",
"namespace_id": "string",
"status": "ready",
"environment_variables": {
"<environment_variableKey>": "string"
},
"min_scale": 42,
"max_scale": 42,
"memory_limit": 42,
"cpu_limit": 42,
"endpoint": "string",
"timeout": 42,
"error_message": "string",
"privacy": "unknown",
"description": "string",
"region": "string"
}
GET
/functions/v1alpha2/regions/{region}/crons
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

page
number
Page number. The default value is 1.

page_size
number
Page size. The default value is 20.

order_by
string
Possible values are created_at_asc and created_at_desc. The default value is created_at_asc.

application_id
string
200 Response

crons
array
id
string

application_id
string

schedule
string

args
object
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.

total_count
number
Response Example
{
"crons": [
{
"id": "string",
"application_id": "string",
"schedule": "string",
"args": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
}
},
"list_value": {
"values": [
{
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
]
}
}
}
},
"status": "ready"
}
],
"total_count": 42
}
POST
/functions/v1alpha2/regions/{region}/crons
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Body

application_id
string

schedule
string

args
object
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array
Request Example
{
"application_id": "string",
"schedule": "string",
"args": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
}
},
"list_value": {
"values": [
{
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
]
}
}
}
}
}
200 Response

id
string

application_id
string

schedule
string

args
object
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.
Response Example
{
"id": "string",
"application_id": "string",
"schedule": "string",
"args": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
}
},
"list_value": {
"values": [
{
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
]
}
}
}
},
"status": "ready"
}

Get the cron associated with the given id.

GET
/functions/v1alpha2/regions/{region}/crons/{cron_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

cron_id
required string
200 Response

id
string

application_id
string

schedule
string

args
object
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

status
string
Possible values are ready, deleting, error, locked, creating and pending. The default value is ready.
Response Example
{
"id": "string",
"application_id": "string",
"schedule": "string",
"args": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
}
},
"list_value": {
"values": [
{
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
]
}
}
}
},
"status": "ready"
}

Update the cron associated with the given id.

PATCH
/functions/v1alpha2/regions/{region}/crons/{cron_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

cron_id
required string
Body

application_id
nullable string

schedule
nullable string

args
object
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object

list_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
values
array
Request Example
{
"application_id": "string",
"schedule": "string",
"args": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
}
},
"list_value": {
"values": [
{
"null_value": "NULL_VALUE",
"number_value": 42,
"string_value": "string",
"bool_value": "boolean",
"struct_value": {
"fields": {
"<fieldKey>": {}
}
},
"list_value": {
"values": [
{}
]
}
}
]
}
}
}
}
}
200 Response

id
string

application_id
string

schedule
string

args
object
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

struct_value
object
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.
fields
map
<fieldKey>
object
null_value
string
Possible value is NULL_VALUE. The default value is NULL_VALUE. Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

number_value
number
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

string_value
string
Only one of null_value, number_value, string_value, bool_value, struct_value and list_value may be set.

bool_value
boolean
Only one of