Klucze API
Create, list and revoke tenant-bound API keys (administrator session).
Lista kluczy API
Dział zatytułowany „Lista kluczy API”GET /api/apikeys/{tenant}
Uwierzytelnianie: Sesja administratora exoCortex Core
Parametry
Dział zatytułowany „Parametry”| Nazwa | Miejsce | Typ | Wymagany | Opis |
|---|---|---|---|---|
tenant |
ścieżka | string | tak | Tenant code (case-insensitive). |
Odpowiedzi
Dział zatytułowany „Odpowiedzi”| Status | Opis |
|---|---|
200 |
Keys of the tenant (secrets are never returned). |
401 |
Not authenticated. |
403 |
Authenticated but not allowed (role, tenant or key). |
Przykład 200
{ "ok": true, "keys": [ { "keyid": "9f2c4e1a7b3d", "name": "ERP connector", "scopes": [ "tickets:create", "tickets:read" ], "active": true, "created_at": "2026-11-01T08:00:00.000Z", "last_used_at": "2026-11-01T09:14:05.000Z" } ]}Przykład z curl
Dział zatytułowany „Przykład z curl”curl -X GET "https://exocortex-api.ai-exo-cortex.com/api/apikeys/ACME" \ -H "Authorization: Bearer $EXO_ADMIN_SESSION"Utworzenie klucza API
Dział zatytułowany „Utworzenie klucza API”POST /api/apikeys/{tenant}
Returns the full key once. exoCortex stores only a hash of the secret.
Uwierzytelnianie: Sesja administratora exoCortex Core
Parametry
Dział zatytułowany „Parametry”| Nazwa | Miejsce | Typ | Wymagany | Opis |
|---|---|---|---|---|
tenant |
ścieżka | string | tak | Tenant code (case-insensitive). |
Treść żądania
Dział zatytułowany „Treść żądania”application/json
| Nazwa | Typ | Wymagany | Opis |
|---|---|---|---|
name |
string | nie | |
scopes |
array<string (tickets:create, tickets:read, tickets:comment, tickets:*, *)> |
nie | Scopes granted to the key. An empty list grants every v1 scope; prefer explicit scopes. |
{ "name": "ERP connector", "scopes": [ "tickets:create", "tickets:read" ]}Odpowiedzi
Dział zatytułowany „Odpowiedzi”| Status | Opis |
|---|---|
200 |
Key created. |
400 |
Invalid request. |
401 |
Not authenticated. |
403 |
Authenticated but not allowed (role, tenant or key). |
Przykład 200
{ "ok": true, "key": "nhk.9f2c4e1a7b3d.0123456789abcdef0123456789abcdef0123456789abcdef", "keyid": "9f2c4e1a7b3d", "name": "ERP connector", "scopes": [ "tickets:create", "tickets:read" ], "note": "Copia la chiave ora: non sarà più mostrata."}Przykład z curl
Dział zatytułowany „Przykład z curl”curl -X POST "https://exocortex-api.ai-exo-cortex.com/api/apikeys/ACME" \ -H "Authorization: Bearer $EXO_ADMIN_SESSION" \ -H "Content-Type: application/json" \ --data '{"name":"ERP connector","scopes":["tickets:create","tickets:read"]}'Unieważnienie klucza API
Dział zatytułowany „Unieważnienie klucza API”DELETE /api/apikeys/{tenant}/{keyid}
Uwierzytelnianie: Sesja administratora exoCortex Core
Parametry
Dział zatytułowany „Parametry”| Nazwa | Miejsce | Typ | Wymagany | Opis |
|---|---|---|---|---|
tenant |
ścieżka | string | tak | Tenant code (case-insensitive). |
keyid |
ścieżka | string | tak |
Odpowiedzi
Dział zatytułowany „Odpowiedzi”| Status | Opis |
|---|---|
200 |
Key revoked. It stops working immediately. |
401 |
Not authenticated. |
403 |
Authenticated but not allowed (role, tenant or key). |
404 |
Resource not found or not configured. |
Przykład 200
{ "ok": true}Przykład z curl
Dział zatytułowany „Przykład z curl”curl -X DELETE "https://exocortex-api.ai-exo-cortex.com/api/apikeys/ACME/9f2c4e1a7b3d" \ -H "Authorization: Bearer $EXO_ADMIN_SESSION"Strona wygenerowana ze specyfikacji OpenAPI API integracji, wersja 1.1.0.