BBramaDocs
Browse documentation

Brama CLI command reference

brama subscription lease list

Every live lease the gateway holds, and how many sessions each subscription carries, read from the gateway's register; the same counts brama subscription list shows as each member's live_sessions.

Invocation

brama subscription lease list (--gateway <ORIGIN> | --gateway-consumer <NAME>) [--bearer-role <ROLE>] [--agent <AGENT> --signing-role <ROLE#FIELD>] [--json]
InputRequired/defaultMeaning
--gateway <ORIGIN> or --gateway-consumer <NAME>one requiredThe gateway that holds the pool (GET /v1/subscription-pool/leases). The console bearer is read from stdin, or from the vault item playing --bearer-role.
--agent <AGENT> --signing-role <ROLE#FIELD>optional pair; neither defaultsProve the agent and see only its leases. The signing secret is read through Stado credentials for this request; the console bearer without agent signing sees all leases.
--jsonoptional; offPrint {scope, limits: {provider: n}, unstated: {provider: refusal}, leases: [lease...], counts: {subscription_id: n}} instead of lines. The console bearer is answered every lease; a signed agent or account holder only the leases it took, with scope naming it.

Output and state

<provider>: at most <n> sessions per subscription for each provider src/subscription_dispatch/acquire/providers.json declares with a stated limit, <provider>: no lease is given: <refusal> for each whose limit is not stated, one line per live lease, then <subscription> carries <n> per subscription with a lease. Nothing is written.

Refusals

A gateway refusal exits 1 and prints the HTTP status, request path and full response body, including a non-JSON error; 503 includes the cause when the register cannot be read. An unreadable body is reported as such. Without a gateway: a lease lives on the gateway that holds the pool: name --gateway or --gateway-consumer.

Signing requires both --agent and --signing-role ROLE#FIELD. A malformed coordinate or failed Stado credential lookup is refused before the request; the gateway refuses an invalid signature rather than returning console-scope inventory.

The real console journey is tests/subscriptions/journeys/leases.sh; agent-scoped visibility is exercised by tests/subscriptions/leases/ownership.rs. See the command group or the CLI tree.