Skip to content

REST API for snippets #25

Description

@byteofhoney

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions