POST
/
cloud
/
v1
/
faas
/
namespaces
/
{project_id}
/
{region_id}
Create namespace
curl --request POST \
  --url https://api.gcore.com/cloud/v1/faas/namespaces/{project_id}/{region_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "This is a sample namespace.",
  "envs": {
    "ENV_VAR": "value"
  },
  "name": "namespace-name"
}'
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Examples:

1

region_id
integer
required

Region ID

Examples:

1

Body

application/json
name
string
required

Namespace name.

Examples:

"namespace-name"

description
string | null

Namespace description.

Maximum length: 255
Examples:

"This is a sample namespace."

envs
object | null

Namespace environment variables. Keys must match a specific regex pattern and be 1-255 characters long, and values must be 0-255 characters long.

Examples:
{ "ENV_VAR": "value" }

Response

200 - application/json

OK

tasks
string[]
required

List of task IDs

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]