usage_summary
Creates, updates, deletes, gets or lists a usage_summary resource.
Overview
| Name | usage_summary |
| Type | Resource |
| Id | github.billing.usage_summary |
Fields
The following fields are returned by SELECT queries:
- get_github_billing_usage_summary_report_user
Response when getting a billing usage summary
| Name | Datatype | Description |
|---|---|---|
product | string | The product for the usage report. |
repository | string | The name of the repository for the usage report. |
sku | string | The SKU for the usage report. |
timePeriod | object | |
usageItems | array | |
user | string | The unique identifier of the user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_github_billing_usage_summary_report_user | select | username | year, month, day, repository, product, sku | > [!NOTE] > This endpoint is in public preview and is subject to change. Gets a summary report of usage for a user. Note: Only data from the past 24 months is accessible via this endpoint. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
username | string | The handle for the GitHub user account. |
day | integer | If specified, only return results for a single day. The value of day is an integer between 1 and 31. If no year or month is specified, the default year and month are used. |
month | integer | If specified, only return results for a single month. The value of month is an integer between 1 and 12. Default value is the current month. If no year is specified the default year is used. |
product | string | The product name to query usage for. The name is not case sensitive. |
repository | string | The repository name to query for usage in the format owner/repository. |
sku | string | The SKU to query for usage. |
year | integer | If specified, only return results for a single year. The value of year is an integer with four digits representing a year. For example, 2025. Default value is the current year. |
SELECT examples
- get_github_billing_usage_summary_report_user
> [!NOTE]
> This endpoint is in public preview and is subject to change.
Gets a summary report of usage for a user.
Note: Only data from the past 24 months is accessible via this endpoint.
SELECT
product,
repository,
sku,
timePeriod,
usageItems,
user
FROM github.billing.usage_summary
WHERE username = '{{ username }}' -- required
AND year = '{{ year }}'
AND month = '{{ month }}'
AND day = '{{ day }}'
AND repository = '{{ repository }}'
AND product = '{{ product }}'
AND sku = '{{ sku }}'
;