Projects

Keep the project always on (paid plans), let it sleep when idle, or follow the plan; always_on wakes a sleeping project

put/projects/{projectId}/sleep

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/projects/{projectId}/sleep
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

projectIdstring uuid required

Request body

preference'plan' | 'always_on' | 'when_idle' required

plan: follow the plan; always_on: never sleep (paid plans); when_idle: sleep when idle

Response

Updated

projectIdstring uuid required
availableboolean required
state'awake' | 'sleeping' | 'waking' required
preference'plan' | 'always_on' | 'when_idle' required
sleepsAfterHoursinteger nullable required
canKeepAlwaysOnboolean required
supportedboolean required
reason'recent_activity' | 'always_on' | 'plan_never' | 'static' | 'cron_jobs' | 'webhooks' | 'busy' | 'service' | 'backup_pending' | 'deploying' | 'not_ready' | 'unsupported' | 'sleep_off' | 'idle' | 'stop_failed' | 'no_visits' | 'no_metrics' | 'wildcard_domain' | 'null' nullable required
sleptAtstring nullable required

ISO-8601 timestamp

wokenAtstring nullable required

ISO-8601 timestamp

lastWakeMsinteger nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.