org_premium_request_usage
Creates, updates, deletes, gets or lists an org_premium_request_usage resource.
Overview
| Name | org_premium_request_usage |
| Type | Resource |
| Id | github.billing.org_premium_request_usage |
Fields
The following fields are returned by SELECT queries:
- get_github_billing_premium_request_usage_report_org
Response when getting a billing premium request usage report
| Name | Datatype | Description |
|---|---|---|
model | string | The model for the usage report. |
organization | string | The unique identifier of the organization. |
product | string | The product for the usage report. |
timePeriod | object | |
usageItems | array | |
user | string | The name of the user for the usage report. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_github_billing_premium_request_usage_report_org | select | org | year, month, day, user, model, product | Gets a report of premium request 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.
| Name | Datatype | Description |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
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. |
model | string | The model name to query usage for. The name is not case sensitive. |
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. |
user | string | The user name to query usage for. The name is not case sensitive. |
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_premium_request_usage_report_org
Gets a report of premium request 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
model,
organization,
product,
timePeriod,
usageItems,
user
FROM github.billing.org_premium_request_usage
WHERE org = '{{ org }}' -- required
AND year = '{{ year }}'
AND month = '{{ month }}'
AND day = '{{ day }}'
AND user = '{{ user }}'
AND model = '{{ model }}'
AND product = '{{ product }}'
;