From bd4b103f9ae064f5a5b49daa1930e55dc9a5a8a1 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Mon, 12 Jan 2026 14:43:34 -0300 Subject: [PATCH] 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? --- src/xAI.Tests/.gitignore | 1 + src/xAI.Tests/management.http | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/xAI.Tests/.gitignore create mode 100644 src/xAI.Tests/management.http diff --git a/src/xAI.Tests/.gitignore b/src/xAI.Tests/.gitignore new file mode 100644 index 0000000..8c02717 --- /dev/null +++ b/src/xAI.Tests/.gitignore @@ -0,0 +1 @@ +http-client.env.json \ No newline at end of file diff --git a/src/xAI.Tests/management.http b/src/xAI.Tests/management.http new file mode 100644 index 0000000..c02dc3a --- /dev/null +++ b/src/xAI.Tests/management.http @@ -0,0 +1,35 @@ +### List API keys +GET https://management-api.x.ai/auth/teams/{{teamId}}/api-keys +Authorization: Bearer {{token}} + +### List ACL values +GET https://management-api.x.ai/auth/teams/{{teamId}}/endpoints +Authorization: Bearer {{token}} + +### List models +GET https://management-api.x.ai/auth/teams/{{teamId}}/models +Authorization: Bearer {{token}} + +### Validate management key +GET https://management-api.x.ai/auth/management-keys/validation +Authorization: Bearer {{token}} + +### Create API key +POST https://management-api.x.ai/auth/teams/{{teamId}}/api-keys +Authorization: Bearer {{token}} + + { + "name": "kzu-user", + "acls": [ + "api-key:endpoint:*", + "api-key:model:*" + ] + } + +### Check API Key +GET https://management-api.x.ai/auth/api-keys/{{userKeyId}}/propagation +Authorization: Bearer {{token}} + +### Delete the key +DELETE https://management-api.x.ai/auth/api-keys/{{userKeyId}} +Authorization: Bearer {{token}}