Skip to main content

bonito-api

The FastAPI query layer of Bonito (BON-003). Exposes the data stored by bonito-store as structured JSON for AI agents, the MCP server (BON-004) and Remo (R-007).

Contract public, deployment private. /openapi.json + /docs are the public contract (no auth) — every consumer implements against them. The data endpoints are private: every request needs X-API-Key (or Authorization: Bearer) matching BONITO_API_KEY.

Run

uv pip install -e bonito-api
export BONITO_API_KEY=change-me
bonito-api serve --db bonito.db          # FastAPI on :8100
curl -H "X-API-Key: $BONITO_API_KEY" localhost:8100/queries/top?limit=5
curl -H "X-API-Key: $BONITO_API_KEY" localhost:8100/baseline/-6842865755026457642

Endpoints

Endpoint Description
GET /queries/top?period=&limit= Top queries by mean execution time
GET /locks/active Recent lock events / blocking pairs
GET /waits Wait breakdown by wait_event_type
GET /plans/{fingerprint} Latest execution plan (JSON) for a query
GET /health/{db_instance} Session + bloat summary
GET /baseline/{fingerprint} Query vs its 7-day baseline (mean/p95 + regression)
POST /ingest Compat webhook — same payload as the store's /events

The committed openapi.yaml is the versioned public contract.

Config

Env var Default Description
BONITO_API_KEY (required) API key for all data endpoints
BONITO_DB bonito.db SQLite file written by bonito-store
BONITO_API_PORT 8100 HTTP port

Metadata

Release files for bonito-api 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bonito-api 0.1.2
File Size Uploaded Provenance
bonito_api-0.1.2.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bonito-api 0.1.2
File Interpreter ABI Platform
bonito_api-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / bonito_api-0.1.2.tar.gz

Download URL bonito_api-0.1.2.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f64155c0c9a61805c71de3fa592842f91129c9a2f9ab8fcc674f3a57b6796812
BLAKE2b-256 checksum
How to use checksums
b2974a8880f11bd27aa27c8f2bbf28a45f97346948f325cb87004c258fbdd78a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / bonito_api-0.1.2-py3-none-any.whl

Download URL bonito_api-0.1.2-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96e8071362e891510183a90b16fece075c63c9c15daad7612a4f8db6e92fd559
BLAKE2b-256 checksum
How to use checksums
9cf40207cc390147508cb16646df038692c0d2e557c5676cc7dc0e215af738d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Security for bonito-api 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page