Skip to content

Commit dd9ebad

Browse files
committed
Add queries for enterprise and organization usage
1 parent 724d23b commit dd9ebad

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

queries/enterprise.pq

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
let
2+
// Replace <YOUR-TOKEN> and <ENTERPRISE> with your actual token and enterprise name.
3+
url = "https://api.github.com/enterprises/<ENTERPRISE>/copilot/usage",
4+
headers = [
5+
#"Accept" = "application/vnd.github+json",
6+
#"Authorization" = "Bearer <YOUR-TOKEN>",
7+
#"X-GitHub-Api-Version" = "2022-11-28"
8+
],
9+
Source = Json.Document(Web.Contents(url, [Headers=headers]))
10+
in
11+
Source

queries/organization.pq

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
let
2+
// Replace <YOUR-TOKEN> and <ORG> with your actual token and org name.
3+
url = "https://api.github.com/orgs/<ORG>/copilot/usage",
4+
headers = [
5+
#"Accept" = "application/vnd.github+json",
6+
#"Authorization" = "Bearer <YOUR-TOKEN>",
7+
#"X-GitHub-Api-Version" = "2022-11-28"
8+
],
9+
Source = Json.Document(Web.Contents(url, [Headers=headers]))
10+
in
11+
Source

0 commit comments

Comments
 (0)