Skip to content

Admin API

The Admin API powers the IDToken Console — the web-based administration dashboard for managing enrollments, reviewing sessions, querying audit logs, and monitoring trust infrastructure.

All admin endpoints require a JWT with idtoken:admin or idtoken:audit scope. Super admins (role: "super_admin") have access to all endpoints.

Rate limit: 60 requests per minute.

GET /admin/enrollments

List all enrollments with pagination and filtering.

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber20Results per page
token_idstringFilter by token ID (partial match)
trust_levelnumberFilter by trust level (1, 2, 3)
is_revokedbooleanFilter by revocation status
{
"enrollments": [
{
"id": "uuid",
"token_id": "vds-uuid-12345",
"device_id": "device-uuid",
"trust_level": 3,
"is_revoked": false,
"created_at": "2025-01-10T08:00:00Z",
"updated_at": "2025-01-10T08:00:00Z"
}
],
"total": 142,
"page": 1,
"limit": 20
}
GET /admin/enrollments/:tokenId

Get detailed enrollment information including recent authentication sessions.

{
"enrollment": {
"id": "uuid",
"token_id": "vds-uuid-12345",
"device_id": "device-uuid",
"trust_level": 3,
"is_revoked": false,
"created_at": "2025-01-10T08:00:00Z"
},
"recentSessions": [
{
"session_id": "sess_abc123",
"status": "approved",
"initiated_at": "2025-01-15T10:00:00Z",
"resolved_at": "2025-01-15T10:00:45Z",
"service_id": "my-web-app"
}
]
}
GET /admin/sessions

List authentication sessions (from PostgreSQL audit records).

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber20Results per page
token_idstringFilter by token ID
statusstringFilter: pending, approved, rejected, expired
GET /admin/sessions/:sessionId

Get detailed session information.

GET /admin/sessions/live

Get currently active sessions from Redis (sessions awaiting user confirmation).

{
"sessions": [
{
"sessionId": "sess_abc123",
"tokenId": "vds-uuid-12345",
"status": "pending",
"expiresAt": "2025-01-15T10:01:00Z",
"serviceId": "my-web-app"
}
],
"count": 3
}
GET /admin/audit

Query the immutable audit log with filtering and pagination.

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber50Results per page
event_typestringFilter by event type
token_idstringFilter by token ID
session_idstringFilter by session ID
EventDescription
ENROLLSuccessful enrollment
AUTH_INITIATEAuth session started
AUTH_APPROVEAuth approved by user
AUTH_REJECTAuth rejected (invalid OTP/signature)
AUTH_EXPIREAuth session expired
REVOKEEnrollment revoked
VDS_VERIFY_OKVDS verification succeeded
VDS_VERIFY_FAILVDS verification failed
VDS_REVOKEDVDS found on revocation list
VDS_TEST_CERTVDS signed with test certificate
SAML_SSO_SUCCESSSAML SSO completed successfully
SAML_SSO_FAILSAML SSO failed
SAML_SLOSAML Single Logout processed
CONSENT_GRANTEDUser granted all requested scopes
CONSENT_PARTIALUser granted partial scopes
CONSENT_DENIEDUser denied all scopes
ADMIN_REVOKEAdmin-initiated revocation
ADMIN_OPERATOR_CREATEAdmin operator created
ADMIN_OPERATOR_DELETEAdmin operator deleted
ADMIN_TRUST_REFRESHTrust lists refreshed
{
"events": [
{
"id": 1234,
"event_type": "AUTH_APPROVE",
"token_id": "vds-uuid-12345",
"session_id": "sess_abc123",
"details": { "service_id": "my-web-app", "scopes": ["identity:name"] },
"client_ip": "203.0.113.42",
"occurred_at": "2025-01-15T10:00:45Z"
}
],
"total": 5678,
"page": 1,
"limit": 50
}
GET /admin/trust/status

Get the current status of VDS trust list caches.

{
"governance": {
"status": "cached",
"lastRefreshed": "2025-01-15T09:00:00Z",
"expiresAt": "2025-01-15T10:00:00Z"
},
"schemeLists": [
{
"iac": "VDS",
"status": "cached",
"lastRefreshed": "2025-01-15T09:00:00Z"
}
]
}
POST /admin/trust/refresh

Force-refresh all VDS trust lists from upstream sources. Requires idtoken:admin scope.

{
"refreshed": true,
"governance": "ok",
"schemeLists": 1,
"trustServiceLists": 3,
"certificates": 12
}
GET /admin/stats

Get 24-hour server statistics.

{
"period": "24h",
"enrollments": {
"total": 142,
"new": 5,
"revoked": 1
},
"sessions": {
"total": 387,
"approved": 352,
"rejected": 28,
"expired": 7
}
}

Admin operators authenticate using IDToken itself — they enroll with their own VDS credential and are assigned admin roles.

RolePermissions
operatorView enrollments, sessions, audit log
auditorRead-only access to audit log
super_adminFull access: revoke, manage operators, refresh trust