POST /api/telemetry/ingest requires a
project-scoped ingest bearer. Authenticated reads and account-owned mutations
use an account bearer. Never use an account or browser-session credential as
SDK or ingest configuration.
Endpoints
Query filters
Use the deployed query keys for each endpoint. Friendly aliases such asproject, trace, and user are not REST query keys.
For trace discovery,
status is error or ok, and min_duration_ms is
non-negative. since accepts a positive compact duration such as 24h or
7d, or an RFC3339 timestamp.
For trace detail and summary, percent-encode trace_id as the path segment. It
is never a query alias. Unknown query keys fail closed.
Cursor pagination
Cursor mode is opt-in. Sendpagination=cursor by itself for the first page.
For each continuation, send the endpoint’s complete cursor fields together and
repeat every active filter:
Legacy mode returns a bare array. Cursor mode returns the endpoint-owned
envelope, with
next_cursor: null on the terminal page. Query-string ordering
does not affect filtering or pagination.
Use severity=info|warning|error|critical on GET /api/logs when filtering
logs by severity. The older level query parameter remains a compatibility
alias and accepts the same canonical values and common aliases.
Severity values
User-facing severity values areinfo, warning, error, and critical.
SDKs and runtimes may send common aliases such as trace, debug, warn, or
fatal, but REST and live responses return canonical values. For example,
warn may be accepted as input, while responses use warning.
Unknown severity or level values are rejected on ingest.
If a GET /api/logs request sends both severity and level, LogBrew
normalizes both values first. Conflicting normalized values are rejected with:
Account usage and quota
GET /api/account/usage is the canonical usage and quota endpoint. Use it when
an app, dashboard, CLI, mobile client, or agent needs account usage totals,
project breakdowns, stream breakdowns, reset timing, limits, and the current
quota state.
Do not infer usage or quota state from local CLI files, SDK files, or client
counters. Treat the account usage response as the source of truth.
GET /api/logs/usage is a legacy mobile compatibility projection with
bytes_used, limit_bytes, and month. Use GET /api/account/usage for
new integrations and canonical quota behavior.Account usage history
GET /api/account/usage/history?interval=daily|weekly|monthly|yearly returns
bounded usage history for graphs, reports, mobile views, and agent summaries.
Current-period usage remains canonical on GET /api/account/usage.
Each bucket includes:
History windows are bounded and zero-filled:
Unsupported intervals return a JSON error envelope with
code: "validation_failed" and an actionable next value. Unsupported methods
return a JSON 405 envelope with code: "method_not_allowed" and a next
value that points callers back to GET /api/account/usage/history.
Account subscription readiness
GET /api/account/subscription returns authenticated subscription and
organization-readiness state. It is read-only today. Use
GET /api/account/usage for usage and quota; use
GET /api/account/subscription to decide whether paid-plan or organization
controls should be enabled.
Current Free-state fields include:
Prepared enum values:
Unsupported methods such as
POST /api/account/subscription return a JSON
405 envelope with code: "method_not_allowed" and a next value that points
callers back to GET /api/account/subscription.
Organization creation, invitations, member roles, checkout, billing changes,
and paid-plan changes are not part of this endpoint unless separate public
contracts document them.
Browser logout
POST /api/auth/web/logout clears the browser logbrew_session cookie and
returns 204 No Content.
Use this endpoint for browser-session logout. It does not delete the account or
change project, usage, subscription, telemetry, or mobile companion state.
Unsupported methods return a JSON 405 envelope with
code: "method_not_allowed" and an actionable next value.
Log response shape
Log responses include canonicallevel for compatibility and canonical
severity for user-facing consumers.
Live feed event shape
Native live feed events use{ "type": "...", "data": ... } envelopes. The
event type names are stable:
Issue status update
The variable below represents an account bearer for an authenticated API mutation. It is intentionally different fromLOGBREW_INGEST_BEARER.
unresolved, resolved, and ignored.
