Skip to content

Get a budget by ID for an organization

GET
/organizations/{org}/settings/billing/budgets/{budget_id}

Gets a budget by ID. The authenticated user must be an organization admin or billing manager.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

budget_id
required
string

The ID corresponding to the budget.

Response when updating a budget

Media type application/json
object
id
required

ID of the budget.

string
budget_scope
required

The type of scope for the budget

string
Allowed values: enterprise organization repository cost_center multi_user_customer multi_user_cost_center user
budget_entity_name
required

The name of the entity to apply the budget to

string
user

The user login when the budget is scoped to a single user (user scope).

string
budget_amount
required

The budget amount in whole dollars. For license-based products, this represents the number of licenses.

integer
prevent_further_usage
required

Whether to prevent additional spending once the budget is exceeded

boolean
budget_product_sku
required

A single product or sku to apply the budget to.

string
budget_type
required
One of:
string
Allowed values: ProductPricing
budget_alerting
required
object
will_alert

Whether alerts are enabled for this budget

boolean
alert_recipients

Array of user login names who will receive alerts

Array<string>
Examples
Example default
{
"id": "2066deda-923f-43f9-88d2-62395a28c0cdd",
"budget_type": "ProductPricing",
"budget_product_sku": "actions_linux",
"budget_scope": "repository",
"budget_entity_name": "example-repo-name",
"budget_amount": 0,
"prevent_further_usage": true,
"budget_alerting": {
"will_alert": true,
"alert_recipients": [
"mona",
"lisa"
]
}
}

Bad Request

Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Internal Error

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Service unavailable

Media type application/json
object
code
string
message
string
documentation_url
string
Example generated
{
"code": "example",
"message": "example",
"documentation_url": "example"
}