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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bonito_api-0.2.0.tar.gz | 6.3 kB | Without provenance | Details for bonito_api-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bonito_api-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for bonito_api-0.2.0-py3-none-any.whl |
Total release size: 12.2 kB
Release files / bonito_api-0.2.0.tar.gz
| Download URL | bonito_api-0.2.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4193e707a05e42d324d933a62874ecd7b2bea3f6607935cebaf54539df859a3f
|
|
BLAKE2b-256 checksum How to use checksums |
169c29b753102991ff73f7d593e63d70f3f46db1b481b70a768d48e4183777c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / bonito_api-0.2.0-py3-none-any.whl
| Download URL | bonito_api-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e1f58cb5e7c54b4ce507df4166bbbcf6eb641dfa7ec3156bcfcf7656c7d0a31
|
|
BLAKE2b-256 checksum How to use checksums |
f02d0f0cf1672cf400202ec658d4614536a837d915b310856f3a0243125d36fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Security for bonito-api 0.2.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.