Homepage JSON returns databases as a list

/.json previously returned databases as an object keyed by database
name, unlike /-/databases.json and every other collection in the API.
It now returns a list of database objects. The HTML template already
consumed the list. This endpoint remains undocumented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
This commit is contained in:
Claude 2026-07-04 16:45:19 +00:00
commit 5cb2bc6909
No known key found for this signature in database
4 changed files with 17 additions and 13 deletions

View file

@ -201,8 +201,8 @@ Routes: `/(\.(?P<format>jsono?))?$` and `/-/(\.(?P<format>jsono?))?$`
- **Parameters:** `_sort=relationships` sorts each database's truncated table
list by foreign-key relationship count.
- **JSON response** (index.py:147-161) — includes `ok: true` plus:
- `databases` — an **object keyed by database name** (not a list). Each
value: `name`, `hash` (or null), `color`, `path`,
- `databases` — a **list** of database objects (undocumented API, subject
to change). Each item: `name`, `hash` (or null), `color`, `path`,
`tables_and_views_truncated` (up to 5 items: `name`, `columns`,
`primary_keys`, `count` (int or null), `hidden`, `fts_table`,
`num_relationships_for_sorting`, `private`; view items are just