Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Read a workspace spending limit

Generated from the checked-in source. Do not edit this reference by hand.

GET /api/v1/organizations/{organization}/projects/{project}/spending-limit/{currency}

Workspace read permission required. Returns data: null when no explicit limit exists. Does not expose company funds or other workspace usage.

Operation: getWorkspaceSpendingLimit.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"bearerAuth": []
}
]

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.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/spending-limit/{currency}" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN"

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: path. Required.

JSON
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}

No request body is declared.

Current scoped state

Content type: application/json.

JSON
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"oneOf": [
{
"type": "object",
"required": [
"currency",
"limit_nanos",
"revision",
"committed_nanos"
],
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"limit_nanos": {
"type": [
"string",
"null"
],
"pattern": "^[0-9]+$",
"description": "Exact nonnegative decimal integer, within signed 64-bit range."
},
"revision": {
"type": [
"string",
"null"
],
"pattern": "^[0-9]+$",
"description": "Exact nonnegative decimal integer, within signed 64-bit range."
},
"committed_nanos": {
"type": "string",
"pattern": "^[0-9]+$",
"description": "Exact nonnegative decimal integer, within signed 64-bit range."
}
}
},
{
"type": "null"
}
]
}
}
}

Invalid currency, decimal value or history query

Authentication required

Insufficient role permissions

Workspace unavailable in the authorized scope

Workspace read permission required. Returns data: null when no explicit limit exists. Does not expose company funds or other workspace usage.

Supported scope: implemented