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)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/timeout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timeout_ms": 123
}
'{
"timeout_ms": 123,
"timeout_action": "destroy",
"timeout_at": "2023-11-07T05:31:56Z",
"remaining_ms": 123
}
Machines
Set machine timeout
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)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/timeout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timeout_ms": 123
}
'{
"timeout_ms": 123,
"timeout_action": "destroy",
"timeout_at": "2023-11-07T05:31:56Z",
"remaining_ms": 123
}
Authorizations
API key passed as Bearer token
Path Parameters
Machine ID (e.g. mch_a1b2c3d4)
Body
application/json
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.
The timeout window now in effect, in milliseconds.
Available options:
destroy, hibernate Absolute deadline at which the timeout action fires.
Milliseconds remaining until timeout_at (clamped at 0).