Set a workspace's machine-hour limit
Needs billing.manage. Null removes the workspace's cap. API keys cannot call it. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.
Authorization
bearerAuth A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/orgs/string/workspaces/string/usage-guardrails" \ -H "Content-Type: application/json" \ -d '{ "sandboxMachineHourLimit": 0 }'{ "workspace": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "internal" }, "usageGuardrails": { "sandboxMachineHourLimit": 0 }}Read a workspace's machine-hour limit and its usage GET
Needs `billing.read`. The workspace's cap on billable machine-hours this billing period, beside the org's and each project's, and what its projects have used. Sandbox create and wake check the org's cap, then the workspace's, then the project's. An API key may call it; a key pinned to a workspace only for its own, and any other workspace answers it the same 404 as one that does not exist. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.
Read an External workspace's end-user caps GET
Needs `billing.read`. The default cap per end user, the action at the cap, and every override. An Internal workspace has no end users: every operation here answers it with 409 `internal_workspace`. API keys cannot call it. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.