{"openapi":"3.0.3","info":{"title":"Discovera Maps API","version":"1.0.0","description":"Read-only, per-application access to selected Discovera archive maps. Send the application key in Authorization: Bearer on every metadata, preview and download request. SQLite downloads are original RMMaps files; they are not PMTiles or XYZ tile URLs."},"servers":[{"url":"https://maps-api.mydiscovera.app"}],"security":[{"AppKey":[]}],"paths":{"/health":{"get":{"summary":"API process health (not a storage readiness check)","security":[],"responses":{"200":{"description":"Worker is running."}}}},"/v1/maps":{"get":{"summary":"List only the maps granted to this application","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":120},"example":"Брест"},{"name":"year","in":"query","schema":{"type":"integer","minimum":0,"maximum":9999},"example":1823},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"nextCursor from the preceding page; keep the same filters."}],"responses":{"200":{"description":"Catalogue page","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","maps","total","nextCursor"],"properties":{"apiVersion":{"type":"string"},"maps":{"type":"array","items":{"$ref":"#/components/schemas/Map"}},"total":{"type":"integer"},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/maps/{id}":{"get":{"summary":"Map details and current file metadata","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"brest-1823","description":"Stable map ID or slug from the catalogue."}],"responses":{"200":{"description":"Map and file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapDetails"}}}},"401":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/maps/{id}/download":{"get":{"summary":"Download SQLite map, with resume support","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"brest-1823","description":"Stable map ID or slug from the catalogue."},{"name":"Range","in":"header","schema":{"type":"string"},"example":"bytes=1048576-","description":"A single byte range; suffix ranges are supported."},{"name":"If-Range","in":"header","schema":{"type":"string"},"description":"Strong ETag from the original download. A changed file returns a full 200 response."},{"name":"If-None-Match","in":"header","schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Complete file. Content-Length and ETag are always provided.","content":{"application/vnd.sqlite3":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"Partial file; Content-Range describes the returned bytes."},"304":{"description":"Not modified; empty body."},"401":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"File changed. Restart the download.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Invalid/unsatisfiable range. Content-Range: bytes */<size>.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"head":{"summary":"Inspect file size and ETag","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"brest-1823","description":"Stable map ID or slug from the catalogue."},{"name":"If-None-Match","in":"header","schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"File headers, empty body."},"304":{"description":"Not modified; empty body."},"401":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"File changed. Restart the download.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Invalid/unsatisfiable range. Content-Range: bytes */<size>.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/maps/{id}/preview":{"get":{"summary":"Get map preview (if available)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"brest-1823","description":"Stable map ID or slug from the catalogue."},{"name":"Range","in":"header","schema":{"type":"string"},"example":"bytes=1048576-","description":"A single byte range; suffix ranges are supported."},{"name":"If-Range","in":"header","schema":{"type":"string"},"description":"Strong ETag from the original download. A changed file returns a full 200 response."},{"name":"If-None-Match","in":"header","schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Complete file. Content-Length and ETag are always provided.","content":{"image/webp":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"Partial file; Content-Range describes the returned bytes."},"304":{"description":"Not modified; empty body."},"401":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"File changed. Restart the download.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Invalid/unsatisfiable range. Content-Range: bytes */<size>.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"head":{"summary":"Get map preview (if available)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"brest-1823","description":"Stable map ID or slug from the catalogue."},{"name":"If-None-Match","in":"header","schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"File headers, empty body."},"304":{"description":"Not modified; empty body."},"401":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"File changed. Restart the download.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"416":{"description":"Invalid/unsatisfiable range. Content-Range: bytes */<size>.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; see error.code and X-Request-Id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"AppKey":{"type":"http","scheme":"bearer","bearerFormat":"dmap_...","description":"A scoped application API key, not a Firebase or administrator token."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},"Map":{"type":"object","required":["id","slug","title","year","bounds","format","tileScheme","links"],"properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"year":{"type":"integer"},"country":{"type":"string"},"countryCode":{"type":"string"},"cities":{"type":"array","items":{"type":"string"}},"bounds":{"type":"object","required":["west","east","north","south"],"properties":{"west":{"type":"number","format":"double"},"east":{"type":"number","format":"double"},"north":{"type":"number","format":"double"},"south":{"type":"number","format":"double"}}},"center":{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"}}},"format":{"type":"string","example":"sqlite"},"tileScheme":{"type":"string","example":"rmaps"},"attribution":{"type":"string"},"tiles":{"type":"object","properties":{"minZoom":{"type":"integer"},"maxZoom":{"type":"integer"},"size":{"type":"integer"},"imageFormat":{"type":"string"},"crs":{"type":"string"},"rmapsZoomBase":{"type":"integer","description":"For RMMaps: database z = rmapsZoomBase - XYZ zoom."}}},"links":{"type":"object","required":["self","download"],"properties":{"self":{"type":"string","format":"uri"},"download":{"type":"string","format":"uri"}}}}},"MapDetails":{"allOf":[{"$ref":"#/components/schemas/Map"},{"type":"object","required":["file","previewUrl"],"properties":{"previewUrl":{"type":"string","format":"uri","nullable":true,"description":"Requires the same Authorization header. Null when no preview is available."},"file":{"type":"object","required":["name","sizeBytes","etag","updatedAt","contentType","supportsResume"],"properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"},"etag":{"type":"string","description":"Opaque strong validator, including quotes; not necessarily a checksum."},"updatedAt":{"type":"string","format":"date-time"},"contentType":{"type":"string"},"sha256":{"type":"string","nullable":true,"description":"Available only if the object was uploaded with a SHA-256 checksum."},"supportsResume":{"type":"boolean"}}}}}]}}}}