Skip to content

Change an app environment API Reference

PATCH
/tenants/{tenant}/apps/{app}/environments/{env}
curl --request PATCH \
--url https://api.kupe.cloud/api/v1/tenants/example/apps/example/environments/example \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "deletionProtection": true, "domains": [ "example" ], "secrets": [ { "name": "example", "path": "example" } ], "web": { "args": [ "example" ], "command": [ "example" ], "env": [ { "name": "example", "value": "example", "valueFrom": { "secretKeyRef": { "key": "example", "secret": "example" } } } ], "healthChecks": { "liveness": { "http": { "path": "example" }, "tcp": {} }, "readiness": { "http": { "path": "example" }, "tcp": {} } }, "image": "example", "port": 1, "replicas": 1, "resources": { "limits": { "cpu": "example", "memory": "example" }, "requests": { "cpu": "example", "memory": "example" } } } }'

Merge changes into the environment. Lists replace the whole list. Changing web or a referenced secret deploys the app. Send If-Match with the environment’s ETag to reject a spec change made since your review. While apps are switched off, only deletion protection can change.

tenant
required
string

Tenant name

app
required
string

App name

env
required
string

Environment name

If-Match
string

ETag from the app or environment read

Request

Media type application/json
object
deletionProtection
boolean
domains
Array<string>
secrets
Array<object>
object
name
string
path
string
web
object
args
Array<string>
command
Array<string>
env
Array<object>
object
name
string
value
string
valueFrom
object
secretKeyRef
object
key
string
secret
string
healthChecks
object
liveness
object
http
object
path
string
tcp
object
readiness
object
http
object
path
string
tcp
object
image
string
port
integer
replicas
integer
resources
object
limits
object
cpu
string
memory
string
requests
object
cpu
string
memory
string
Example generated
{
"deletionProtection": true,
"domains": [
"example"
],
"secrets": [
{
"name": "example",
"path": "example"
}
],
"web": {
"args": [
"example"
],
"command": [
"example"
],
"env": [
{
"name": "example",
"value": "example",
"valueFrom": {
"secretKeyRef": {
"key": "example",
"secret": "example"
}
}
}
],
"healthChecks": {
"liveness": {
"http": {
"path": "example"
},
"tcp": {}
},
"readiness": {
"http": {
"path": "example"
},
"tcp": {}
}
},
"image": "example",
"port": 1,
"replicas": 1,
"resources": {
"limits": {
"cpu": "example",
"memory": "example"
},
"requests": {
"cpu": "example",
"memory": "example"
}
}
}
}

OK

Media type application/json
object
app
string
cluster
string
createdAt
string
deletionProtection
boolean
deploymentRevision
integer
domains
Array<string>
environment
string
generation
integer
name
string
resourceVersion
string
secrets
Array<object>
object
name
string
path
string
status
object
activeRelease
object
name
string
address
string
conditions
Array<object>
object
lastTransitionTime
string
message
string
reason
string
status
string
type
string
deployment
object
phase
string
reason
string
release
object
name
string
domains
Array<object>
object
host
string
phase
string
reason
string
record
string
lastSuccessfulRelease
object
name
string
namespace
string
phase
string
recovery
object
phase
string
release
object
name
string
requestedRelease
object
name
string
secrets
Array<object>
object
missingKeys
Array<string>
name
string
phase
string
uid
string
web
object
args
Array<string>
command
Array<string>
env
Array<object>
object
name
string
value
string
valueFrom
object
secretKeyRef
object
key
string
secret
string
healthChecks
object
liveness
object
http
object
path
string
tcp
object
readiness
object
http
object
path
string
tcp
object
image
string
port
integer
replicas
integer
resources
object
limits
object
cpu
string
memory
string
requests
object
cpu
string
memory
string
Example generated
{
"app": "example",
"cluster": "example",
"createdAt": "example",
"deletionProtection": true,
"deploymentRevision": 1,
"domains": [
"example"
],
"environment": "example",
"generation": 1,
"name": "example",
"resourceVersion": "example",
"secrets": [
{
"name": "example",
"path": "example"
}
],
"status": {
"activeRelease": {
"name": "example"
},
"address": "example",
"conditions": [
{
"lastTransitionTime": "example",
"message": "example",
"reason": "example",
"status": "example",
"type": "example"
}
],
"deployment": {
"phase": "example",
"reason": "example",
"release": {
"name": "example"
}
},
"domains": [
{
"host": "example",
"phase": "example",
"reason": "example",
"record": "example"
}
],
"lastSuccessfulRelease": {
"name": "example"
},
"namespace": "example",
"phase": "example",
"recovery": {
"phase": "example",
"release": {
"name": "example"
}
},
"requestedRelease": {
"name": "example"
},
"secrets": [
{
"missingKeys": [
"example"
],
"name": "example",
"phase": "example"
}
]
},
"uid": "example",
"web": {
"args": [
"example"
],
"command": [
"example"
],
"env": [
{
"name": "example",
"value": "example",
"valueFrom": {
"secretKeyRef": {
"key": "example",
"secret": "example"
}
}
}
],
"healthChecks": {
"liveness": {
"http": {
"path": "example"
},
"tcp": {}
},
"readiness": {
"http": {
"path": "example"
},
"tcp": {}
}
},
"image": "example",
"port": 1,
"replicas": 1,
"resources": {
"limits": {
"cpu": "example",
"memory": "example"
},
"requests": {
"cpu": "example",
"memory": "example"
}
}
}
}
ETag
string

UID and spec generation

Bad Request

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Unauthorized

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Forbidden

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Not Found

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Conflict

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Precondition Failed

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Too Many Requests

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}