Skip to content

Export endpoint: GET /api/v1/quotes/export #47

Description

@DutchJaFO

Add a bulk export endpoint — the natural complement to the import endpoint (#45).

Endpoint

GET /api/v1/quotes/export

Query parameters

Parameter Description
format json (default) or csv
type Filter by type (repeatable, OR logic) — same as /quotes
genre Filter by genre (repeatable, OR logic) — same as /quotes
lang Language code for translation fallback — same as other endpoints

Response

  • format=json — Content-Type: application/json, body is a JSON array in the canonical quotes.json schema. The output is valid input for the import endpoint (Import endpoint: POST /api/v1/quotes/import #45) and for the seed script (scripts/seed.csx).
  • format=csv — Content-Type: text/csv, Content-Disposition: attachment; filename="quotes.csv", columns match the import CSV format.

Behaviour

  • No pagination — always returns the full filtered set; this is a data export, not a list endpoint
  • totalCount in the response headers (X-Total-Count) so consumers know what they received
  • The JSON output round-trips cleanly through import: export → import produces no duplicates and no data loss

Auth

Read-only — no authentication required (same policy as other read endpoints). Rate limiting applies.

Notes

  • Feeds directly into the MagicMirror preset import UI (Blazor management UI: bulk import quotes from JSON or CSV #44) — a user can export, edit locally, and re-import
  • Useful for backups before enrichment runs or before a migration
  • Update README, addon/DOCS.md, and [Description] attributes in the same commit

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 request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions