You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 72a5db1
Browse filesBrowse the repository at this point in the historyBrowse files
Enterprise owners can also grant a {% data variables.product.prodname_github_app %} the enterprise billing permission, so that an app can access enterprise billing data through the REST API without using a token that belongs to an individual. For more information, see [AUTOTITLE](/billing/tutorials/automate-usage-reporting).
34
+
{% endif %}
35
+
31
36
## Organization owners
32
37
33
38
You have full administrative access to your organization. You can:
Copy file name to clipboardExpand all lines: content/billing/tutorials/automate-usage-reporting.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,34 @@ Before you begin this tutorial, make sure that:
28
28
* Enterprise-level reports: enterprise administrator or billing manager
29
29
30
30
* You’re familiar with making authenticated requests to the REST API. For an introduction, see [AUTOTITLE](/rest/using-the-rest-api).
31
-
* You authenticate using a {% data variables.product.pat_v1 %}. The billing usage endpoints do not support {% data variables.product.pat_v2_plural %}.
31
+
* You authenticate using a {% data variables.product.pat_v1 %}. The billing usage endpoints do not support {% data variables.product.pat_v2_plural %}.{% ifversion enterprise-billing-github-app %} For enterprise-level reporting, you can authenticate with a {% data variables.product.prodname_github_app %} instead. See [Authenticating with a {% data variables.product.prodname_github_app %}](#authenticating-with-a-github-app).{% endif %}
32
32
33
33
Depending on your reporting needs, you may also want access to an internal system (such as a spreadsheet, database, or BI tool) where you can store and analyze the usage data retrieved from the API.
34
34
35
+
{% ifversion enterprise-billing-github-app %}
36
+
37
+
## Authenticating with a {% data variables.product.prodname_github_app %}
38
+
39
+
For enterprise-level reporting, you can authenticate with a {% data variables.product.prodname_github_app %} instead of a {% data variables.product.pat_generic %}. Your automation then does not depend on a token that belongs to an individual enterprise owner or billing manager, so your reports keep running when someone changes role or leaves the enterprise.
40
+
41
+
An enterprise owner can grant an app the enterprise billing permission at one of two levels of access:
42
+
43
+
***Read**: The app can retrieve usage reports, budgets, and cost centers. This is the access the reporting in this tutorial requires.
44
+
***Read and write**: The app can create, update, and delete budgets and cost centers, and add or remove resources from cost centers.
45
+
46
+
To report on usage with an app:
47
+
48
+
1. Register a {% data variables.product.prodname_github_app %} that requests the enterprise billing permission. See [AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/registering-a-github-app).
49
+
1. Ask an enterprise owner to install the app on your enterprise. See [AUTOTITLE](/apps/using-github-apps/installing-a-github-app-on-your-enterprise).
50
+
1. Generate an installation access token for the enterprise installation. See [AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app).
51
+
1. Send the installation access token in the `Authorization` header of your requests, in place of a {% data variables.product.pat_generic %}.
52
+
53
+
An installation access token expires after one hour, so your automation must generate a new token each time it runs or whenever the current token expires.
54
+
55
+
For the endpoints an app can call with each permission, see [AUTOTITLE](/rest/authentication/permissions-required-for-github-apps).
56
+
57
+
{% endif %}
58
+
35
59
## Step 1: Decide what level to report on
36
60
37
61
Decide which account level you want to report on. This determines **which REST API endpoint you’ll call** and what your report will include.
Replace `ENTERPRISE` with the enterprise slug and set the `GITHUB_TOKEN` environment variable to a {% data variables.product.pat_generic %} with the required billing permissions.
103
+
Replace `ENTERPRISE` with the enterprise slug and set the `GITHUB_TOKEN` environment variable to a {% data variables.product.pat_generic %} with the required billing permissions.{% ifversion enterprise-billing-github-app %} Alternatively, set `GITHUB_TOKEN` to an installation access token from a {% data variables.product.prodname_github_app %} with the enterprise billing permission.{% endif %}
80
104
81
105
**Example using the {% data variables.product.prodname_cli %}**
Copy file name to clipboardExpand all lines: content/copilot/reference/ai-models/supported-models.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ This table lists the AI models available in {% data variables.product.prodname_c
48
48
49
49
## Supported AI models in {% data variables.copilot.copilot_auto_model_selection_short_cap_a %}
50
50
51
-
This table lists the supported AI models for {% data variables.copilot.copilot_auto_model_selection_short_cap_a %}. Available models may be limited by model policies. See [AUTOTITLE](/copilot/concepts/models/auto-model-selection).
51
+
This table lists the supported AI models for {% data variables.copilot.copilot_auto_model_selection_short_cap_a %}. Available models may be limited by model policies. For example, as the long term support model, GPT-5.3-Codex will be used in the event no other models are available. See[AUTOTITLE](/copilot/concepts/models/fallback-and-lts-models) and[AUTOTITLE](/copilot/concepts/models/auto-model-selection).
0 commit comments