{
  "service": "Expotools Show-Database API wrapper",
  "version": "1.0.0",
  "describes": "Wraps the Expotools fetchLatestShowDatabaseBySak endpoint: turns the zip-of-CSVs into easy GET calls.",
  "auth": "Pass your Expotools show access key as ?sak=<sak> on every data endpoint.",
  "endpoints": [
    {
      "method": "GET",
      "path": "/health",
      "desc": "Liveness check (no sak required)."
    },
    {
      "method": "GET",
      "path": "/files?sak=SAK",
      "desc": "List the CSV files in the show database (name, bytes, rows, columns)."
    },
    {
      "method": "GET",
      "path": "/file/{name}?sak=SAK&format=csv|json",
      "desc": "Return one file. format=csv (default) or json. name works with or without .csv."
    },
    {
      "method": "GET",
      "path": "/preview/{name}?sak=SAK&rows=20",
      "desc": "First N rows of a file as JSON (default 20)."
    },
    {
      "method": "GET",
      "path": "/all?sak=SAK",
      "desc": "Every file parsed into one JSON object keyed by name."
    },
    {
      "method": "GET",
      "path": "/zip?sak=SAK",
      "desc": "The raw upstream zip, untouched."
    }
  ],
  "options": {
    "format": "csv | json  (on /file; default csv)",
    "rows": "integer limit (on /preview, and /file)",
    "columns": "named — REQUIRES format=json, and only affects /file/registrants; applies friendly column names from registrantsColumns.csv",
    "raw": "1 — REQUIRES format=csv (the default); returns original upstream bytes untouched (original encoding + BOM) instead of cleaned UTF-8"
  },
  "tip": "Call /files first to discover the file names you can pass to /file/{name} and /preview/{name}.",
  "examples": [
    "https://zvf55vdfrd.execute-api.us-east-1.amazonaws.com/files?sak=YOUR_SAK",
    "https://zvf55vdfrd.execute-api.us-east-1.amazonaws.com/file/sessionsSummary?sak=YOUR_SAK&format=json",
    "https://zvf55vdfrd.execute-api.us-east-1.amazonaws.com/preview/combinedFilterOutput?sak=YOUR_SAK&rows=5",
    "https://zvf55vdfrd.execute-api.us-east-1.amazonaws.com/file/registrants?sak=YOUR_SAK&format=json&columns=named"
  ]
}