Get this month's token budget and use of each queue, and the spend by queue, person and repo (REQ-104).
GET
/admin/budget
const url = 'https://example.com/api/v1/admin/budget';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/admin/budgetResponses
Section titled “ Responses ”The budget.
Media typeapplication/json
object
month
required
YYYY-MM, in UTC.
string
token_limit
The interactive queue’s limit.
integer format: int64
tokens_used
required
The interactive queue’s use.
integer format: int64
queues
required
The limit and use of each queue (docs/specs/hosted-operations.md).
Array<object>
object
queue
required
string
token_limit
integer format: int64
tokens_used
required
integer format: int64
spend
required
This month’s spend by queue, person and repo, largest first.
Array<object>
object
queue
required
string
actor
required
The user ID of the person, or “app” for the GitHub App.
string
actor_name
string
repo
required
The GitHub repo as owner/name, or empty when the work named none.
string
tokens
required
integer format: int64
cost_usd
required
number format: double
Example
{ "queues": [ { "queue": "interactive" } ], "spend": [ { "queue": "interactive" } ]}default
Section titled “default”An error.
Media typeapplication/problem+json
RFC 9457 problem details with a stable code.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required
A stable machine-readable error code.
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}