Cumulus TalosDocs
Open Talos
On this page

budgets.get

Read the tenant budget: period, cap and metered spend (configured: false until metered pricing is installed)

Request

GET /api/v1/usage/budget

  • MCP: budgets_get
  • SDK: client.budgets.get (SDK path arguments use path; MCP uses params).
  • Minimum API key role: viewer.
  • Idempotency: none.

Use the request schema below. Read IDs from earlier operation results.

Input schema

json
{
  "parameters": [],
  "requestBody": null
}

Responses

json
{
  "200": {
    "description": "Read the tenant budget: period, cap and metered spend (configured: false until metered pricing is installed)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BudgetsGetResponse200"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

Referenced schemas

json
{
  "components": {
    "schemas": {
      "BudgetsGetResponse200": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "budget_id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.:/-]{1,160}$",
            "nullable": true
          },
          "policy_id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.:/-]{1,160}$",
            "nullable": true
          },
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false,
            "nullable": true
          },
          "cap_usd": {
            "allOf": [
              {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,12})?$"
              }
            ],
            "nullable": true
          },
          "spent_usd": {
            "allOf": [
              {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,12})?$"
              }
            ],
            "nullable": true
          },
          "remaining_usd": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]{1,12})?$",
            "nullable": true
          },
          "exceeded": {
            "type": "boolean"
          },
          "unresolved_runs": {
            "type": "integer",
            "minimum": 0
          },
          "as_of": {
            "allOf": [
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "configured",
          "budget_id",
          "policy_id",
          "period",
          "cap_usd",
          "spent_usd",
          "remaining_usd",
          "exceeded",
          "unresolved_runs",
          "as_of"
        ],
        "additionalProperties": false
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}

Errors and recovery

See API error handling and Troubleshooting.

Content version 028dbafaMarkdown source
budgets.get · Cumulus Talos docs