diff --git a/content/admin/installing-your-enterprise-server/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md b/content/admin/installing-your-enterprise-server/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md index f7de6a822ec5..9cfde3a66e81 100644 --- a/content/admin/installing-your-enterprise-server/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md +++ b/content/admin/installing-your-enterprise-server/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md @@ -15,6 +15,15 @@ category: --- You can deploy {% data variables.product.prodname_ghe_server %} on global Azure or Azure Government. +{% ifversion ghes = 3.20 %} +## Azure Local + +> [!NOTE] {% data variables.product.prodname_ghe_server %} on Azure Local is now in public preview. During this public preview, you can only use GHES version 3.20. + +If your organization requires sovereign deployments or operates in regulated environments, Azure Local is Microsoft's distributed infrastructure solution that enables this. Supporting regulated deployments, you can now host {% data variables.product.prodname_ghe_server %} on Azure Local. For more information, see [GitHub Enterprise Local](https://learn.microsoft.com/en-us/azure/azure-sovereign-clouds/private/github-local/github-local-overview). + +{% endif %} + ## Prerequisites * {% data reusables.enterprise_installation.software-license %} diff --git a/content/copilot/how-tos/github-copilot-app/getting-started.md b/content/copilot/how-tos/github-copilot-app/getting-started.md index 4d42e05d9043..26adacf512c9 100644 --- a/content/copilot/how-tos/github-copilot-app/getting-started.md +++ b/content/copilot/how-tos/github-copilot-app/getting-started.md @@ -27,7 +27,7 @@ For a conceptual overview of the {% data variables.copilot.github_copilot_app %} * **{% data variables.copilot.copilot_business_short %} or {% data variables.copilot.copilot_enterprise_short %} users**: You have access, as long as your organization or enterprise has enabled preview features and enabled {% data variables.copilot.copilot_cli_short %}. You can download the app directly from the [{% data variables.copilot.github_copilot_app %} repository](https://gh.io/github-copilot-app-repo?utm_source=docs-github-copilot-app-get-started&utm_medium=docs&utm_campaign=msbuild-2026). * **{% data variables.copilot.copilot_pro_short %} or {% data variables.copilot.copilot_pro_plus_short %} users**: You have access and can download the app directly from the [{% data variables.copilot.github_copilot_app %} repository](https://gh.io/github-copilot-app-repo?utm_source=docs-github-copilot-app-get-started&utm_medium=docs&utm_campaign=msbuild-2026). * **{% data variables.copilot.copilot_free_short %} users and users without a {% data variables.product.prodname_copilot_short %} plan**: Join the [waitlist](https://gh.io/github-copilot-app?utm_source=docs-github-copilot-app-get-started&utm_medium=docs&utm_campaign=msbuild-2026) to request access. -* The {% data variables.copilot.github_copilot_app %} installed on macOS, Windows, or Linux. Once you have access, you can download and install the application from the [{% data variables.copilot.github_copilot_app %} repository](https://github.com/github/app#install?utm_source=docs-github-copilot-app-get-started-install&utm_medium=docs&utm_campaign=msbuild-2026). +* The {% data variables.copilot.github_copilot_app %} installed on macOS, Windows, or Linux. Once you have access, you can download and install the application from the [{% data variables.copilot.github_copilot_app %} repository](https://github.com/github/app?utm_source=docs-github-copilot-app-get-started-install&utm_medium=docs&utm_campaign=msbuild-2026#install). ## Opening the {% data variables.copilot.github_copilot_app %} for the first time diff --git a/content/copilot/reference/copilot-billing/models-and-pricing.md b/content/copilot/reference/copilot-billing/models-and-pricing.md index 74c0dc9247de..100e70f239c4 100644 --- a/content/copilot/reference/copilot-billing/models-and-pricing.md +++ b/content/copilot/reference/copilot-billing/models-and-pricing.md @@ -71,6 +71,14 @@ Anthropic models include a cache write cost in addition to cached input. [^7]: {% data variables.copilot.copilot_raptor_mini %} uses {% data variables.copilot.copilot_gpt_5_mini %} pricing. +### Microsoft + +| Model | Release status | Category | Input | Cached input | Output | +| --- | --- | --- | ---: | ---: | ---: | +| {% for entry in tables.copilot.models-and-pricing %}{% if entry.provider == "microsoft" %} | +| {{ entry.model }} | {{ entry.release_status }} | {{ entry.category }} | {{ entry.input }} | {{ entry.cached_input }} | {{ entry.output }} | +| {% endif %}{% endfor %} | + ## Code completions {% data reusables.copilot.tbb-completions %} diff --git a/src/data-directory/lib/data-schemas/tables/copilot/models-and-pricing.ts b/src/data-directory/lib/data-schemas/tables/copilot/models-and-pricing.ts index c07fa6bdc4d0..fd9ecb0a2cce 100644 --- a/src/data-directory/lib/data-schemas/tables/copilot/models-and-pricing.ts +++ b/src/data-directory/lib/data-schemas/tables/copilot/models-and-pricing.ts @@ -26,7 +26,7 @@ const modelsAndPricingSchema = { }, provider: { type: 'string', - enum: ['openai', 'anthropic', 'google', 'xai', 'github'], + enum: ['openai', 'anthropic', 'google', 'microsoft', 'xai', 'github'], }, release_status: { type: 'string', diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json index b5483ce73d7c..ce358a44543d 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json @@ -126,6 +126,15 @@ "additional-permissions": false, "access": "write" }, + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage", + "additional-permissions": false, + "access": "read" + }, { "category": "billing", "slug": "get-all-budgets-for-an-organization", @@ -9219,6 +9228,15 @@ "title": "Plan", "displayTitle": "User permissions for \"Plan\"", "permissions": [ + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage", + "additional-permissions": false, + "access": "read" + }, { "category": "billing", "slug": "get-billing-premium-request-usage-report-for-a-user", diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json index b2e68657769b..1c6ef461e3f9 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json @@ -1374,6 +1374,12 @@ } ], "billing": [ + { + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage" + }, { "slug": "get-all-budgets-for-an-organization", "subcategory": "budgets", @@ -1416,6 +1422,12 @@ "verb": "get", "requestPath": "/organizations/{org}/settings/billing/usage/summary" }, + { + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage" + }, { "slug": "get-billing-premium-request-usage-report-for-a-user", "subcategory": "usage", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json index 2d9d330bc213..40e88d6c4229 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json @@ -406,6 +406,17 @@ "server-to-server": true, "additional-permissions": false }, + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage", + "access": "read", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, { "category": "billing", "slug": "get-all-budgets-for-an-organization", @@ -11715,6 +11726,17 @@ "title": "Plan", "displayTitle": "User permissions for \"Plan\"", "permissions": [ + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage", + "access": "read", + "user-to-server": true, + "server-to-server": false, + "additional-permissions": false + }, { "category": "billing", "slug": "get-billing-premium-request-usage-report-for-a-user", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json index 31535e0d7d7d..91a58f9015bd 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json @@ -1454,6 +1454,12 @@ } ], "billing": [ + { + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage" + }, { "slug": "get-all-budgets-for-an-organization", "subcategory": "budgets", diff --git a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json index 6495b4728fc3..f973e92f8a1a 100644 --- a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json @@ -1496,6 +1496,12 @@ } ], "billing": [ + { + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage" + }, { "slug": "get-all-budgets-for-an-organization", "subcategory": "budgets", @@ -1538,6 +1544,12 @@ "verb": "get", "requestPath": "/organizations/{org}/settings/billing/usage/summary" }, + { + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage" + }, { "slug": "get-billing-premium-request-usage-report-for-a-user", "subcategory": "usage", diff --git a/src/github-apps/data/fpt-2026-03-10/fine-grained-pat-permissions.json b/src/github-apps/data/fpt-2026-03-10/fine-grained-pat-permissions.json index b5483ce73d7c..ce358a44543d 100644 --- a/src/github-apps/data/fpt-2026-03-10/fine-grained-pat-permissions.json +++ b/src/github-apps/data/fpt-2026-03-10/fine-grained-pat-permissions.json @@ -126,6 +126,15 @@ "additional-permissions": false, "access": "write" }, + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage", + "additional-permissions": false, + "access": "read" + }, { "category": "billing", "slug": "get-all-budgets-for-an-organization", @@ -9219,6 +9228,15 @@ "title": "Plan", "displayTitle": "User permissions for \"Plan\"", "permissions": [ + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage", + "additional-permissions": false, + "access": "read" + }, { "category": "billing", "slug": "get-billing-premium-request-usage-report-for-a-user", diff --git a/src/github-apps/data/fpt-2026-03-10/fine-grained-pat.json b/src/github-apps/data/fpt-2026-03-10/fine-grained-pat.json index b2e68657769b..1c6ef461e3f9 100644 --- a/src/github-apps/data/fpt-2026-03-10/fine-grained-pat.json +++ b/src/github-apps/data/fpt-2026-03-10/fine-grained-pat.json @@ -1374,6 +1374,12 @@ } ], "billing": [ + { + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage" + }, { "slug": "get-all-budgets-for-an-organization", "subcategory": "budgets", @@ -1416,6 +1422,12 @@ "verb": "get", "requestPath": "/organizations/{org}/settings/billing/usage/summary" }, + { + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage" + }, { "slug": "get-billing-premium-request-usage-report-for-a-user", "subcategory": "usage", diff --git a/src/github-apps/data/fpt-2026-03-10/server-to-server-permissions.json b/src/github-apps/data/fpt-2026-03-10/server-to-server-permissions.json index 2d9d330bc213..40e88d6c4229 100644 --- a/src/github-apps/data/fpt-2026-03-10/server-to-server-permissions.json +++ b/src/github-apps/data/fpt-2026-03-10/server-to-server-permissions.json @@ -406,6 +406,17 @@ "server-to-server": true, "additional-permissions": false }, + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage", + "access": "read", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, { "category": "billing", "slug": "get-all-budgets-for-an-organization", @@ -11715,6 +11726,17 @@ "title": "Plan", "displayTitle": "User permissions for \"Plan\"", "permissions": [ + { + "category": "billing", + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage", + "access": "read", + "user-to-server": true, + "server-to-server": false, + "additional-permissions": false + }, { "category": "billing", "slug": "get-billing-premium-request-usage-report-for-a-user", diff --git a/src/github-apps/data/fpt-2026-03-10/server-to-server-rest.json b/src/github-apps/data/fpt-2026-03-10/server-to-server-rest.json index 31535e0d7d7d..91a58f9015bd 100644 --- a/src/github-apps/data/fpt-2026-03-10/server-to-server-rest.json +++ b/src/github-apps/data/fpt-2026-03-10/server-to-server-rest.json @@ -1454,6 +1454,12 @@ } ], "billing": [ + { + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage" + }, { "slug": "get-all-budgets-for-an-organization", "subcategory": "budgets", diff --git a/src/github-apps/data/fpt-2026-03-10/user-to-server-rest.json b/src/github-apps/data/fpt-2026-03-10/user-to-server-rest.json index 6495b4728fc3..f973e92f8a1a 100644 --- a/src/github-apps/data/fpt-2026-03-10/user-to-server-rest.json +++ b/src/github-apps/data/fpt-2026-03-10/user-to-server-rest.json @@ -1496,6 +1496,12 @@ } ], "billing": [ + { + "slug": "get-billing-ai-credit-usage-report-for-an-organization", + "subcategory": "usage", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage" + }, { "slug": "get-all-budgets-for-an-organization", "subcategory": "budgets", @@ -1538,6 +1544,12 @@ "verb": "get", "requestPath": "/organizations/{org}/settings/billing/usage/summary" }, + { + "slug": "get-billing-ai-credit-usage-report-for-a-user", + "subcategory": "usage", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage" + }, { "slug": "get-billing-premium-request-usage-report-for-a-user", "subcategory": "usage", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index bda14266eaef..f536dceb583a 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "9be34b1f355a4330ec7c04381dd081e4865ac820" + "sha": "c4a52d9b0b4f5db4e7de178c9f8f90b5f6360563" } \ No newline at end of file diff --git a/src/rest/data/fpt-2022-11-28/billing.json b/src/rest/data/fpt-2022-11-28/billing.json index c0f84e5b1865..7180cbcef1a4 100644 --- a/src/rest/data/fpt-2022-11-28/billing.json +++ b/src/rest/data/fpt-2022-11-28/billing.json @@ -783,6 +783,266 @@ } ], "usage": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage", + "title": "Get billing AI credit usage report for an organization", + "category": "billing", + "subcategory": "usage", + "parameters": [ + { + "name": "org", + "description": "

The organization name. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "year", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "month", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "day", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "user", + "description": "

The user name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "description": "

The model name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "product", + "description": "

The product name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

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

\n

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

", + "codeExamples": [ + { + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response when getting a billing AI credit usage report

", + "example": { + "timePeriod": { + "year": 2025 + }, + "organization": "GitHub", + "usageItems": [ + { + "product": "Copilot", + "sku": "Copilot AI Credits", + "model": "GPT-5", + "unitType": "credits", + "pricePerUnit": 0.01, + "grossQuantity": 100, + "grossAmount": 1, + "discountQuantity": 0, + "discountAmount": 0, + "netQuantity": 100, + "netAmount": 1 + } + ] + }, + "schema": { + "type": "object", + "properties": { + "timePeriod": { + "type": "object", + "properties": { + "year": { + "type": "integer", + "description": "The year for the usage report." + }, + "month": { + "type": "integer", + "description": "The month for the usage report." + }, + "day": { + "type": "integer", + "description": "The day for the usage report." + } + }, + "required": [ + "year" + ] + }, + "organization": { + "type": "string", + "description": "The unique identifier of the organization." + }, + "user": { + "type": "string", + "description": "The name of the user for the usage report." + }, + "product": { + "type": "string", + "description": "The product for the usage report." + }, + "model": { + "type": "string", + "description": "The model for the usage report." + }, + "usageItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "string", + "description": "Product name." + }, + "sku": { + "type": "string", + "description": "SKU name." + }, + "model": { + "type": "string", + "description": "Model name." + }, + "unitType": { + "type": "string", + "description": "Unit type of the usage line item." + }, + "pricePerUnit": { + "type": "number", + "description": "Price per unit of the usage line item." + }, + "grossQuantity": { + "type": "number", + "description": "Gross quantity of the usage line item." + }, + "grossAmount": { + "type": "number", + "description": "Gross amount of the usage line item." + }, + "discountQuantity": { + "type": "number", + "description": "Discount quantity of the usage line item." + }, + "discountAmount": { + "type": "number", + "description": "Discount amount of the usage line item." + }, + "netQuantity": { + "type": "number", + "description": "Net quantity of the usage line item." + }, + "netAmount": { + "type": "number", + "description": "Net amount of the usage line item." + } + }, + "required": [ + "product", + "sku", + "model", + "unitType", + "pricePerUnit", + "grossQuantity", + "grossAmount", + "discountQuantity", + "discountAmount", + "netQuantity", + "netAmount" + ] + } + } + }, + "required": [ + "timePeriod", + "organization", + "usageItems" + ] + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Response when getting a billing AI credit usage report

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "read" + } + ] + } + }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -1476,6 +1736,253 @@ ] } }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage", + "title": "Get billing AI credit usage report for a user", + "category": "billing", + "subcategory": "usage", + "parameters": [ + { + "name": "username", + "description": "

The handle for the GitHub user account.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "year", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "month", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "day", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "model", + "description": "

The model name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "product", + "description": "

The product name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Gets a report of AI credit usage for a user.

\n

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

", + "codeExamples": [ + { + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "username": "USERNAME" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response when getting a billing AI credit usage report

", + "example": { + "timePeriod": { + "year": 2025 + }, + "user": "monalisa", + "usageItems": [ + { + "product": "Copilot AI Credits", + "sku": "AI Credit", + "model": "GPT-5", + "unitType": "ai-credits", + "pricePerUnit": 0.01, + "grossQuantity": 100, + "grossAmount": 1, + "discountQuantity": 0, + "discountAmount": 0, + "netQuantity": 100, + "netAmount": 1 + } + ] + }, + "schema": { + "type": "object", + "properties": { + "timePeriod": { + "type": "object", + "properties": { + "year": { + "type": "integer", + "description": "The year for the usage report." + }, + "month": { + "type": "integer", + "description": "The month for the usage report." + }, + "day": { + "type": "integer", + "description": "The day for the usage report." + } + }, + "required": [ + "year" + ] + }, + "user": { + "type": "string", + "description": "The unique identifier of the user." + }, + "product": { + "type": "string", + "description": "The product for the usage report." + }, + "model": { + "type": "string", + "description": "The model for the usage report." + }, + "usageItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "string", + "description": "Product name." + }, + "sku": { + "type": "string", + "description": "SKU name." + }, + "model": { + "type": "string", + "description": "Model name." + }, + "unitType": { + "type": "string", + "description": "Unit type of the usage line item." + }, + "pricePerUnit": { + "type": "number", + "description": "Price per unit of the usage line item." + }, + "grossQuantity": { + "type": "number", + "description": "Gross quantity of the usage line item." + }, + "grossAmount": { + "type": "number", + "description": "Gross amount of the usage line item." + }, + "discountQuantity": { + "type": "number", + "description": "Discount quantity of the usage line item." + }, + "discountAmount": { + "type": "number", + "description": "Discount amount of the usage line item." + }, + "netQuantity": { + "type": "number", + "description": "Net quantity of the usage line item." + }, + "netAmount": { + "type": "number", + "description": "Net amount of the usage line item." + } + }, + "required": [ + "product", + "sku", + "model", + "unitType", + "pricePerUnit", + "grossQuantity", + "grossAmount", + "discountQuantity", + "discountAmount", + "netQuantity", + "netAmount" + ] + } + } + }, + "required": [ + "timePeriod", + "user", + "usageItems" + ] + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Response when getting a billing AI credit usage report

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": false, + "fineGrainedPat": true, + "permissions": [ + { + "\"Plan\" user permissions": "read" + } + ] + } + }, { "serverUrl": "https://api.github.com", "verb": "get", diff --git a/src/rest/data/fpt-2022-11-28/copilot.json b/src/rest/data/fpt-2022-11-28/copilot.json index 0aa6763175ff..1a82aee0f1e4 100644 --- a/src/rest/data/fpt-2022-11-28/copilot.json +++ b/src/rest/data/fpt-2022-11-28/copilot.json @@ -3530,8 +3530,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -3627,8 +3627,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -3740,8 +3740,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -3846,8 +3846,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -3943,8 +3943,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -4056,8 +4056,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -4157,8 +4157,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -4270,8 +4270,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -4380,8 +4380,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -4481,8 +4481,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" diff --git a/src/rest/data/fpt-2026-03-10/billing.json b/src/rest/data/fpt-2026-03-10/billing.json index c0f84e5b1865..7180cbcef1a4 100644 --- a/src/rest/data/fpt-2026-03-10/billing.json +++ b/src/rest/data/fpt-2026-03-10/billing.json @@ -783,6 +783,266 @@ } ], "usage": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/organizations/{org}/settings/billing/ai_credit/usage", + "title": "Get billing AI credit usage report for an organization", + "category": "billing", + "subcategory": "usage", + "parameters": [ + { + "name": "org", + "description": "

The organization name. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "year", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "month", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "day", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "user", + "description": "

The user name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "description": "

The model name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "product", + "description": "

The product name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

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

\n

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

", + "codeExamples": [ + { + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response when getting a billing AI credit usage report

", + "example": { + "timePeriod": { + "year": 2025 + }, + "organization": "GitHub", + "usageItems": [ + { + "product": "Copilot", + "sku": "Copilot AI Credits", + "model": "GPT-5", + "unitType": "credits", + "pricePerUnit": 0.01, + "grossQuantity": 100, + "grossAmount": 1, + "discountQuantity": 0, + "discountAmount": 0, + "netQuantity": 100, + "netAmount": 1 + } + ] + }, + "schema": { + "type": "object", + "properties": { + "timePeriod": { + "type": "object", + "properties": { + "year": { + "type": "integer", + "description": "The year for the usage report." + }, + "month": { + "type": "integer", + "description": "The month for the usage report." + }, + "day": { + "type": "integer", + "description": "The day for the usage report." + } + }, + "required": [ + "year" + ] + }, + "organization": { + "type": "string", + "description": "The unique identifier of the organization." + }, + "user": { + "type": "string", + "description": "The name of the user for the usage report." + }, + "product": { + "type": "string", + "description": "The product for the usage report." + }, + "model": { + "type": "string", + "description": "The model for the usage report." + }, + "usageItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "string", + "description": "Product name." + }, + "sku": { + "type": "string", + "description": "SKU name." + }, + "model": { + "type": "string", + "description": "Model name." + }, + "unitType": { + "type": "string", + "description": "Unit type of the usage line item." + }, + "pricePerUnit": { + "type": "number", + "description": "Price per unit of the usage line item." + }, + "grossQuantity": { + "type": "number", + "description": "Gross quantity of the usage line item." + }, + "grossAmount": { + "type": "number", + "description": "Gross amount of the usage line item." + }, + "discountQuantity": { + "type": "number", + "description": "Discount quantity of the usage line item." + }, + "discountAmount": { + "type": "number", + "description": "Discount amount of the usage line item." + }, + "netQuantity": { + "type": "number", + "description": "Net quantity of the usage line item." + }, + "netAmount": { + "type": "number", + "description": "Net amount of the usage line item." + } + }, + "required": [ + "product", + "sku", + "model", + "unitType", + "pricePerUnit", + "grossQuantity", + "grossAmount", + "discountQuantity", + "discountAmount", + "netQuantity", + "netAmount" + ] + } + } + }, + "required": [ + "timePeriod", + "organization", + "usageItems" + ] + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Response when getting a billing AI credit usage report

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "\"Administration\" organization permissions": "read" + } + ] + } + }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -1476,6 +1736,253 @@ ] } }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/users/{username}/settings/billing/ai_credit/usage", + "title": "Get billing AI credit usage report for a user", + "category": "billing", + "subcategory": "usage", + "parameters": [ + { + "name": "username", + "description": "

The handle for the GitHub user account.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "year", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "month", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "day", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "model", + "description": "

The model name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "product", + "description": "

The product name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Gets a report of AI credit usage for a user.

\n

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

", + "codeExamples": [ + { + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "username": "USERNAME" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response when getting a billing AI credit usage report

", + "example": { + "timePeriod": { + "year": 2025 + }, + "user": "monalisa", + "usageItems": [ + { + "product": "Copilot AI Credits", + "sku": "AI Credit", + "model": "GPT-5", + "unitType": "ai-credits", + "pricePerUnit": 0.01, + "grossQuantity": 100, + "grossAmount": 1, + "discountQuantity": 0, + "discountAmount": 0, + "netQuantity": 100, + "netAmount": 1 + } + ] + }, + "schema": { + "type": "object", + "properties": { + "timePeriod": { + "type": "object", + "properties": { + "year": { + "type": "integer", + "description": "The year for the usage report." + }, + "month": { + "type": "integer", + "description": "The month for the usage report." + }, + "day": { + "type": "integer", + "description": "The day for the usage report." + } + }, + "required": [ + "year" + ] + }, + "user": { + "type": "string", + "description": "The unique identifier of the user." + }, + "product": { + "type": "string", + "description": "The product for the usage report." + }, + "model": { + "type": "string", + "description": "The model for the usage report." + }, + "usageItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "string", + "description": "Product name." + }, + "sku": { + "type": "string", + "description": "SKU name." + }, + "model": { + "type": "string", + "description": "Model name." + }, + "unitType": { + "type": "string", + "description": "Unit type of the usage line item." + }, + "pricePerUnit": { + "type": "number", + "description": "Price per unit of the usage line item." + }, + "grossQuantity": { + "type": "number", + "description": "Gross quantity of the usage line item." + }, + "grossAmount": { + "type": "number", + "description": "Gross amount of the usage line item." + }, + "discountQuantity": { + "type": "number", + "description": "Discount quantity of the usage line item." + }, + "discountAmount": { + "type": "number", + "description": "Discount amount of the usage line item." + }, + "netQuantity": { + "type": "number", + "description": "Net quantity of the usage line item." + }, + "netAmount": { + "type": "number", + "description": "Net amount of the usage line item." + } + }, + "required": [ + "product", + "sku", + "model", + "unitType", + "pricePerUnit", + "grossQuantity", + "grossAmount", + "discountQuantity", + "discountAmount", + "netQuantity", + "netAmount" + ] + } + } + }, + "required": [ + "timePeriod", + "user", + "usageItems" + ] + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Response when getting a billing AI credit usage report

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": false, + "fineGrainedPat": true, + "permissions": [ + { + "\"Plan\" user permissions": "read" + } + ] + } + }, { "serverUrl": "https://api.github.com", "verb": "get", diff --git a/src/rest/data/fpt-2026-03-10/copilot.json b/src/rest/data/fpt-2026-03-10/copilot.json index be375ab2791e..b8afafbdb276 100644 --- a/src/rest/data/fpt-2026-03-10/copilot.json +++ b/src/rest/data/fpt-2026-03-10/copilot.json @@ -3527,8 +3527,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -3624,8 +3624,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -3737,8 +3737,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -3843,8 +3843,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -3940,8 +3940,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -4053,8 +4053,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -4154,8 +4154,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -4267,8 +4267,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -4377,8 +4377,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -4478,8 +4478,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" diff --git a/src/rest/data/ghec-2022-11-28/billing.json b/src/rest/data/ghec-2022-11-28/billing.json index d36e0cf44ced..2bfab8f282cc 100644 --- a/src/rest/data/ghec-2022-11-28/billing.json +++ b/src/rest/data/ghec-2022-11-28/billing.json @@ -2193,6 +2193,301 @@ } ], "usage": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/settings/billing/ai_credit/usage", + "title": "Get billing AI credit usage report for an enterprise", + "category": "billing", + "subcategory": "usage", + "parameters": [ + { + "name": "enterprise", + "description": "

The slug version of the enterprise name.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "year", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "month", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "day", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "organization", + "description": "

The organization name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user", + "description": "

The user name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "description": "

The model name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "product", + "description": "

The product name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cost_center_id", + "description": "

The ID corresponding to a cost center. An ID of 'none' will target usage not associated to any cost center.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Gets a report of AI credit usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.

\n

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

", + "codeExamples": [ + { + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response when getting a billing AI credit usage report

", + "example": { + "timePeriod": { + "year": 2025 + }, + "enterprise": "GitHub", + "usageItems": [ + { + "product": "Copilot", + "sku": "Copilot AI Credits", + "model": "GPT-5", + "unitType": "credits", + "pricePerUnit": 0.01, + "grossQuantity": 100, + "grossAmount": 1, + "discountQuantity": 0, + "discountAmount": 0, + "netQuantity": 100, + "netAmount": 1 + } + ] + }, + "schema": { + "type": "object", + "properties": { + "timePeriod": { + "type": "object", + "properties": { + "year": { + "type": "integer", + "description": "The year for the usage report." + }, + "month": { + "type": "integer", + "description": "The month for the usage report." + }, + "day": { + "type": "integer", + "description": "The day for the usage report." + } + }, + "required": [ + "year" + ] + }, + "enterprise": { + "type": "string", + "description": "The name of the enterprise for the usage report." + }, + "user": { + "type": "string", + "description": "The name of the user for the usage report." + }, + "organization": { + "type": "string", + "description": "The name of the organization for the usage report." + }, + "product": { + "type": "string", + "description": "The product for the usage report." + }, + "model": { + "type": "string", + "description": "The model for the usage report." + }, + "costCenter": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the cost center." + }, + "name": { + "type": "string", + "description": "The name of the cost center." + } + }, + "required": [ + "id", + "name" + ] + }, + "usageItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "string", + "description": "Product name." + }, + "sku": { + "type": "string", + "description": "SKU name." + }, + "model": { + "type": "string", + "description": "Model name." + }, + "unitType": { + "type": "string", + "description": "Unit type of the usage line item." + }, + "pricePerUnit": { + "type": "number", + "description": "Price per unit of the usage line item." + }, + "grossQuantity": { + "type": "number", + "description": "Gross quantity of the usage line item." + }, + "grossAmount": { + "type": "number", + "description": "Gross amount of the usage line item." + }, + "discountQuantity": { + "type": "number", + "description": "Discount quantity of the usage line item." + }, + "discountAmount": { + "type": "number", + "description": "Discount amount of the usage line item." + }, + "netQuantity": { + "type": "number", + "description": "Net quantity of the usage line item." + }, + "netAmount": { + "type": "number", + "description": "Net amount of the usage line item." + } + }, + "required": [ + "product", + "sku", + "model", + "unitType", + "pricePerUnit", + "grossQuantity", + "grossAmount", + "discountQuantity", + "discountAmount", + "netQuantity", + "netAmount" + ] + } + } + }, + "required": [ + "timePeriod", + "enterprise", + "usageItems" + ] + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Response when getting a billing AI credit usage report

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": false, + "serverToServer": false, + "fineGrainedPat": false, + "permissions": [] + } + }, { "serverUrl": "https://api.github.com", "verb": "get", diff --git a/src/rest/data/ghec-2022-11-28/copilot.json b/src/rest/data/ghec-2022-11-28/copilot.json index b2ee2e36b9d8..e10e80bbcc25 100644 --- a/src/rest/data/ghec-2022-11-28/copilot.json +++ b/src/rest/data/ghec-2022-11-28/copilot.json @@ -5416,8 +5416,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -5513,8 +5513,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -5626,8 +5626,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -5732,8 +5732,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -5829,8 +5829,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -5942,8 +5942,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -6043,8 +6043,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -6156,8 +6156,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -6266,8 +6266,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -6367,8 +6367,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" diff --git a/src/rest/data/ghec-2026-03-10/billing.json b/src/rest/data/ghec-2026-03-10/billing.json index d36e0cf44ced..2bfab8f282cc 100644 --- a/src/rest/data/ghec-2026-03-10/billing.json +++ b/src/rest/data/ghec-2026-03-10/billing.json @@ -2193,6 +2193,301 @@ } ], "usage": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/enterprises/{enterprise}/settings/billing/ai_credit/usage", + "title": "Get billing AI credit usage report for an enterprise", + "category": "billing", + "subcategory": "usage", + "parameters": [ + { + "name": "enterprise", + "description": "

The slug version of the enterprise name.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "year", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "month", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "day", + "description": "

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.

", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "organization", + "description": "

The organization name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user", + "description": "

The user name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "description": "

The model name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "product", + "description": "

The product name to query usage for. The name is not case sensitive.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cost_center_id", + "description": "

The ID corresponding to a cost center. An ID of 'none' will target usage not associated to any cost center.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "descriptionHTML": "

Gets a report of AI credit usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.

\n

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

", + "codeExamples": [ + { + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "enterprise": "ENTERPRISE" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Response when getting a billing AI credit usage report

", + "example": { + "timePeriod": { + "year": 2025 + }, + "enterprise": "GitHub", + "usageItems": [ + { + "product": "Copilot", + "sku": "Copilot AI Credits", + "model": "GPT-5", + "unitType": "credits", + "pricePerUnit": 0.01, + "grossQuantity": 100, + "grossAmount": 1, + "discountQuantity": 0, + "discountAmount": 0, + "netQuantity": 100, + "netAmount": 1 + } + ] + }, + "schema": { + "type": "object", + "properties": { + "timePeriod": { + "type": "object", + "properties": { + "year": { + "type": "integer", + "description": "The year for the usage report." + }, + "month": { + "type": "integer", + "description": "The month for the usage report." + }, + "day": { + "type": "integer", + "description": "The day for the usage report." + } + }, + "required": [ + "year" + ] + }, + "enterprise": { + "type": "string", + "description": "The name of the enterprise for the usage report." + }, + "user": { + "type": "string", + "description": "The name of the user for the usage report." + }, + "organization": { + "type": "string", + "description": "The name of the organization for the usage report." + }, + "product": { + "type": "string", + "description": "The product for the usage report." + }, + "model": { + "type": "string", + "description": "The model for the usage report." + }, + "costCenter": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the cost center." + }, + "name": { + "type": "string", + "description": "The name of the cost center." + } + }, + "required": [ + "id", + "name" + ] + }, + "usageItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "string", + "description": "Product name." + }, + "sku": { + "type": "string", + "description": "SKU name." + }, + "model": { + "type": "string", + "description": "Model name." + }, + "unitType": { + "type": "string", + "description": "Unit type of the usage line item." + }, + "pricePerUnit": { + "type": "number", + "description": "Price per unit of the usage line item." + }, + "grossQuantity": { + "type": "number", + "description": "Gross quantity of the usage line item." + }, + "grossAmount": { + "type": "number", + "description": "Gross amount of the usage line item." + }, + "discountQuantity": { + "type": "number", + "description": "Discount quantity of the usage line item." + }, + "discountAmount": { + "type": "number", + "description": "Discount amount of the usage line item." + }, + "netQuantity": { + "type": "number", + "description": "Net quantity of the usage line item." + }, + "netAmount": { + "type": "number", + "description": "Net amount of the usage line item." + } + }, + "required": [ + "product", + "sku", + "model", + "unitType", + "pricePerUnit", + "grossQuantity", + "grossAmount", + "discountQuantity", + "discountAmount", + "netQuantity", + "netAmount" + ] + } + } + }, + "required": [ + "timePeriod", + "enterprise", + "usageItems" + ] + } + } + } + ], + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Response when getting a billing AI credit usage report

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "500", + "description": "

Internal Error

" + }, + { + "httpStatusCode": "503", + "description": "

Service unavailable

" + } + ], + "previews": [], + "progAccess": { + "userToServerRest": false, + "serverToServer": false, + "fineGrainedPat": false, + "permissions": [] + } + }, { "serverUrl": "https://api.github.com", "verb": "get", diff --git a/src/rest/data/ghec-2026-03-10/copilot.json b/src/rest/data/ghec-2026-03-10/copilot.json index 117b43c437ba..20cd6ffc6a1d 100644 --- a/src/rest/data/ghec-2026-03-10/copilot.json +++ b/src/rest/data/ghec-2026-03-10/copilot.json @@ -5413,8 +5413,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -5510,8 +5510,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -5623,8 +5623,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -5729,8 +5729,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -5826,8 +5826,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -5939,8 +5939,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -6040,8 +6040,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" @@ -6153,8 +6153,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -6263,8 +6263,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_day": "2025-07-01" }, @@ -6364,8 +6364,8 @@ "description": "

Response

", "example": { "download_links": [ - "https://example.com/copilot-usage-report-1.json", - "https://example.com/copilot-usage-report-2.json" + "https://example.com/copilot-usage-report-1.ndjson", + "https://example.com/copilot-usage-report-2.ndjson" ], "report_start_day": "2025-07-01", "report_end_day": "2025-07-28" diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index 833c3b5896e8..e827eb1d2189 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -50,5 +50,5 @@ ] } }, - "sha": "9be34b1f355a4330ec7c04381dd081e4865ac820" + "sha": "c4a52d9b0b4f5db4e7de178c9f8f90b5f6360563" } \ No newline at end of file diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index 6caf8a451892..cfe335c71832 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "9be34b1f355a4330ec7c04381dd081e4865ac820" + "sha": "c4a52d9b0b4f5db4e7de178c9f8f90b5f6360563" } \ No newline at end of file