Skip to main content
POST
/
cloud
/
v1
/
faas
/
keys
/
{project_id}
/
{region_id}
Create API key
curl --request POST \
  --url https://api.gcore.com/cloud/v1/faas/keys/{project_id}/{region_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "functions": [
    {
      "name": "<string>",
      "namespace": "<string>"
    }
  ],
  "name": "<string>",
  "description": "key-description",
  "expire": "2023-08-22T11:21:00Z"
}
'
{
  "created_at": "<string>",
  "functions": [
    {
      "name": "<string>",
      "namespace": "<string>"
    }
  ],
  "name": "<string>",
  "secret": "<string>",
  "status": "<string>",
  "description": "key-description",
  "expire": "2023-08-22T11:21:00Z"
}

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

region_id
integer
required

Region ID

Body

application/json
functions
NamespacedName · object[]
required

List of functions using key

name
string
required

Key name

description
string | null

Optional key description

Example:

"key-description"

expire
string<date-time> | null

Key expires at

Example:

"2023-08-22T11:21:00Z"

Response

200 - application/json

OK

created_at
string
required

Key starts to work

functions
NamespacedName · object[]
required

List of functions using key

name
string
required

Key name

secret
string
required

Secret api key

status
string
required

Key status

description
string | null

Optional key description

Example:

"key-description"

expire
string<date-time> | null

Key expires at

Example:

"2023-08-22T11:21:00Z"