Skip to content

Update a container

PUT
/container/{ocid}
curl --request PUT \
--url https://sylve.lan:8181/api/container/1 \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "annotations": { "additionalProperty": "example" }, "command": [ "example" ], "entrypoint": [ "example" ], "env": [ { "name": "example", "value": "example" } ], "extraHosts": [ "example" ], "hostname": "example", "image": "example", "ip": "example", "mounts": [ { "guid": "example", "mode": "example", "owner": "example", "readOnly": true, "source": "example", "target": "example", "type": "volume" } ], "name": "example", "network": "example", "os": "example", "ports": [ { "containerPort": 1, "hostIp": "example", "hostPort": 1, "protocol": "example" } ], "pullImage": true, "restart": "example", "restartRetries": 1, "shmSize": "example", "stopTimeout": 1, "user": "example", "workDir": "example" }'

Queue recreation of a container from an edited spec, keeping its volumes

ocid
required
integer

Container ID

Spec

Media typeapplication/json
object
annotations
object
key
additional properties
string
command
Array<string>
entrypoint
Array<string>
env
Array<object>
object
name
string
value
string
extraHosts
Array<string>
hostname
string
image
string
ip
string
mounts
Array<object>
object
guid
string
mode
string
owner
string
readOnly
boolean
source
string
target
string
type
string
Allowed values: volume dataset path
name

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
os
string
ports
Array<object>
object
containerPort
integer
hostIp
string
hostPort
integer
protocol
string
pullImage
boolean
restart
string
restartRetries
integer
shmSize
string
stopTimeout
integer
user
string
workDir
string

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"
}