{
  "openapi": "3.1.0",
  "info": {
    "title": "Solis Discover API",
    "version": "1.0.0",
    "description": "Read-only art-history city holdings datasets with row-level source references.",
    "termsOfService": "https://www.solisprints.co.uk/pages/discover-api-data-terms",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://solis-discover-api.solisprints.workers.dev"
    }
  ],
  "paths": {
    "/api/v1/cities/{slug}/holdings": {
      "get": {
        "summary": "List sourced museum/artist/artwork associations for a city",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "madrid-spain"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated holdings dataset"
          },
          "404": {
            "description": "Unknown city dataset slug"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Dataset storage not configured"
          }
        }
      }
    },
    "/data/{slug}.json": {
      "get": {
        "summary": "Download the full city dataset as JSON",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "City dataset JSON"
          },
          "404": {
            "description": "Unknown city dataset slug"
          }
        }
      }
    },
    "/data/{slug}.csv": {
      "get": {
        "summary": "Download the full city dataset as CSV",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "City dataset CSV"
          },
          "404": {
            "description": "Unknown city dataset slug"
          }
        }
      }
    }
  }
}