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
route: GET /enterprises/{enterprise}/copilot/usage
5
+
scope: copilot
6
+
type: API method
7
+
---
8
+
9
+
# Get a summary of Copilot usage for enterprise members
10
+
11
+
**Note**: This endpoint is in beta and is subject to change.
12
+
13
+
You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE
14
+
for all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,
15
+
and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.
16
+
17
+
The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,
18
+
and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,
19
+
they must have telemetry enabled in their IDE.
20
+
21
+
Only the owners and billing managers of enterprises with a Copilot Business or Enterprise subscription can view Copilot usage
22
+
metrics for the enterprise.
23
+
24
+
OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint.
25
+
26
+
```js
27
+
octokit.rest.copilot.usageMetricsForEnterprise({
28
+
enterprise,
29
+
});
30
+
```
31
+
32
+
## Parameters
33
+
34
+
<table>
35
+
<thead>
36
+
<tr>
37
+
<th>name</th>
38
+
<th>required</th>
39
+
<th>description</th>
40
+
</tr>
41
+
</thead>
42
+
<tbody>
43
+
<tr><td>enterprise</td><td>yes</td><td>
44
+
45
+
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
46
+
47
+
</td></tr>
48
+
<tr><td>since</td><td>no</td><td>
49
+
50
+
Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago.
51
+
52
+
</td></tr>
53
+
<tr><td>until</td><td>no</td><td>
54
+
55
+
Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed.
56
+
57
+
</td></tr>
58
+
<tr><td>page</td><td>no</td><td>
59
+
60
+
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
61
+
62
+
</td></tr>
63
+
<tr><td>per_page</td><td>no</td><td>
64
+
65
+
The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
66
+
67
+
</td></tr>
68
+
</tbody>
69
+
</table>
70
+
71
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-enterprise-members).
# Get a summary of Copilot usage for organization members
10
+
11
+
**Note**: This endpoint is in beta and is subject to change.
12
+
13
+
You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE
14
+
across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.
15
+
See the response schema tab for detailed metrics definitions.
16
+
17
+
The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,
18
+
and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,
19
+
they must have telemetry enabled in their IDE.
20
+
21
+
Copilot Business or Copilot Enterprise organization owners, and owners and billing managers of their parent enterprises, can view
22
+
Copilot usage metrics.
23
+
24
+
OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint.
25
+
26
+
```js
27
+
octokit.rest.copilot.usageMetricsForOrg({
28
+
org,
29
+
});
30
+
```
31
+
32
+
## Parameters
33
+
34
+
<table>
35
+
<thead>
36
+
<tr>
37
+
<th>name</th>
38
+
<th>required</th>
39
+
<th>description</th>
40
+
</tr>
41
+
</thead>
42
+
<tbody>
43
+
<tr><td>org</td><td>yes</td><td>
44
+
45
+
The organization name. The name is not case sensitive.
46
+
47
+
</td></tr>
48
+
<tr><td>since</td><td>no</td><td>
49
+
50
+
Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago.
51
+
52
+
</td></tr>
53
+
<tr><td>until</td><td>no</td><td>
54
+
55
+
Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed.
56
+
57
+
</td></tr>
58
+
<tr><td>page</td><td>no</td><td>
59
+
60
+
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
61
+
62
+
</td></tr>
63
+
<tr><td>per_page</td><td>no</td><td>
64
+
65
+
The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
66
+
67
+
</td></tr>
68
+
</tbody>
69
+
</table>
70
+
71
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-organization-members).
route: GET /orgs/{org}/team/{team_slug}/copilot/usage
5
+
scope: copilot
6
+
type: API method
7
+
---
8
+
9
+
# Get a summary of Copilot usage for a team
10
+
11
+
**Note**: This endpoint is in beta and is subject to change.
12
+
13
+
You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE
14
+
for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.
15
+
See the response schema tab for detailed metrics definitions.
16
+
17
+
The response contains metrics for the prior 28 days. Usage metrics are processed once per day for the previous day,
18
+
and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,
19
+
they must have telemetry enabled in their IDE.
20
+
21
+
**Note**: This endpoint will only return results for a given day if the team had five or more members on that day.
22
+
23
+
Copilot Business or Copilot Enterprise organization owners for the organization that contains this team,
24
+
and owners and billing managers of their parent enterprises, can view Copilot usage metrics for a team.
25
+
26
+
OAuth app tokens and personal access tokens (classic) need the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint.
27
+
28
+
```js
29
+
octokit.rest.copilot.usageMetricsForTeam({
30
+
org,
31
+
team_slug,
32
+
});
33
+
```
34
+
35
+
## Parameters
36
+
37
+
<table>
38
+
<thead>
39
+
<tr>
40
+
<th>name</th>
41
+
<th>required</th>
42
+
<th>description</th>
43
+
</tr>
44
+
</thead>
45
+
<tbody>
46
+
<tr><td>org</td><td>yes</td><td>
47
+
48
+
The organization name. The name is not case sensitive.
49
+
50
+
</td></tr>
51
+
<tr><td>team_slug</td><td>yes</td><td>
52
+
53
+
The slug of the team name.
54
+
55
+
</td></tr>
56
+
<tr><td>since</td><td>no</td><td>
57
+
58
+
Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago.
59
+
60
+
</td></tr>
61
+
<tr><td>until</td><td>no</td><td>
62
+
63
+
Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed.
64
+
65
+
</td></tr>
66
+
<tr><td>page</td><td>no</td><td>
67
+
68
+
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
69
+
70
+
</td></tr>
71
+
<tr><td>per_page</td><td>no</td><td>
72
+
73
+
The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
74
+
75
+
</td></tr>
76
+
</tbody>
77
+
</table>
78
+
79
+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team).
Copy file name to clipboardExpand all lines: docs/pulls/create.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,6 @@ This endpoint supports the following custom media types. For more information, s
20
20
-**`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
21
21
-**`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
22
22
-**`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
23
-
-**`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.
Copy file name to clipboardExpand all lines: docs/pulls/list.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,6 @@ This endpoint supports the following custom media types. For more information, s
22
22
-**`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
23
23
-**`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
24
24
-**`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
25
-
-**`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.
26
-
-**`application/vnd.github.patch`**: For more information, see "[git-format-patch](https://git-scm.com/docs/git-format-patch)" in the Git documentation.
Copy file name to clipboardExpand all lines: docs/pulls/listCommits.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,6 @@ This endpoint supports the following custom media types. For more information, s
18
18
-**`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
19
19
-**`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
20
20
-**`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
21
-
-**`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.
Copy file name to clipboardExpand all lines: docs/pulls/listFiles.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,6 @@ This endpoint supports the following custom media types. For more information, s
19
19
-**`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
20
20
-**`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
21
21
-**`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
22
-
-**`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.
Copy file name to clipboardExpand all lines: docs/pulls/update.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,6 @@ This endpoint supports the following custom media types. For more information, s
18
18
-**`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
19
19
-**`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
20
20
-**`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
21
-
-**`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.
The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.
83
+
The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`. If `actor_type` is `DeployKey`, this should be null. `OrganizationAdmin` is not applicable for personal repositories.
When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.
93
+
When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.`pull_request` is not applicable for the `DeployKey` actor type.
89
94
90
95
</td></tr>
91
96
<tr><td>conditions</td><td>no</td><td>
@@ -178,6 +183,26 @@ The operator to use for matching.
0 commit comments