Skip to main content

org_usage_summary

Creates, updates, deletes, gets or lists an org_usage_summary resource.

Overview

Nameorg_usage_summary
TypeResource
Idgithub.billing.org_usage_summary

Fields

The following fields are returned by SELECT queries:

Response when getting a billing usage summary

NameDatatypeDescription
organizationstringThe unique identifier of the organization.
productstringThe product for the usage report.
repositorystringThe name of the repository for the usage report.
skustringThe SKU for the usage report.
timePeriodobject
usageItemsarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_github_billing_usage_summary_report_orgselectorgyear, month, day, repository, product, sku> [!NOTE]
> This endpoint is in public preview and is subject to change.

Gets a summary report of usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

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.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.
dayintegerIf 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.
monthintegerIf 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.
productstringThe product name to query usage for. The name is not case sensitive.
repositorystringThe repository name to query for usage in the format owner/repository.
skustringThe SKU to query for usage.
yearintegerIf 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

> [!NOTE]
> This endpoint is in public preview and is subject to change.

Gets a summary report of usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

Note: Only data from the past 24 months is accessible via this endpoint.

SELECT
organization,
product,
repository,
sku,
timePeriod,
usageItems
FROM github.billing.org_usage_summary
WHERE org = '{{ org }}' -- required
AND year = '{{ year }}'
AND month = '{{ month }}'
AND day = '{{ day }}'
AND repository = '{{ repository }}'
AND product = '{{ product }}'
AND sku = '{{ sku }}'
;