API - Auth
Token management endpoints.
Current Token Identity
GET /v1/auth/mebash
curl http://localhost:7200/v1/auth/me \
-H "Authorization: Bearer YOUR_TOKEN"Returns the current token's identity, role, and capabilities.
Create Token
POST /v1/auth/tokenRole-Based (Recommended)
bash
curl -X POST http://localhost:7200/v1/auth/token \
-H "Authorization: Bearer $ROOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "developer",
"expires_in": 2592000,
"metadata": {
"name": "myapp-service",
"description": "Token for myapp service"
}
}'Legacy Scoped
bash
curl -X POST http://localhost:7200/v1/auth/token \
-H "Authorization: Bearer $ROOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scopes": [
{"namespace": "myapp/*", "read": true, "write": false}
],
"expires_in": 2592000
}'| Field | Type | Description |
|---|---|---|
role | string | RBAC role name |
scopes | array | Legacy namespace scopes |
expires_in | int | Token lifetime in seconds |
metadata | object | Optional name/description |
List Tokens
GET /v1/auth/tokensbash
curl http://localhost:7200/v1/auth/tokens \
-H "Authorization: Bearer $ROOT_TOKEN"Revoke Token
DELETE /v1/auth/token/{token}bash
curl -X DELETE http://localhost:7200/v1/auth/token/TOKEN_VALUE \
-H "Authorization: Bearer $ROOT_TOKEN"See Guide - Authentication for role details.
