Create a container
POST
/container
const url = 'https://sylve.lan:8181/api/container';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"annotations":{"additionalProperty":"example"},"catalogApp":"example","command":["example"],"cores":1,"description":"example","entrypoint":["example"],"env":[{"name":"example","value":"example"}],"extraHosts":["example"],"hostname":"example","image":"example","ip":"example","memory":1,"mounts":[{"guid":"example","mode":"example","owner":"example","readOnly":true,"source":"example","target":"example","type":"volume"}],"name":"example","network":"example","ocId":1,"os":"example","pool":"example","ports":[{"containerPort":1,"hostIp":"example","hostPort":1,"protocol":"example"}],"pullImage":true,"restart":"example","restartRetries":1,"secrets":{"additionalProperty":"example"},"service":"example","shmSize":"example","stack":"example","stackTitle":"example","startAfterCreate":true,"startAtBoot":true,"startOrder":1,"stopTimeout":1,"title":"example","user":"example","webHttps":true,"webPort":1,"workDir":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/container \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "annotations": { "additionalProperty": "example" }, "catalogApp": "example", "command": [ "example" ], "cores": 1, "description": "example", "entrypoint": [ "example" ], "env": [ { "name": "example", "value": "example" } ], "extraHosts": [ "example" ], "hostname": "example", "image": "example", "ip": "example", "memory": 1, "mounts": [ { "guid": "example", "mode": "example", "owner": "example", "readOnly": true, "source": "example", "target": "example", "type": "volume" } ], "name": "example", "network": "example", "ocId": 1, "os": "example", "pool": "example", "ports": [ { "containerPort": 1, "hostIp": "example", "hostPort": 1, "protocol": "example" } ], "pullImage": true, "restart": "example", "restartRetries": 1, "secrets": { "additionalProperty": "example" }, "service": "example", "shmSize": "example", "stack": "example", "stackTitle": "example", "startAfterCreate": true, "startAtBoot": true, "startOrder": 1, "stopTimeout": 1, "title": "example", "user": "example", "webHttps": true, "webPort": 1, "workDir": "example" }'Queue the creation of a container; the image is pulled if missing
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Container
Media typeapplication/json
object
annotations
object
key
additional properties
string
catalogApp
string
command
Array<string>
cores
integer
description
string
entrypoint
Array<string>
env
Array<object>
object
name
string
value
string
extraHosts
Array<string>
hostname
string
image
string
ip
string
memory
integer
mounts
Array<object>
object
guid
string
mode
string
owner
string
readOnly
boolean
source
string
target
string
type
string
name
required
Name renames the container on update: its hostname and the name its network knows it by. CreateRequest’s own Name shadows it on create.
string
network
string
ocId
required
integer
os
string
pool
required
string
ports
Array<object>
object
containerPort
integer
hostIp
string
hostPort
integer
protocol
string
pullImage
boolean
restart
string
restartRetries
integer
secrets
Secrets are the catalog secrets the request was rendered with, by setting.
object
key
additional properties
string
service
string
shmSize
string
stack
string
stackTitle
string
startAfterCreate
boolean
startAtBoot
boolean
startOrder
integer
stopTimeout
integer
title
string
user
string
webHttps
boolean
webPort
integer
workDir
string
Responses
Section titled “Responses”Accepted
Media typeapplication/json
object
data
object
action
string
ocId
integer
outcome
string
taskId
integer
error
string
message
string
status
string
Examplegenerated
{ "data": { "action": "example", "ocId": 1, "outcome": "example", "taskId": 1 }, "error": "example", "message": "example", "status": "example"}