Identity
Endpoint reference for the identity cache (partners, tenants, users, groups) mirrored from ScaiKey.
Base path: /v1/identity/
Identity cache#
ScaiVault keeps a local cache of identity data from ScaiKey for fast policy evaluation. The cache is updated in real time via webhooks from ScaiKey; you can also trigger manual syncs.
GET /v1/identity/partners#
List cached partners.
Query: status, page, page_size.
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Scope: identity:read.
GET /v1/identity/tenants#
List cached tenants.
Query: partner_id, status, page, page_size.
Scope: identity:read.
GET /v1/identity/tenants/{tenant_id}/users#
List users in a tenant.
Query: status, page, page_size, q (email/name search).
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Scope: identity:read.
GET /v1/identity/tenants/{tenant_id}/groups#
List groups.
Scope: identity:read.
GET /v1/identity/groups/{group_id}/members#
List members.
Response:
1 2 3 4 5 6 7 8 9 10 11 | |
Scope: identity:read.
GET /v1/identity/resolve/{identity_type}/{identity_id}#
Resolve an identity from the cache, with group memberships.
Response:
1 2 3 4 5 6 7 8 9 | |
Returns 404 identity_not_found if unknown.
Scope: identity:read.
POST /v1/identity/sync#
Trigger manual sync from ScaiKey.
Query: partner_id, tenant_id (optional; omit for full sync).
Response 202 Accepted: sync_id, status, started_at.
Scope: identity:admin.
GET /v1/identity/sync/history#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Scope: identity:read.
GET /v1/identity/roles#
Available admin roles for assignment.
Scope: authenticated.
GET /v1/identity/users/{user_id}/roles#
PUT /v1/identity/users/{user_id}/roles#
Body: {"roles": ["tenant_admin"]}.
Auth rules:
- Only
super_adminorpartner_admincan modify roles. - Only
super_admincan grantsuper_admin. - No self-elevation.
POST /v1/identity/webhooks/scaikey#
Webhook receiver for ScaiKey events. ScaiKey itself POSTs here; not called by user code.
Verifies X-ScaiKey-Signature and applies the event to the cache.