Skip to content

Commit 956fe9e

Browse files
Add Copilot Usage API Documentation detailing endpoints for retrieving usage summaries.
1 parent 3698933 commit 956fe9e

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

doc/copilot/usage.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copilot Usage API Documentation
2+
[Back to the navigation](../README.md)
3+
4+
## Overview
5+
6+
The Copilot Usage API provides endpoints to retrieve usage summaries for organizations and enterprises.
7+
8+
**Note**: This endpoint is in beta and is subject to change.
9+
10+
## Endpoints
11+
12+
### Organization Usage Summary
13+
14+
Retrieve the usage summary for a specific organization.
15+
16+
**Method:** `GET`
17+
18+
**Endpoint:** `/orgs/{organization}/copilot/usage`
19+
20+
**Parameters:**
21+
- `organization` (string): The name of the organization.
22+
- `params` (array, optional): Additional query parameters.
23+
24+
**Example:**
25+
```php
26+
$usage = $client->api('copilotUsage')->orgUsageSummary('KnpLabs');
27+
```
28+
29+
### Organization Team Usage Summary
30+
31+
Retrieve the usage summary for a specific team within an organization.
32+
33+
**Method:** `GET`
34+
35+
**Endpoint:** `/orgs/{organization}/team/{team}/copilot/usage`
36+
37+
**Parameters:**
38+
- `organization` (string): The name of the organization.
39+
- `team` (string): The name of the team.
40+
- `params` (array, optional): Additional query parameters.
41+
42+
**Example:**
43+
```php
44+
$usage = $client->api('copilotUsage')->orgTeamUsageSummary('KnpLabs', 'developers');
45+
```
46+
47+
### Enterprise Usage Summary
48+
49+
Retrieve the usage summary for a specific enterprise.
50+
51+
**Method:** `GET`
52+
53+
**Endpoint:** `/enterprises/{enterprise}/copilot/usage`
54+
55+
**Parameters:**
56+
- `enterprise` (string): The name of the enterprise.
57+
- `params` (array, optional): Additional query parameters.
58+
59+
**Example:**
60+
```php
61+
$usage = $client->api('copilotUsage')->enterpriseUsageSummary('KnpLabs');
62+
```
63+
64+
### Enterprise Team Usage Summary
65+
66+
Retrieve the usage summary for a specific team within an enterprise.
67+
68+
**Method:** `GET`
69+
70+
**Endpoint:** `/enterprises/{enterprise}/team/{team}/copilot/usage`
71+
72+
**Parameters:**
73+
- `enterprise` (string): The name of the enterprise.
74+
- `team` (string): The name of the team.
75+
- `params` (array, optional): Additional query parameters.
76+
77+
**Example:**
78+
```php
79+
$usage = $client->api('copilotUsage')->enterpriseTeamUsageSummary('KnpLabs', 'developers');
80+
```

0 commit comments

Comments
 (0)