Create a usage report export
Changed onInitiates the generation of a usage report export for an enterprise. The report will be processed asynchronously and can be downloaded once completed. The authenticated user must be an enterprise admin or billing manager, or a custom role holder with fine-grained read access to enterprise billing. An installation access token for a GitHub App installed on the enterprise with write access to enterprise administration, or with read access to enterprise billing, can also initiate a usage report export.
[!NOTE] The "Enterprise administration" fine-grained permission is not available to callers. To use this API, you must use an OAuth app token or a personal access token (classic), or another supported fine-grained permission.
Request
- Base URL: https://api.github.com
- URL: https://api.github.com/enterprises/{enterprise}/settings/billing/reports
- Auth: none declared
Path parameters
The slug version of the enterprise name.
Request body
Example request
{
"start_date": "2024-01-01",
"end_date": "2024-01-31"
}Response
Report export request accepted
Example response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"report_type": "detailed",
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"status": "completed",
"download_urls": [
"https://github.com/enterprises/github/metered_exports/1234"
],
"created_at": "2024-01-15T10:30:00Z",
"actor": "monalisa"
}Changes
- warning
added the new
ai_creditenum value to theresponse property for the response status - info
added the new
ai_creditenum value to the request property
- warning