Remotehost Docs
API ReferenceOrg workspaces

Read a workspace's machine-hour limit and its usage

GET
/orgs/{orgId}/workspaces/{workspaceId}/usage-guardrails

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.

Authorization

bearerAuth
AuthorizationBearer <token>

A RemoteHost API key (rh_sk_...) or a user session token.

In: header

Path Parameters

orgId*string
workspaceId*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/orgs/string/workspaces/string/usage-guardrails"
{  "workspace": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "kind": "internal"  },  "usageGuardrails": {    "sandboxMachineHourLimit": 0  },  "periodStartsAt": "string",  "periodEndsAt": "string",  "usedMachineHours": 0,  "remainingMachineHours": 0,  "usageAlert": {    "percentUsed": 0,    "status": "string",    "message": "string"  }}