Keys
Mint, list and revoke scoped API keys in the caller's org.
| Method | Path | Scope | Summary |
|---|---|---|---|
GET | /keys/ | admin | List Keys |
POST | /keys/ | admin | Create Key |
DELETE | /keys/{key_id} | admin | Revoke Key |
Try it
curl -sf -H "Authorization: Bearer $VIGIL_KEY" "$VIGIL_URL/keys/" # admin key
Routes
GET /keys/
List Keys. Scope: admin.
Response 200:
[
{
"id": 0,
"name": "string",
"key_prefix": "string",
"scopes": [
"string"
],
"created_at": "string",
"last_used_at": "string | null",
"revoked": true,
"revoked_at": "string | null"
}
]
POST /keys/
Create Key. Scope: admin.
Request body:
{
"name": "string",
"scopes": [
"string"
],
"org_slug": "string | null"
}
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | |
scopes | array of string | no | |
org_slug | string | null | no |
Response 200:
{
"id": 0,
"name": "string",
"key_prefix": "string",
"scopes": [
"string"
],
"created_at": "string",
"last_used_at": "string | null",
"revoked": true,
"revoked_at": "string | null",
"full_key": "string"
}
DELETE /keys/{key_id}
Revoke Key. Scope: admin.
| Parameter | In | Required | Type | Notes |
|---|---|---|---|---|
key_id | path | yes | integer |
Response 200:
"any"
Generated from openapi.json (VIGIL 0.2.0). Scopes follow the router dependencies in VIGIL_SPEC.md section 4.2.