Skip to Content
homemade
Dashboard

Sleep a VM

POST
/api/vms/{vmId}/sleep

Puts a running VM to sleep. It keeps its memory and disk and wakes where it left off. Sleeping an asleep VM answers 200.

Authorization

apiKey
headerAuthorizationBearer <hmk_…>

An API key from the dashboard or homemade api-key create.

Path Parameters

vmId*string

Response Body

Asleep, or falling asleep (pending).

application/json
  1. response
ok*boolean
pending?boolean

Accepted; the change finishes in the background.

state*string
Value in"queued""placing""booting""injecting""running""asleep""deep_sleeping""deep_asleep""stopped""failed"
Example Request
curl -X POST 'https://api.homemade.dev/api/vms/string/sleep'
Example Response
{  "ok": true,  "pending": true,  "state": "queued"}