Read the workspace Credits spending limit and commitment
Generated from the checked-in source. Do not edit this reference by hand.
GET /api/v1/organizations/{organization}/projects/{project}/units/limit
Workspace read permission required. Returns the workspace’s explicit Credits atom limit, policy revision, committed atoms (settled charges minus original-range restorations plus unresolved holds and known overrun liabilities), remaining allowance, and whether an existing monetary workspace limit is preserved. A preserved monetary limit blocks Credits admission until an explicit Credits workspace limit revision (integer atoms or null for unlimited) is published. Never exposes company balance or procurement costs.
Operation: getWorkspaceCustomerUnitSpendingLimit.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "bearerAuth": [] }]HTTP request
Section titled “HTTP request”Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/units/limit" \ -H "Authorization: Bearer $NIU_BEARER_TOKEN"Parameters
Section titled “Parameters”organization
Section titled “organization”Location: path. Required.
{ "type": "string", "format": "uuid"}project
Section titled “project”Location: path. Required.
{ "type": "string", "format": "uuid"}Request body
Section titled “Request body”No request body is declared.
Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Current workspace Credits spending limit state
Content type: application/json.
{ "type": "object", "additionalProperties": false, "required": [ "data" ], "properties": { "data": { "type": "object", "additionalProperties": false, "required": [ "unit", "limit_atoms", "revision", "definition_revision", "committed_atoms", "remaining_atoms", "monetary_limit_preserved", "credits_admission_blocked_by_monetary_limit" ], "properties": { "unit": { "type": [ "object", "null" ], "additionalProperties": false, "required": [ "definition_revision", "name", "display_precision", "atoms_per_unit" ], "properties": { "definition_revision": { "type": "string", "pattern": "^[1-9][0-9]*$" }, "name": { "type": "string" }, "display_precision": { "type": "integer", "minimum": 0, "maximum": 9 }, "atoms_per_unit": { "type": "string", "const": "1000000000" } } }, "limit_atoms": { "type": [ "string", "null" ], "pattern": "^(0|[1-9][0-9]*)$" }, "revision": { "type": [ "string", "null" ], "pattern": "^[1-9][0-9]*$" }, "definition_revision": { "type": [ "string", "null" ], "pattern": "^[1-9][0-9]*$" }, "committed_atoms": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$" }, "remaining_atoms": { "type": [ "string", "null" ], "pattern": "^(0|[1-9][0-9]*)$" }, "monetary_limit_preserved": { "type": "boolean" }, "credits_admission_blocked_by_monetary_limit": { "type": "boolean" } } } }}HTTP 401
Section titled “HTTP 401”Authentication required or revoked
HTTP 403
Section titled “HTTP 403”Workspace access denied
HTTP 404
Section titled “HTTP 404”Workspace not found in the authorized scope
HTTP 503
Section titled “HTTP 503”Storage unavailable
Behavior and supported scope
Section titled “Behavior and supported scope”Workspace read permission required. Returns the workspace’s explicit Credits atom limit, policy revision, committed atoms (settled charges minus original-range restorations plus unresolved holds and known overrun liabilities), remaining allowance, and whether an existing monetary workspace limit is preserved. A preserved monetary limit blocks Credits admission until an explicit Credits workspace limit revision (integer atoms or null for unlimited) is published. Never exposes company balance or procurement costs.
Supported scope: implemented