mirror of
https://github.com/simonw/datasette.git
synced 2026-07-10 01:24:45 +02:00
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:
parent
13dc7a08b7
commit
5cb2bc6909
4 changed files with 17 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue