Skip to main content
POST
/
v1
/
machines
/
{id}
/
timeout
Set machine timeout
import requests

url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/timeout"

payload = { "timeout_ms": 123 }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{ "timeout_ms": 123, "timeout_at": "2023-11-07T05:31:56Z", "remaining_ms": 123 }

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Machine ID (e.g. mch_a1b2c3d4)

Body

application/json
timeout_ms
integer<uint64>
required
timeout_action
enum<string>

Optional timeout action. When omitted, the existing timeout action is preserved.

Available options:
destroy,
hibernate

Response

Timeout updated. Returns the effective lease so callers can schedule a refresh against the real deadline.

Effective lease after a timeout update. Echoes the deadline back so clients can schedule a refresh against the real timeout_at.

timeout_ms
integer<uint64>
required

The timeout window now in effect, in milliseconds.

timeout_action
enum<string>
required
Available options:
destroy,
hibernate
timeout_at
string<date-time>

Absolute deadline at which the timeout action fires.

remaining_ms
integer<int64>

Milliseconds remaining until timeout_at (clamped at 0).