-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Labels
Milestone
Description
I need this for Datasette Cloud, and in thinking it through I realized that it's really time Datasette grew a default write API as well.
I'm going to mostly model this off sqlite-utils, since I've spent a bunch of time iterating on a pseudo-JSON API for that over the past few years (piping JSON to stdin etc).
I want this for Datasette 1.0. I'm going to be building it in the new 1.0-dev branch, which is automatically deployed to https://latest-1-0-dev.datasette.io/ running on Cloud Run.
API features to build:
- Default API token authentication mechanism #1852
- API explorer tool #1871
- Design URLs for the write API #1868
- API to insert a single record into an existing table #1851
- Update a single record in an existing table #1863
- Delete a single record from an existing table #1864
- API for bulk inserting records into a table #1866
-
/db/-/createAPI for creating tables #1882 - Create a new table from one or more records,
sqlite-utilsstyle #1862 - API to drop a table #1874
- Refactor and tidy up final write API code #1877
Bumped to later on:
datasette create-tokenability to create tokens with a reduced set of permissions #1855- /db/table/-/upsert API #1878
- Ensure insert API has good tests for rowid and compound primark key tables #1873
- Figure out design for JSON errors (consider RFC 7807) #1875
- Make sure CORS works
- Ability to create new tokens via the API #1889
- Alter a table -
sqlite-utils transformstyle (more powerful than straight ALTER) - Execute SQL against a write connection
- Maybe even multiple write SQL statements bundled in a single transaction
- /db/table/-/rename API (also allows atomic replace) #1867
Reactions are currently unavailable