Goal:
Expose snippet data as JSON over a proper API, separate from HTML routes.
User story:
As a developer, I want a REST API so that I can build tools (like a browser extension) on top of StashSnip.
Tasks:
- New blueprint (e.g. app/api.py) mounted under /api
- Endpoints: GET /api/snippets, GET /api/snippets/
- Reuse existing DB/model logic instead of duplicating query code
- Decide and document auth scope for this issue (open API to start is fine)
Acceptance Criteria:
- Both endpoints return correct JSON with proper status codes (200, 404)
- No duplicate business logic between HTML routes and API routes
- Documented (even briefly) in the README or a docs file
Goal:
Expose snippet data as JSON over a proper API, separate from HTML routes.
User story:
As a developer, I want a REST API so that I can build tools (like a browser extension) on top of StashSnip.
Tasks:
Acceptance Criteria: