Skip to main content
POST
/
cloud
/
v1
/
caas
/
{project_id}
/
{region_id}
/
containers
Create container
curl --request POST \
  --url https://api.gcore.com/cloud/v1/caas/{project_id}/{region_id}/containers \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "flavor": "<string>",
  "image": "<string>",
  "listening_port": 32768,
  "name": "<string>",
  "scale": {
    "max": 13,
    "min": 12,
    "cooldown_period": 60,
    "triggers": {
      "cpu": {
        "threshold": 50
      },
      "http": {
        "rate": 500,
        "window": 1800
      },
      "memory": {
        "threshold": 50
      }
    }
  },
  "commands": "python3 app.py -m test",
  "description": "",
  "envs": {},
  "is_api_key_auth": false,
  "is_disabled": false,
  "logging": {
    "destination_region_id": 1,
    "enabled": true,
    "retention_policy": {
      "period": 45
    },
    "topic_name": "my-log-name"
  },
  "pull_secret": "my-secret",
  "timeout": 5
}
'
{
  "tasks": [
    "<string>"
  ]
}

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
flavor
string
required

Container flavor

image
string
required

Container image

Maximum string length: 230
listening_port
integer
required

Container listening port

Required range: 1 <= x <= 65535
name
string
required

Container name

Maximum string length: 43
scale
ScaleSerializer · object
required

Container autoscaling

commands
string | null

Container's commands

Example:

"python3 app.py -m test"

description
string
default:""

Container description

Maximum string length: 255
envs
Envs · object

Container environment variables

is_api_key_auth
boolean
default:false

Enable/Disable api key authentication. Enable api key is temporarily disabled. As a result, using CaaS with authorization is currently not supported.

is_disabled
boolean
default:false

Set to true if container is disabled

logging
LoggingSerializer · object

Logging configuration

Example:
{
"destination_region_id": 1,
"enabled": true,
"retention_policy": { "period": 45 },
"topic_name": "my-log-name"
}
pull_secret
string | null

Image pull secret

Maximum string length: 400
Example:

"my-secret"

timeout
integer | null

Container timeout in seconds

Required range: 0 <= x <= 180
Example:

5

Response

200 - application/json

OK

tasks
string[]
required

List of task IDs representing asynchronous operations. Use these IDs to monitor operation progress:

  • GET /v1/tasks/{task_id} - Check individual task status and details Poll task status until completion (FINISHED/ERROR) before proceeding with dependent operations.