Skip to content

feat(api): REST endpoints + OpenAPI #18

@strausmann

Description

@strausmann

Goal

Implement all REST endpoints from the spec (printers, jobs, lookup, webhooks, QR-scan landing pages).

Endpoints

  • GET /api/printers — list with cached status
  • GET /api/printers/{id}/status — force fresh ESC i S read
  • GET /api/printers/{id}/tape — current tape spec
  • GET /api/printers/{id}/queue — list queued+paused+printing
  • POST /api/printers/{id}/{pause,resume,queue/clear}
  • GET /api/templates
  • GET /api/lookup/{app}/{id}
  • POST /api/print/{printer_id} → 202 + JobId
  • GET /api/jobs, /api/jobs/{id}
  • POST /api/jobs/{id}/{pause,resume,cancel,retry,priority}
  • POST /api/webhook/{spoolman,grocy} (API-Key auth)
  • GET /loc/{id}, /asset/{id}, /spool/{id}, /product/{id} — QR landing pages
  • GET /healthz (open)
  • GET /api/events — SSE stream

Tasks

  • Pydantic schemas for all request/response types
  • Dependency-injection setup (PrinterService, AppLookupService, ...)
  • OpenAPI tags + descriptions for auto-generated docs
  • Webhook API-key middleware
  • HTTP error mapping (Brother errors → meaningful 4xx/5xx)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions