Skip to content

Update a deployment

PUT
/api/docker/nodes/{nodeId}/deployments/{deploymentId}
curl --request PUT \
--url https://gateway.example.com/api/docker/nodes/550e8400-e29b-41d4-a716-446655440000/deployments/550e8400-e29b-41d4-a716-446655440000 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "desiredConfig": { "image": "example", "env": { "additionalProperty": "example" }, "mounts": [ { "hostPath": "example", "containerPath": "example", "name": "example", "readOnly": false } ], "command": [ "example" ], "entrypoint": [ "example" ], "workingDir": "example", "user": "example", "labels": { "additionalProperty": "example" }, "restartPolicy": "no", "runtimeProfile": "default", "runtime": { "additionalProperty": "example" }, "gpu": { "deviceIds": [ "example" ] } }, "routes": [ { "hostPort": 1, "containerPort": 1, "isPrimary": false } ], "health": { "path": "/", "statusMin": 200, "statusMax": 399, "timeoutSeconds": 5, "intervalSeconds": 5, "successThreshold": 2, "startupGraceSeconds": 5, "deployTimeoutSeconds": 300 }, "drainSeconds": 1 }'
nodeId
required
string
>= 1 characters
Example
550e8400-e29b-41d4-a716-446655440000
deploymentId
required
string
>= 1 characters
Example
550e8400-e29b-41d4-a716-446655440000

JSON request body

Media typeapplication/json
object
name
string
>= 2 characters <= 80 characters /^[a-zA-Z0-9][a-zA-Z0-9_.-]+$/
desiredConfig
object
image
string
>= 1 characters
env
object
key
additional properties
string
mounts
Array<object>
object
hostPath
string
containerPath
required
string
>= 1 characters
name
string
readOnly
boolean
command
Array<string>
entrypoint
Array<string>
workingDir
string
user
string
labels
object
key
additional properties
string
restartPolicy
string
default: unless-stopped
Allowed values: no always unless-stopped on-failure
runtimeProfile
string
default: default
Allowed values: default secure
runtime
object
key
additional properties
gpu
object
deviceIds
required
Array<string>
<= 32 items
routes
Array<object>
>= 1 items <= 32 items
object
hostPort
required
integer
>= 1 <= 65535
containerPort
required
integer
>= 1 <= 65535
isPrimary
boolean
health
object
path
string
default: / >= 1 characters <= 500 characters
statusMin
integer
default: 200 >= 100 <= 599
statusMax
integer
default: 399 >= 100 <= 599
timeoutSeconds
integer
default: 5 >= 1 <= 60
intervalSeconds
integer
default: 5 >= 1 <= 60
successThreshold
integer
default: 2 >= 1 <= 20
startupGraceSeconds
integer
default: 5 <= 600
deployTimeoutSeconds
integer
default: 300 >= 5 <= 3600
drainSeconds
integer
<= 3600

Successful response

Media typeapplication/json
object
data
required

Resource object. Exact fields depend on the endpoint.

object
id
string
name
string
key
additional properties
Example
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "api",
"image": "registry.example.com/api:1.2.3",
"activeColor": "blue",
"status": "running"
}
}

Bad request

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"path": [
"name"
],
"message": "Required"
}
]
}

Authentication required

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

Forbidden

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "FORBIDDEN",
"message": "Insufficient permissions"
}

Not found

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "NOT_FOUND",
"message": "Resource not found"
}

Conflict

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "CONFLICT",
"message": "Resource already exists"
}

Unprocessable entity

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "UNPROCESSABLE_ENTITY",
"message": "Request could not be processed"
}

Internal server error

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}