billing
Get all budgets
Gets budgets for an enterprise. Enterprise owners and billing managers can view all budgets. Organization administrators can view budgets scoped to organizations and repositories they administer. Each page returns up to 100 budgets.
get/enterprises/{enterprise}/settings/billing/budgets
Path parameters
enterprisestring required
The slug version of the enterprise name.
Query parameters
pageinteger
The page number of results to fetch.
per_pageinteger
The number of results per page (max 100).
scope'enterprise' | 'organization' | 'repository' | 'cost_center' | 'multi_user_customer' | 'multi_user_cost_center' | 'user'
Filter budgets by scope type.
- enterprise: Budgets that apply to the entire enterprise.
- organization: Budgets scoped to an organization in the enterprise.
- repository: Budgets scoped to a repository.
- cost_center: Budgets scoped to a cost center.
- multi_user_customer: Universal budgets that apply to all users in the enterprise.
- multi_user_cost_center: Universal budgets that apply to all users in a cost center.
- user: Budgets scoped to an individual user.
userstring
Filter consumed amount details for budgets by the specified user login.
Response
Response when getting all budgets
Example response
{
"budgets": [
{
"id": "2066deda-923f-43f9-88d2-62395a28c0cdd",
"prevent_further_usage": true,
"budget_scope": "enterprise",
"budget_entity_name": "octocat/hello-world",
"user": "octocat",
"budget_alerting": {
"will_alert": true,
"alert_recipients": [
"mona",
"lisa"
]
}
}
]
}