Base path /api/admin/v1, served by agility-bridge serve when an admin token is configured
(AB_ADMIN_TOKEN_FILE, from agility-bridge admin-token); without one every path answers 404. Every request
sends Authorization: Bearer <admin token>; bodies are JSON (at most 64 KiB). The OpenAPI 3.1 document is at
/api/admin/v1/openapi.json.
Errors use one envelope, { "error": { "code", "message", "field"? } }: 400 bad_request, 401 unauthorized,
403 forbidden, 404 not_found, 409 conflict, 413 payload_too_large, 415 unsupported_media_type,
422 invalid_input (with the field), 429 rate_limited, 502 upstream, 503 unavailable.
Secrets are accepted once and never returned: credential tokens appear only as a 4-character hint, device tokens
only in the response that issues them. Every change is written to the audit log.
Owner-only: changing an instance origin (with a recent sign-in), creating or changing owners and admins, write
settings and write tools. Personal Agility tokens are stored only by their own user.
| Method |
Path |
What |
Body |
Response |
GET |
/audit |
Read the audit log, newest first (owner and admin: every row; a member: only their own rows, and another userId is refused) |
— |
200 AuditEntry[] |
GET |
/audit/stats |
Usage statistics from tool calls: calls, errors, denials, Agility requests and durations per tool, workspace, grant, user or day (owner, admin). Reads at most the newest 10,000 rows of the window and says when it stopped there. |
— |
200 AuditStats |
GET |
/writes/budget |
The deployment’s writes used this hour and its limit, read without taking a unit (owner, admin). { enabled: false } when write tools are off; unknown when the counters cannot be read, never “unlimited”. |
— |
200 WriteBudget |
GET |
/audit/write-stats |
Write statistics (P7-11): writes by tool and approval channel, and by outcome (ok, error, no outcome recorded), counting each intent with its outcome once, and the intents with no outcome (owner, admin). Reads at most the newest 3,000 write rows of the window and says when it stopped there. |
— |
200 WriteStats |
| Method |
Path |
What |
Body |
Response |
GET |
/credentials |
List credentials (never their tokens) |
— |
200 Credential[] |
POST |
/credentials |
Store an Agility access token (encrypted; shown never again) |
instanceId: string
ownerUserId: string | null
label: string
token: string |
201 Credential |
GET |
/credentials/{id} |
Get a credential |
— |
200 Credential |
PATCH |
/credentials/{id} |
Rename a credential |
label: string |
200 Credential |
DELETE |
/credentials/{id} |
Delete an unused credential |
— |
200 object |
POST |
/credentials/{id}/token |
Replace a credential’s token (it becomes unvalidated) |
token: string |
200 Credential |
POST |
/credentials/{id}/validate |
Validate a credential against Agility now (member, reachable projects, status) |
— |
200 Credential |
POST |
/credentials/{id}/revoke |
Revoke a credential |
— |
200 Credential |
| Method |
Path |
What |
Body |
Response |
GET |
/grants |
List grants |
— |
200 Grant[] |
POST |
/grants |
Grant a user or service access to a workspace |
workspaceId: string
userId: string | null
label?: string | null
credentialId?: string | null
tools?: array | null
scopeIds?: array | null
assetTypes?: object | null
limits?: object
rateLimit?: object | null
expiresAt?: integer | null |
201 object |
GET |
/grants/{id} |
Get a grant |
— |
200 Grant |
PATCH |
/grants/{id} |
Change a grant (owners and admins; write tools, widening the projects, asset types or end date of a grant that has them, the grant’s own hourly write limit rateLimit.writesPerHour, which can only lower the server’s, and rateLimit.writeApproval (page_only), which makes the grant’s writes need the approval page: an owner with a recent sign-in) |
label?: string | null
credentialId?: string | null
tools?: array | null
scopeIds?: array | null
assetTypes?: object | null
limits?: object
rateLimit?: object | null
expiresAt?: integer | null |
200 object |
DELETE |
/grants/{id} |
Delete a grant and its tokens |
— |
200 object |
GET |
/grants/{id}/write-budget |
One grant’s writes used this hour and its limit (the lower of the server’s and the grant’s own cap), read without taking a unit. Owners and admins any grant, a member only their own (another is a 404). { enabled: false } when write tools are off. |
— |
200 WriteBudget |
GET |
/grants/{id}/usage |
One grant’s Agility requests used today and this month (UTC) against the quota that applies to it (the lowest of the server’s AB_QUOTA_DAILY and AB_QUOTA_MONTHLY, its workspace’s limits.quota and its own), read without taking anything. Owners and admins any grant, a member only their own (another is a 404). { enabled: false } when no quota is configured; unknown when the counters cannot be read, never “unlimited”. |
— |
200 GrantUsage |
POST |
/grants/{id}/revoke |
Revoke a grant |
— |
200 Grant |
| Method |
Path |
What |
Body |
Response |
GET |
/instances |
List instances |
— |
200 Instance[] |
POST |
/instances |
Add an Agility instance (owners and admins; a CA file in tls is an owner with a recent sign-in) |
label: string
baseUrl: string
tls?: object | null
numberPrefixes?: object | null |
201 Instance |
GET |
/instances/{id} |
Get an instance |
— |
200 Instance |
PATCH |
/instances/{id} |
Change label, number prefixes or disabled state |
label?: string
numberPrefixes?: object | null
disabledAt?: integer | null |
200 Instance |
DELETE |
/instances/{id} |
Delete an unused instance |
— |
200 object |
POST |
/instances/{id}/retarget |
Change an instance’s origin or TLS trust (owner; revokes its credentials and grants) |
baseUrl: string
tls?: object | null |
200 object |
| Method |
Path |
What |
Body |
Response |
GET |
/keys |
Master-key versions: credentials on each, loaded, current, retired (owner) |
— |
200 KeyVersion[] |
POST |
/keys/{id}/retire |
Retire a master-key version no credential uses any more (owner; recorded in the audit log) |
reason: string |
200 KeyVersion[] |
| Method |
Path |
What |
Body |
Response |
GET |
/me/grants |
My grants, each with its workspace (any signed-in role) |
— |
200 MyGrant[] |
POST |
/me/grants/{id}/credential |
Use one of my own valid personal Agility tokens on my grant, or (null) go back to the workspace default |
credentialId: string | null |
200 object |
GET |
/me/oauth-devices |
The apps I connected with OAuth, newest first (any signed-in role; 404 when OAuth is off) |
— |
200 OAuthDevice[] |
POST |
/me/oauth-devices/revoke-all |
Disconnect every app I connected with OAuth: their access and refresh tokens stop working at once |
— |
200 object |
POST |
/me/oauth-devices/{id}/revoke |
Disconnect one of my apps: its access and refresh tokens stop working at once (another person’s device answers 404) |
— |
200 object |
GET |
/me/audit |
My recent administrative changes (newest first, at most 50) |
— |
200 AuditEntry[] |
| Method |
Path |
What |
Body |
Response |
GET |
/oauth/devices |
Every person’s connected OAuth apps, one page at a time in storage order (owners and admins; 404 when OAuth is off). Never a token |
— |
200 object |
POST |
/oauth/devices/{id}/revoke |
Disconnect one person’s app: its access and refresh tokens stop working at once (owners: anyone’s; admins: a member’s). An unknown device answers 404 |
userId: string |
200 object |
GET |
/oauth/clients |
Registered OAuth clients (dynamic registrations and metadata documents) and revoked ones, a page at a time (owners; 404 when OAuth is off) |
— |
200 object |
GET |
/oauth/abuse |
OAuth abuse controls (owners; 404 when OAuth is off): registration caps against their use, the configured limits, and the refusals of the last 24 hours by reason. No address, client or token is ever in it |
— |
200 object |
POST |
/oauth/clients/revoke |
Revoke an OAuth client (owners): no new authorization, no refresh and no access token of it passes, its devices end and its registration is deleted. A new registration is a new client |
clientId: string |
200 object |
POST |
/oauth/clients/restore |
Lift the revocation of a client (owners): a metadata-document client may be used again, a deleted dynamic registration does not come back |
clientId: string |
200 object |
| Method |
Path |
What |
Body |
Response |
GET |
/session |
The current session: user, role, whether the sign-in is recent, expiry and the CSRF token |
— |
200 Session |
| Method |
Path |
What |
Body |
Response |
GET |
/grants/{id}/tokens |
List a grant’s device tokens |
— |
200 DeviceToken[] |
POST |
/grants/{id}/tokens |
Issue a device token (shown once; your own grants, or any for owners and admins). A lifetime over 90 days or never needs a sign-in from the last 10 minutes |
label: string
expiresInDays?: integer | “never” |
201 object |
GET |
/tokens |
List the device tokens you may see, newest first, one page at a time (owners and admins: every token; others: the tokens of their own grants). Never a hash or a token value |
— |
200 object |
POST |
/tokens/{id}/revoke |
Revoke a device token |
— |
200 DeviceToken |
| Method |
Path |
What |
Body |
Response |
GET |
/tools |
The tool catalogue: name, kind, group and (for a composite) the sibling tools it reads, of every tool (owner, admin); what workspaces and grants choose from |
— |
200 Tool[] |
GET |
/limits |
The server’s own per-call request budget (callBudget, the default of a workspace that sets none) and the ceiling its runtime plan puts on every workspace (callBudgetCeiling, null without one), so the panel can say which tools the inherited budget hides (owner, admin). Empty when the host does not say |
— |
200 ServerLimits |
| Method |
Path |
What |
Body |
Response |
GET |
/users |
List users, oldest first. limit and offset return one page, ids (comma-separated, at most 50) only those users |
— |
200 User[] |
POST |
/users |
Create a user |
email: string
role: “owner” | “admin” | “member”
displayName?: string | null |
201 User |
GET |
/users/{id} |
Get a user |
— |
200 User |
PATCH |
/users/{id} |
Change a user |
email?: string
role?: “owner” | “admin” | “member”
displayName?: string | null |
200 User |
POST |
/users/{id}/disable |
Disable a user |
— |
200 User |
POST |
/users/{id}/enable |
Enable a disabled user again (owners for owners and admins, with a recent sign-in; admins for members; 409 when the user is not disabled). Restores nothing but the right to sign in: grants and device tokens that were not revoked work again |
— |
200 User |
POST |
/users/{id}/sessions/revoke |
End all of a user’s browser sessions (yourself; an owner anyone; an admin members; the break-glass token anyone) |
— |
200 object |
POST |
/users/{id}/unbind |
Clear a user’s sign-in identity so the next verified sign-in with their email binds again, optionally only at a named provider for ttlMinutes (owner, recent sign-in, never yourself through a session; the body repeats the user’s email; ends their sessions) |
confirm: string
provider?: string
ttlMinutes?: integer |
200 User |
POST |
/setup-links |
Issue a single-use owner setup link (owner; the link makes whoever signs in with it an owner; recorded in the audit log) |
ttlMinutes?: integer |
201 SetupLink |
| Method |
Path |
What |
Body |
Response |
GET |
/workspaces |
List workspaces |
— |
200 Workspace[] |
POST |
/workspaces |
Create a workspace |
slug: string
name: string
instanceId: string
allowedScopeIds: string[]
includeChildScopes?: boolean
assetTypes?: object | null
enabledTools?: array | null
limits?: object
defaultCredentialId?: string | null
writePolicy?: object
credentialSource?: “stored” | “passthrough” |
201 Workspace |
GET |
/workspaces/{id} |
Get a workspace |
— |
200 Workspace |
PATCH |
/workspaces/{id} |
Change a workspace (owners and admins; write settings, including writePolicy.approval (any or page_only), and pass-through: an owner with a recent sign-in; so is adding projects or asset types to a workspace that has write tools) |
slug?: string
name?: string
allowedScopeIds?: string[]
includeChildScopes?: boolean
assetTypes?: object | null
enabledTools?: array | null
limits?: object
defaultCredentialId?: string | null
writePolicy?: object
credentialSource?: “stored” | “passthrough”
disabledAt?: integer | null |
200 Workspace |
DELETE |
/workspaces/{id} |
Delete a workspace, its grants and their tokens |
— |
200 object |
POST |
/workspaces/{id}/disable |
Disable a workspace |
— |
200 Workspace |
- AuditStats:
data: object[], scanned: number, truncated: boolean
- Credential:
id: string, instanceId: string, ownerUserId: string | null, label: string, tokenHint: string, keyVersion: number, validationStatus: “unvalidated” | “valid” | “invalid”, validationErrorCode: string | null, validatedAt: number | null, memberOid: string | null, memberName: string | null, memberUsername: string | null, reachableScopeIds: array | null, createdAt: number, updatedAt: number, revokedAt: number | null
- DeviceToken:
id: string, grantId: string, prefix: string, label: string, createdAt: number, expiresAt: number | null, lastUsedAt: number | null, revokedAt: number | null
- DeviceTokenListItem: —
- Grant:
id: string, workspaceId: string, userId: string | null, label: string | null, credentialId: string | null, tools: array | null, scopeIds: array | null, assetTypes: object | null, limits: object, rateLimit: object | null, createdAt: number, updatedAt: number, expiresAt: number | null, revokedAt: number | null
- GrantUsage:
enabled: boolean, status?: “ok” | “unknown”, daily?: object, monthly?: object
- Instance:
id: string, label: string, baseUrl: string, tls: object | null, numberPrefixes: object | null, metaFingerprint: string | null, createdAt: number, updatedAt: number, disabledAt: number | null
- KeyVersion:
version: number, credentials: number, loaded: boolean, current: boolean, retired: boolean
- MyGrant:
grant: Grant, workspace: object | null
- OAuthAdminDevice:
id: string, userId: string, userEmail: string | null, userName: string | null, userRole: “owner” | “admin” | “member” | null, clientName: string | null, redirectHost: string, workspaceId: string | null, workspaceName: string | null, workspaceSlug: string | null, label: string | null, createdAt: number, expiresAt: number | null, canWrite: boolean
- OAuthClient:
clientId: string, kind: “dynamic” | “metadata_document”, name: string | null, redirectHosts: string[], createdAt: number | null, lastApprovedAt: number | null, devices: number | null
- OAuthDevice:
id: string, clientName: string | null, redirectHost: string, workspaceId: string | null, workspaceName: string | null, workspaceSlug: string | null, label: string | null, createdAt: number, expiresAt: number | null, lastUsedAt: number | null, canWrite: boolean
- ServerLimits:
callBudget?: integer, callBudgetCeiling?: integer | null
- Session:
actor: “session” | “break_glass” | “user”, user: object | null, recentAuth: boolean, signedInAt: number | null, idleExpiresAt: number | null, expiresAt: number | null, csrfToken: string | null
- SetupLink:
id: string, url: string, expiresAt: number
- Tool:
name: string, kind: “read” | “write” | “destructive”, group: string, cost?: integer, siblings?: string[]
- User:
id: string, email: string, displayName: string | null, idp: string | null, idpSubject: string | null, role: “owner” | “admin” | “member”, createdAt: number, updatedAt: number, disabledAt: number | null
- Workspace:
id: string, slug: string, name: string, instanceId: string, allowedScopeIds: string[], includeChildScopes: boolean, assetTypes: object | null, enabledTools: array | null, limits: object, defaultCredentialId: string | null, writePolicy: object, credentialSource: “stored” | “passthrough”, createdAt: number, updatedAt: number, disabledAt: number | null
- WriteBudget:
enabled: boolean, status?: “ok” | “unknown”, windowEndsAt?: number, grant?: object, deployment?: object | null
- WriteStats:
byTool: object[], byChannel: object[], total: object, unpaired: object[], scanned: number, truncated: boolean
agility-bridge is an unofficial, community project. It is not affiliated with, endorsed by, or supported by Digital.ai. Digital.ai, Agility and VersionOne are trademarks of their respective owners.