Create a platform upstream cost budget (installation only)
Generated from the checked-in source. Do not edit this reference by hand.
POST /api/v1/organizations/{organization}/projects/{project}/budget
Fails with conflict if a budget exists. Previously dispatched work is not retroactively reserved. Further dispatch requires a trusted held reservation; configure pricing separately in the model route.
Operation: createProjectBudget.
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.
[ { "adminBearerAuth": [] }]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 POST "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/budget" \ -H "Authorization: Bearer $NIU_ADMIN_TOKEN" \ -H 'Content-Type: application/json' \ --data @request.jsonParameters
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”application/json
Section titled “application/json”Required.
{ "type": "object", "additionalProperties": false, "required": [ "currency", "limit_nanos" ], "properties": { "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "limit_nanos": { "type": "string", "pattern": "^[0-9]+$", "description": "Nonnegative integer billionths of currency, at most 9223372036854775807." } }}Responses
Section titled “Responses”HTTP 201
Section titled “HTTP 201”Created budget snapshot with decimal-string amounts and lifetime period.
HTTP 400
Section titled “HTTP 400”Invalid currency or amount.
HTTP 401
Section titled “HTTP 401”Administrator authentication required.
HTTP 409
Section titled “HTTP 409”Budget already exists or the workspace is absent from the organization.
HTTP 422
Section titled “HTTP 422”JSON does not match the required schema.
Behavior and supported scope
Section titled “Behavior and supported scope”Fails with conflict if a budget exists. Previously dispatched work is not retroactively reserved. Further dispatch requires a trusted held reservation; configure pricing separately in the model route.