Overview
The Admin API provides administrative operations for the Truss platform, including audit log access, user role management with hierarchical enforcement, IP allowlist management, and data residency configuration. All endpoints require the admin or owner role.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /admin/log | List audit log entries |
| GET | /admin/permissions | List all users and roles |
| PATCH | /admin/users/:userId/role | Change user role (enforces hierarchy) |
| GET | /admin/ip-allowlist | List IP allowlist |
| POST | /admin/ip-allowlist | Add an IP to the allowlist |
| DELETE | /admin/ip-allowlist/:id | Remove an IP from the allowlist |
| GET | /admin/data-residency | Get data residency region |
| POST | /admin/data-residency | Set data residency region (eu/us/africa) |
Example
curl http://localhost:4000/admin/log \
-H "Authorization: Bearer tr_abc123"