Sample - GitHub REST API
GET/organizations/{org}/settings/billing/budgets/{budget_id}

Get a budget by ID for an organization

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

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
orgstringrequired
The organization name. The name is not case sensitive.
budget_idstringrequired
The ID corresponding to the budget.

6 status codes
200Response when updating a budget
idstringrequired
ID of the budget.
budget_scopestringrequired
The type of scope for the budget
Allowed:enterpriseorganizationrepositorycost_centermulti_user_customermulti_user_cost_centeruser
budget_entity_namestringrequired
The name of the entity to apply the budget to
userstringoptional
The user login when the budget is scoped to a single user (`user` scope).
budget_amountintegerrequired
The budget amount in whole dollars. For license-based products, this represents the number of licenses.
prevent_further_usagebooleanrequired
Whether to prevent additional spending once the budget is exceeded
budget_product_skustringrequired
A single product or sku to apply the budget to.
budget_typestringrequired
The type of pricing for the budget
Allowed:ProductPricing
budget_alertingobjectrequired
400Bad Request
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
500Internal Error
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
503Service unavailable
codestringoptional
messagestringoptional
documentation_urlstringoptional

Error handling

A 400 is returned: Bad Request. A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 500 is returned: Internal Error. A 503 is returned: Service unavailable.