Skip to content

Set Idle Sleep Setting

PUT
/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/idle-sleep
curl --request PUT \
--url https://dashboard.quantcdn.io/api/v3/organizations/example/applications/example/environments/example/idle-sleep \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "idleMinutes": 30 }'

Enable or disable idle sleep. Only Fargate compute sleeps. Disabling a sleeping environment wakes it first; a 202 means it is still waking.

organisation
required
string
application
required
string
environment
required
string
Media typeapplication/json
object
enabled
required

Whether the environment sleeps when idle.

boolean
idleMinutes

Minutes with no requests before compute sleeps.

integer
default: 30 >= 10 <= 1440

Applied.

Media typeapplication/json
object
enabled
required
boolean
idleMinutes
required
integer
nullable
state
required
string
Allowed values: awake sleeping waking
stateChangedAt
required
string format: date-time
nullable
Example
{
"state": "awake"
}

Applied; environment still waking.

Media typeapplication/json
object
enabled
required
boolean
idleMinutes
required
integer
nullable
state
required
string
Allowed values: awake sleeping waking
stateChangedAt
required
string format: date-time
nullable
Example
{
"state": "awake"
}

The environment cannot use idle sleep. It runs on EC2 rather than Fargate, it has no web service, or its hostname is too long to route while asleep.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

The caller lacks the required permission or token scope.

Organisation, application or environment not found.

Validation failed. idleMinutes must be an integer from 10 to 1440.

Media typeapplication/json
object
message
string
errors
object
Examplegenerated
{
"message": "example",
"errors": {}
}