Environments

Wake a sleeping on-demand environment

Changed on

Manually wake an environment that has been put to sleep by the on-demand idle timeout. Starts containers, waits for health checks, then sets sleeping = false. If no OnDemandWaker is available (proxy not running in same process), falls back to setting the DB flag only.

post/projects/{project_id}/environments/{env_id}/wake

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

project_idinteger required

Project ID

env_idinteger required

Environment ID

Response

Environment woken up

attack_modeboolean nullable

Per-environment CAPTCHA attack-mode override. null means inherit the project-level attack_mode; true/false explicitly enable/disable the challenge for this environment. Always serialized (NOT skipped) so the UI can distinguish null from false.

branchstring nullable
created_atstring date-time required
current_deployment_idinteger nullable
estimated_sleep_atstring date-time nullable

Estimated time (ISO 8601, UTC) when the environment will go to sleep based on last activity + idle timeout. NULL when sleeping or on-demand disabled.

force_httpsboolean nullable

Per-environment HTTP→HTTPS redirect override. null means inherit the proxy default (redirect only when the host has an active TLS certificate); true always redirects plain HTTP for this environment, false never does. Always serialized (NOT skipped) so the UI can distinguish null from false.

idinteger required
is_previewboolean required

Indicates if this is a preview environment (auto-created per branch) For preview environments, 'branch' contains the feature branch name

last_activity_atstring date-time nullable

Last proxied request time (ISO 8601, UTC) for on-demand environments. NULL when on-demand is disabled or no traffic has been received yet.

main_urlstring required
namestring required
placement_warningstring nullable

Set when the settings can't be honoured as written: anti-affinity is on, but there are fewer eligible nodes than replicas, so some replicas will share a node. Deploys still go ahead. Reported when reading one environment and when saving its settings, not in lists.

project_idinteger required
protectedboolean required

When true, git pushes do NOT auto-deploy to this environment. Deployments must be promoted from another environment.

shield_exempt_pathsstring[] required

Paths Shield never challenges in this environment (ADR 066 D7): /api/* exempts everything under /api/, any other entry one exact path.

shield_mode'off' | 'log' | 'selective' | 'attack' nullable required

How an environment acts on verdicts (D1).

sleepingboolean required

When true, the environment's containers are currently stopped due to inactivity (on-demand mode) and will start on the next request.

slugstring required
subdomainstring required

The host label stored for this environment (e.g. myproject-production). This is the prefix that is combined with the platform's preview domain at request time to produce main_url. Edit this via the rename-subdomain endpoint, not the full URL.

updated_atstring date-time required

Changes

    • breaking

      the created_at response's property type changed from integer to string, and format from int64 to date-time for status

    • breaking

      the estimated_sleep_at response's property type changed from integer null to string null, and format from int64 to date-time for status

    • breaking

      the last_activity_at response's property type changed from integer null to string null, and format from int64 to date-time for status

    1 more change in this revision