docs: add REST API endpoints documentation to DESIGN.md
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
13
DESIGN.md
13
DESIGN.md
@@ -61,3 +61,16 @@
|
|||||||
- `plugins.rs` - Shared plugin utilities
|
- `plugins.rs` - Shared plugin utilities
|
||||||
- Contains `ProgramWriter` for external process communication
|
- Contains `ProgramWriter` for external process communication
|
||||||
|
|
||||||
|
## REST API Endpoints
|
||||||
|
|
||||||
|
### Item Operations
|
||||||
|
- `GET /api/item/latest` - Return the latest item as JSON, with metadata and content. Optional params: `tags[]` (find latest with matching tags)
|
||||||
|
- `GET /api/item/latest/meta` - Return the latest item metadata as JSON. Optional params: `tags[]`
|
||||||
|
- `GET /api/item/latest/content` - Return the raw content of the latest item using the mime type from meta, or unknown binary. Optional params: `tags[]`
|
||||||
|
- `GET /api/item/<#>` - Return the item as JSON, with metadata and content
|
||||||
|
- `GET /api/item/<#>/meta` - Return the item metadata as JSON
|
||||||
|
- `GET /api/item/<#>/content` - Return the raw content of the item using the mime type from meta, or unknown binary
|
||||||
|
- `GET /api/item/` - Get a list of items as JSON. Optional params: `order=newest`, `start=0`, `count=100`, `tags[]`
|
||||||
|
- `POST /api/item/` - Add a new item. Optional params: `tags[]` (defaults to `['none']` if empty), `meta[]`
|
||||||
|
- `DELETE /api/item/<#>` - Delete an item
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user