Skip to content

Commit ebe7e5b

Browse files
committed
Add http file showcasing how to use the management API
No public client for now since it deviates from the gRPC protocol for everything else. Perhaps we'll introduce a typed API at some point?
1 parent 8ad3539 commit ebe7e5b

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

src/xAI.Tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
http-client.env.json

src/xAI.Tests/management.http

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
### List API keys
2+
GET https://management-api.x.ai/auth/teams/{{teamId}}/api-keys
3+
Authorization: Bearer {{token}}
4+
5+
### List ACL values
6+
GET https://management-api.x.ai/auth/teams/{{teamId}}/endpoints
7+
Authorization: Bearer {{token}}
8+
9+
### List models
10+
GET https://management-api.x.ai/auth/teams/{{teamId}}/models
11+
Authorization: Bearer {{token}}
12+
13+
### Validate management key
14+
GET https://management-api.x.ai/auth/management-keys/validation
15+
Authorization: Bearer {{token}}
16+
17+
### Create API key
18+
POST https://management-api.x.ai/auth/teams/{{teamId}}/api-keys
19+
Authorization: Bearer {{token}}
20+
21+
{
22+
"name": "kzu-user",
23+
"acls": [
24+
"api-key:endpoint:*",
25+
"api-key:model:*"
26+
]
27+
}
28+
29+
### Check API Key
30+
GET https://management-api.x.ai/auth/api-keys/{{userKeyId}}/propagation
31+
Authorization: Bearer {{token}}

0 commit comments

Comments
 (0)