Capabilities
What the caller may do, in one call: who the call acts as, the caller's groups, modules and access points, what the tenant has, the caller's limits and the token's scopes. Every caller of the tenant may read it, without any scope, an API key narrowed to a few modules too. An agent reads it before it plans.
Get capabilities
One object, no list.
tenant_idstringThe tenant the call is on.
principal_kindstringHow the caller came in:
user(a person),machine(an API key or client credential) orfleet(Aleta's fleet key).rolestringadminoruser. An API key has its owner's role.nullfor Aleta's fleet key.credential_idstringThe key the call came through;
nullfor a person.groupsarrayThe caller's groups, each
{id, name}. Empty for an admin and for Aleta.modulesarrayWhat the caller may do, each
{module, level}withlevelreadorread_write. An admin, Aleta and a user who was never in a group hold every module at its top level; a narrowed key holds its owner's modules cut to its narrowing.access_pointsarrayWhat the caller sees, each
{kind, id}. An admin and Aleta:{"kind": "tenant", "id": tenant_id}.tenantobjectmodules(the tenant's modules; every tenant has all of them),ai_enabled,white_label_level(simple,standardorextended) andplan(nulluntil Aleta sets one).limitsobjectrate_limit_per_minute; for a keywrite_quota_per_day(writes per UTC day) andwrites_used_today(nullwhen the count cannot be read). Both quota fields arenullfor a person.scopesarrayThe token's scopes: the ceiling of what any call may do.
curl https://api.aleta.ai/v1/capabilities \
-H "Authorization: Bearer {access_token}"
{
"tenant_id": "3f600564-957b-4aab-96ed-fd0118cfd805",
"principal_kind": "machine",
"role": "user",
"credential_id": "01a150c8-1dc2-7722-97c5-37f782295429",
"groups": [
{ "id": "019f2a10-7c1e-7b55-9d8e-4b2f0f1c2a11", "name": "Viewer" }
],
"modules": [
{ "module": "core", "level": "read" },
{ "module": "transactions", "level": "read" }
],
"access_points": [
{ "kind": "client", "id": "019e8d3c-1f2a-7e44-8a10-2b9c4d5e6f70" }
],
"tenant": {
"modules": [
"core", "market_data", "transactions", "registrations", "limits",
"benchmarks", "risk", "private_markets", "documents", "reports",
"operations", "audit", "esg", "wealth_map", "allocation"
],
"ai_enabled": true,
"white_label_level": "simple",
"plan": null
},
"limits": {
"rate_limit_per_minute": 1000,
"write_quota_per_day": 10000,
"writes_used_today": 12
},
"scopes": ["structure:read", "transactions:read"]
}
Related
- Users —
GET /v1/users/me, the caller's identity. - Groups and modules — what a module covers.
- Credentials — API keys, their owner and narrowing.