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
Copy file name to clipboardExpand all lines: README.md
+50-5Lines changed: 50 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,56 @@ Located in the `./samples` directory you'll find sample JSON and PBIX files use
21
21
22
22
3. Open the **Power Query Editor** by right clicking the `GH Copilot - Details` and selecting **Edit query**.
23
23
4. Modify the **Source** step by clicking the settings icon, selecting your JSON file and clicking **OK**.
24
-

25
-
5. Repeat steps 3 and 4 for the `GH Copilot - Summary`**Source**.
26
-
6. Click **Close and Apply** in the top-left of the **Power Query Editor**.
27
-
7. On the **Report View** page click **Refresh** to load the new data into your dashboard.
28
-
8.**Happy Customizing!**
24
+

25
+
6. Repeat steps 3 and 4 for the `GH Copilot - Summary`**Source**.
26
+
7. Click **Close and Apply** in the top-left of the **Power Query Editor**.
27
+
8. On the **Report View** page click **Refresh** to load the new data into your dashboard.
28
+
9.**Happy Customizing!**
29
+
30
+
## Connect to Metrics API
31
+
> Notes: The REST API provides metrics for the previous 28 days and is refreshed daily with the previous days data. This is currently in beta, so please ensure you are using the latest version of the [REST API](https://docs.github.com/en/rest/copilot/copilot-usage).
32
+
33
+
In order to connect we'll need to generate a token and link to your metrics data:
34
+
1. Determine if you'll be using the `Enterprise`: **/enterprises/<ENTERPRISE>/copilot/usage** or `Organization`: **/orgs/<ORG>/copilot/usage** URL.
35
+
2. Follow the instructions below to generate a token with permissions to access the API:
36
+
[REST API endpoints for GitHub Copilot usage metrics - GitHub Docs](https://docs.github.com/en/rest/copilot/copilot-usage)
37
+
4. Open the **Power Query Editor** by right clicking the `GH Copilot - Details` and selecting **Edit query**.
38
+
5. Select **Advanced editor**.
39
+
40
+

41
+
6. Replace lines 1 and 2 with following, ensure to replace <YOUR-TOKEN> and <ORG> with your values.
42
+
43
+
**Organization**
44
+
```powerquery
45
+
let
46
+
// Replace <YOUR-TOKEN> and <ORG> with your actual token and enterprise name.
0 commit comments