Usage, budgets and cost allocation

Embed
Preview of the card
<a href="https://forumulate.com/p/watchtower/docs/usage"><img src="https://forumulate.com/api/public/orgs/watchtower/spaces/docs/pages/ec29adaa-eadd-4d41-9f45-c8aabd57e969/social-card.svg?v=3e7ae33eec8b" alt="Usage, budgets and cost allocation" width="600" height="315"></a>
  • GET /v1/orgs/{org}/usage?from=&to=&group_by=project|signal|day|team&format=json|csv: records, stored bytes, queries and AI spend per UTC day from usage_daily. Bytes are stored bytes, estimated from row sizes. team maps ingest volume by service through cost tags.

  • GET /v1/projects/{prj}/cost/allocation?group_by=team|service|tag: shares of the total cost. Default unit costs are 0.10 USD per GB stored and 0.50 USD per million records; override per call with per_gb and per_million_records. Map services to teams with PUT /v1/projects/{prj}/cost/tags (tag_key service).

  • Budgets (/v1/orgs/{org}/budgets): scope ingest_bytes, ingest_records or ai_spend, period minute, day or month (UTC), action alert, throttle or block. Alerts fire at 80% and 100%. throttle lowers the quota to notify.throttle_percent (default 50) and block sets it to 0 until the period ends; the gateway answers 429 with Retry-After. POST /v1/projects/{prj}/quotas/{signal}/lift restores the quota early, /throttle lowers it on demand.

  • Query limits per minute by role: ReadOnly 60, Engineer 240, ProjectAdmin 600, service keys 1,200 (429 with Retry-After).

  • A daily job compares usage_daily.records with ClickHouse row counts; a difference over 0.5% is exported as wt_usage_reconcile_diff and audited as usage.reconcile_diff.

Updated