Reservations
AuthorizationBearer <token>Project API key (dtn_…) as a Bearer token. Mint via the management API (POST /projects/:id/api-keys) or this deployment's key-mint CLI. Every key carries an explicit set of verb:resource project permissions chosen at mint time (PLAN-API-KEY-PERMISSIONS.md); each operation lists the project permission it requires in its security requirement, and a key lacking it is answered 403 missing required project permission: <project-permission>. Some operations require an additional permission depending on the request body, stated in the operation's description. Holding a mutating verb (write:/delete:/invoke:) implies the resource's read: permission. Operations whose api_key project-permission list is empty need no specific project permission — any live project key works (the global catalogs and the artifact-cache read).
Scope: read:sandboxes
The organization's leases
application/json- response
GET /reservations response.
reservations*array<>curl -X GET 'https://example.com/reservations'{ "reservations": [ { "activated_at": "2019-08-24T14:15:22Z", "auto_renew": true, "created_at": "2019-08-24T14:15:22Z", "end_reason": "string", "ended_at": "2019-08-24T14:15:22Z", "id": "string", "lease_generation": 0, "leasing_since": "2019-08-24T14:15:22Z", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "origin": "string", "period_end": "2019-08-24T14:15:22Z", "period_hours": 0, "period_n": 0, "period_start": "2019-08-24T14:15:22Z", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "region": "string", "reissued_at": "2019-08-24T14:15:22Z", "renewal_error": "string", "renewal_pending": true, "runner_id": "string", "slots_used": 0, "status": "string", "vms_per_mac": 0 } ]}AuthorizationBearer <token>Project API key (dtn_…) as a Bearer token. Mint via the management API (POST /projects/:id/api-keys) or this deployment's key-mint CLI. Every key carries an explicit set of verb:resource project permissions chosen at mint time (PLAN-API-KEY-PERMISSIONS.md); each operation lists the project permission it requires in its security requirement, and a key lacking it is answered 403 missing required project permission: <project-permission>. Some operations require an additional permission depending on the request body, stated in the operation's description. Holding a mutating verb (write:/delete:/invoke:) implies the resource's read: permission. Operations whose api_key project-permission list is empty need no specific project permission — any live project key works (the global catalogs and the artifact-cache read).
Scope: write:sandboxes
Idempotency-Key*stringRequired. Unique per organization; a replay with the same body returns the existing lease
application/json- body
POST /reservations body.
auto_renew?|Renew the lease near each period end while a macOS sandbox is active on it. Defaults to the organization's auto-reserve setting.
region*stringRegion slug whose Macs to lease from.
vms_per_mac?|macOS VMs this lease allows at once (1 or 2; default 2, Apple's limit).
int32Idempotent replay of an existing lease
application/json- response
A Mac lease.
activated_at?|date-timeauto_renew*booleanThe lease renews itself shortly before period_end (an hour by
default) while a macOS sandbox is active on it; an idle lease lapses
instead.
created_at*stringdate-timeend_reason?|expired | released | charge_failed | not_accepted | reissued | operator.
ended_at?|date-timeid*stringExternal reservation id (region-tagged).
lease_generation*integerint64leasing_since?|date-timeorg_id*stringuuidorigin*stringexplicit (bought by POST /reservations or a create with
reservation: "new") | auto (bought by a macOS create under the
organization's auto-reserve setting).
period_end?|When the lease ends unless renewed. Absent until a Mac first claims it (period 1 starts at the claim, so waiting for a Mac is not paid time).
date-timeperiod_hours*integerThe period length in hours.
int32period_n*integerThe current paid period (1-based).
int32period_start?|date-timeproject_id*stringThe project whose key bought the lease. The lease serves every
project of the org; this project's monthly budget gates its renewals,
manual and automatic (project_budget_exceeded while the project is
held).
uuidregion*stringreissued_at?|Set when the lease moved to another Mac after its Mac was lost.
date-timerenewal_error?|Why the renewal of the next period failed (billing refused it, or the
balance was too low); the lease ends at period_end unless renewed by
hand. Null when no renewal has failed.
renewal_pending*booleanA renewal charge is still waiting for billing's answer.
runner_id?|The Mac holding the lease; absent until a Mac claims it.
slots_used*integermacOS VMs currently occupying this lease's Mac.
int64status*stringpending_charge | leasing | active | ending | released | failed.
vms_per_mac*integerint32curl -X POST 'https://example.com/reservations' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "region": "string"}'{ "activated_at": "2019-08-24T14:15:22Z", "auto_renew": true, "created_at": "2019-08-24T14:15:22Z", "end_reason": "string", "ended_at": "2019-08-24T14:15:22Z", "id": "string", "lease_generation": 0, "leasing_since": "2019-08-24T14:15:22Z", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "origin": "string", "period_end": "2019-08-24T14:15:22Z", "period_hours": 0, "period_n": 0, "period_start": "2019-08-24T14:15:22Z", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "region": "string", "reissued_at": "2019-08-24T14:15:22Z", "renewal_error": "string", "renewal_pending": true, "runner_id": "string", "slots_used": 0, "status": "string", "vms_per_mac": 0}AuthorizationBearer <token>Project API key (dtn_…) as a Bearer token. Mint via the management API (POST /projects/:id/api-keys) or this deployment's key-mint CLI. Every key carries an explicit set of verb:resource project permissions chosen at mint time (PLAN-API-KEY-PERMISSIONS.md); each operation lists the project permission it requires in its security requirement, and a key lacking it is answered 403 missing required project permission: <project-permission>. Some operations require an additional permission depending on the request body, stated in the operation's description. Holding a mutating verb (write:/delete:/invoke:) implies the resource's read: permission. Operations whose api_key project-permission list is empty need no specific project permission — any live project key works (the global catalogs and the artifact-cache read).
Scope: read:sandboxes
id*stringExternal reservation id
The lease
application/json- response
A Mac lease.
activated_at?|date-timeauto_renew*booleanThe lease renews itself shortly before period_end (an hour by
default) while a macOS sandbox is active on it; an idle lease lapses
instead.
created_at*stringdate-timeend_reason?|expired | released | charge_failed | not_accepted | reissued | operator.
ended_at?|date-timeid*stringExternal reservation id (region-tagged).
lease_generation*integerint64leasing_since?|date-timeorg_id*stringuuidorigin*stringexplicit (bought by POST /reservations or a create with
reservation: "new") | auto (bought by a macOS create under the
organization's auto-reserve setting).
period_end?|When the lease ends unless renewed. Absent until a Mac first claims it (period 1 starts at the claim, so waiting for a Mac is not paid time).
date-timeperiod_hours*integerThe period length in hours.
int32period_n*integerThe current paid period (1-based).
int32period_start?|date-timeproject_id*stringThe project whose key bought the lease. The lease serves every
project of the org; this project's monthly budget gates its renewals,
manual and automatic (project_budget_exceeded while the project is
held).
uuidregion*stringreissued_at?|Set when the lease moved to another Mac after its Mac was lost.
date-timerenewal_error?|Why the renewal of the next period failed (billing refused it, or the
balance was too low); the lease ends at period_end unless renewed by
hand. Null when no renewal has failed.
renewal_pending*booleanA renewal charge is still waiting for billing's answer.
runner_id?|The Mac holding the lease; absent until a Mac claims it.
slots_used*integermacOS VMs currently occupying this lease's Mac.
int64status*stringpending_charge | leasing | active | ending | released | failed.
vms_per_mac*integerint32curl -X GET 'https://example.com/reservations/string'{ "activated_at": "2019-08-24T14:15:22Z", "auto_renew": true, "created_at": "2019-08-24T14:15:22Z", "end_reason": "string", "ended_at": "2019-08-24T14:15:22Z", "id": "string", "lease_generation": 0, "leasing_since": "2019-08-24T14:15:22Z", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "origin": "string", "period_end": "2019-08-24T14:15:22Z", "period_hours": 0, "period_n": 0, "period_start": "2019-08-24T14:15:22Z", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "region": "string", "reissued_at": "2019-08-24T14:15:22Z", "renewal_error": "string", "renewal_pending": true, "runner_id": "string", "slots_used": 0, "status": "string", "vms_per_mac": 0}AuthorizationBearer <token>Project API key (dtn_…) as a Bearer token. Mint via the management API (POST /projects/:id/api-keys) or this deployment's key-mint CLI. Every key carries an explicit set of verb:resource project permissions chosen at mint time (PLAN-API-KEY-PERMISSIONS.md); each operation lists the project permission it requires in its security requirement, and a key lacking it is answered 403 missing required project permission: <project-permission>. Some operations require an additional permission depending on the request body, stated in the operation's description. Holding a mutating verb (write:/delete:/invoke:) implies the resource's read: permission. Operations whose api_key project-permission list is empty need no specific project permission — any live project key works (the global catalogs and the artifact-cache read).
Scope: write:sandboxes
id*stringExternal reservation id
application/json- body
PATCH /reservations/{id} body.
auto_renew*booleanRenew the lease near each period end while a macOS sandbox is active
on it; off lets it lapse at period_end.
The updated lease
application/json- response
A Mac lease.
activated_at?|date-timeauto_renew*booleanThe lease renews itself shortly before period_end (an hour by
default) while a macOS sandbox is active on it; an idle lease lapses
instead.
created_at*stringdate-timeend_reason?|expired | released | charge_failed | not_accepted | reissued | operator.
ended_at?|date-timeid*stringExternal reservation id (region-tagged).
lease_generation*integerint64leasing_since?|date-timeorg_id*stringuuidorigin*stringexplicit (bought by POST /reservations or a create with
reservation: "new") | auto (bought by a macOS create under the
organization's auto-reserve setting).
period_end?|When the lease ends unless renewed. Absent until a Mac first claims it (period 1 starts at the claim, so waiting for a Mac is not paid time).
date-timeperiod_hours*integerThe period length in hours.
int32period_n*integerThe current paid period (1-based).
int32period_start?|date-timeproject_id*stringThe project whose key bought the lease. The lease serves every
project of the org; this project's monthly budget gates its renewals,
manual and automatic (project_budget_exceeded while the project is
held).
uuidregion*stringreissued_at?|Set when the lease moved to another Mac after its Mac was lost.
date-timerenewal_error?|Why the renewal of the next period failed (billing refused it, or the
balance was too low); the lease ends at period_end unless renewed by
hand. Null when no renewal has failed.
renewal_pending*booleanA renewal charge is still waiting for billing's answer.
runner_id?|The Mac holding the lease; absent until a Mac claims it.
slots_used*integermacOS VMs currently occupying this lease's Mac.
int64status*stringpending_charge | leasing | active | ending | released | failed.
vms_per_mac*integerint32curl -X PATCH 'https://example.com/reservations/string' \ -H 'Content-Type: application/json' \ -d '{ "auto_renew": true}'{ "activated_at": "2019-08-24T14:15:22Z", "auto_renew": true, "created_at": "2019-08-24T14:15:22Z", "end_reason": "string", "ended_at": "2019-08-24T14:15:22Z", "id": "string", "lease_generation": 0, "leasing_since": "2019-08-24T14:15:22Z", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "origin": "string", "period_end": "2019-08-24T14:15:22Z", "period_hours": 0, "period_n": 0, "period_start": "2019-08-24T14:15:22Z", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "region": "string", "reissued_at": "2019-08-24T14:15:22Z", "renewal_error": "string", "renewal_pending": true, "runner_id": "string", "slots_used": 0, "status": "string", "vms_per_mac": 0}AuthorizationBearer <token>Project API key (dtn_…) as a Bearer token. Mint via the management API (POST /projects/:id/api-keys) or this deployment's key-mint CLI. Every key carries an explicit set of verb:resource project permissions chosen at mint time (PLAN-API-KEY-PERMISSIONS.md); each operation lists the project permission it requires in its security requirement, and a key lacking it is answered 403 missing required project permission: <project-permission>. Some operations require an additional permission depending on the request body, stated in the operation's description. Holding a mutating verb (write:/delete:/invoke:) implies the resource's read: permission. Operations whose api_key project-permission list is empty need no specific project permission — any live project key works (the global catalogs and the artifact-cache read).
Scope: write:sandboxes
id*stringExternal reservation id
Renewed, or renewal pending while billing answers (renewal_pending)
application/json- response
A Mac lease.
activated_at?|date-timeauto_renew*booleanThe lease renews itself shortly before period_end (an hour by
default) while a macOS sandbox is active on it; an idle lease lapses
instead.
created_at*stringdate-timeend_reason?|expired | released | charge_failed | not_accepted | reissued | operator.
ended_at?|date-timeid*stringExternal reservation id (region-tagged).
lease_generation*integerint64leasing_since?|date-timeorg_id*stringuuidorigin*stringexplicit (bought by POST /reservations or a create with
reservation: "new") | auto (bought by a macOS create under the
organization's auto-reserve setting).
period_end?|When the lease ends unless renewed. Absent until a Mac first claims it (period 1 starts at the claim, so waiting for a Mac is not paid time).
date-timeperiod_hours*integerThe period length in hours.
int32period_n*integerThe current paid period (1-based).
int32period_start?|date-timeproject_id*stringThe project whose key bought the lease. The lease serves every
project of the org; this project's monthly budget gates its renewals,
manual and automatic (project_budget_exceeded while the project is
held).
uuidregion*stringreissued_at?|Set when the lease moved to another Mac after its Mac was lost.
date-timerenewal_error?|Why the renewal of the next period failed (billing refused it, or the
balance was too low); the lease ends at period_end unless renewed by
hand. Null when no renewal has failed.
renewal_pending*booleanA renewal charge is still waiting for billing's answer.
runner_id?|The Mac holding the lease; absent until a Mac claims it.
slots_used*integermacOS VMs currently occupying this lease's Mac.
int64status*stringpending_charge | leasing | active | ending | released | failed.
vms_per_mac*integerint32curl -X POST 'https://example.com/reservations/string/renew'{ "activated_at": "2019-08-24T14:15:22Z", "auto_renew": true, "created_at": "2019-08-24T14:15:22Z", "end_reason": "string", "ended_at": "2019-08-24T14:15:22Z", "id": "string", "lease_generation": 0, "leasing_since": "2019-08-24T14:15:22Z", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "origin": "string", "period_end": "2019-08-24T14:15:22Z", "period_hours": 0, "period_n": 0, "period_start": "2019-08-24T14:15:22Z", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "region": "string", "reissued_at": "2019-08-24T14:15:22Z", "renewal_error": "string", "renewal_pending": true, "runner_id": "string", "slots_used": 0, "status": "string", "vms_per_mac": 0}