View as Markdown

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/v1/capabilities

Get capabilities

One object, no list.

tenant_idstring

The tenant the call is on.

principal_kindstring

How the caller came in: user (a person), machine (an API key or client credential) or fleet (Aleta's fleet key).

rolestring

admin or user. An API key has its owner's role. null for Aleta's fleet key.

credential_idstring

The key the call came through; null for a person.

groupsarray

The caller's groups, each {id, name}. Empty for an admin and for Aleta.

modulesarray

What the caller may do, each {module, level} with level read or read_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_pointsarray

What the caller sees, each {kind, id}. An admin and Aleta: {"kind": "tenant", "id": tenant_id}.

tenantobject

modules (the tenant's modules; every tenant has all of them), ai_enabled, white_label_level (simple, standard or extended) and plan (null until Aleta sets one).

limitsobject

rate_limit_per_minute; for a key write_quota_per_day (writes per UTC day) and writes_used_today (null when the count cannot be read). Both quota fields are null for a person.

scopesarray

The token's scopes: the ceiling of what any call may do.

Request
GET/v1/capabilities
curl https://api.aleta.ai/v1/capabilities \
  -H "Authorization: Bearer {access_token}"
Response
{
  "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"]
}