{
  "openapi": "3.1.0",
  "info": {
    "title": "datacenter-geo public snapshot downloads",
    "version": "1.1.0",
    "description": "Read-only static JSON downloads for India facility and Madhya Pradesh infrastructure research. No authentication, live query, write, refresh or site-analysis endpoint is provided. Fetch a snapshot and filter locally. Preserve provenance, source timestamps and unknown values."
  },
  "servers": [
    {
      "url": "https://not-vibhu.github.io/datacenter-geo"
    }
  ],
  "paths": {
    "/data/catalog.json": {
      "get": {
        "operationId": "downloadCatalog",
        "summary": "Facility catalog",
        "description": "Facility records, verification fields, source metadata and research links. A smaller starting point than the full map payload.",
        "responses": {
          "200": {
            "description": "Published JSON snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          },
          "404": {
            "description": "Snapshot unavailable; report an evidence gap instead of substituting zero."
          },
          "503": {
            "description": "Hosting unavailable; retry later without discarding previously retrieved evidence."
          }
        }
      }
    },
    "/data/infrastructure.json": {
      "get": {
        "operationId": "downloadInfrastructure",
        "summary": "Madhya Pradesh infrastructure",
        "description": "Independently loaded state infrastructure geometry, coverage boundary, Bhopal proximity samples and provenance. A missing request leaves facility exploration and boundary drawing usable.",
        "responses": {
          "200": {
            "description": "Published JSON snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Infrastructure"
                }
              }
            }
          },
          "404": {
            "description": "Snapshot unavailable; report an evidence gap instead of substituting zero."
          },
          "503": {
            "description": "Hosting unavailable; retry later without discarding previously retrieved evidence."
          }
        }
      }
    },
    "/data/atlas.json": {
      "get": {
        "operationId": "downloadAtlas",
        "summary": "Full infrastructure atlas",
        "description": "Facility records, Madhya Pradesh map geometry, coverage boundary, Bhopal proximity samples and source metadata.",
        "responses": {
          "200": {
            "description": "Published JSON snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Atlas"
                }
              }
            }
          },
          "404": {
            "description": "Snapshot unavailable; report an evidence gap instead of substituting zero."
          },
          "503": {
            "description": "Hosting unavailable; retry later without discarding previously retrieved evidence."
          }
        }
      }
    },
    "/data/screening.json": {
      "get": {
        "operationId": "downloadScreening",
        "summary": "Screening features",
        "description": "Madhya Pradesh, Bhopal and national screening feature collections with model metadata, evidence gaps and limitations. These are research signals, not an investment recommendation.",
        "responses": {
          "200": {
            "description": "Published JSON snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Screening"
                }
              }
            }
          },
          "404": {
            "description": "Snapshot unavailable; report an evidence gap instead of substituting zero."
          },
          "503": {
            "description": "Hosting unavailable; retry later without discarding previously retrieved evidence."
          }
        }
      }
    },
    "/data/sites.json": {
      "get": {
        "operationId": "downloadPublishedRuns",
        "summary": "Published analysis runs",
        "description": "Pre-existing published analysis summaries. These runs have their own locations, profiles and evidence dates; they are not evaluations of every mapped facility.",
        "responses": {
          "200": {
            "description": "Published JSON snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishedRuns"
                }
              }
            }
          },
          "404": {
            "description": "Snapshot unavailable; report an evidence gap instead of substituting zero."
          },
          "503": {
            "description": "Hosting unavailable; retry later without discarding previously retrieved evidence."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Facility": {
        "type": "object",
        "required": [
          "id",
          "name",
          "lat",
          "lon",
          "source_url"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -90,
            "maximum": 90
          },
          "lon": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -180,
            "maximum": 180
          },
          "source_url": {
            "type": "string",
            "format": "uri"
          },
          "retrieved": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Record/listing status, not independently verified operating status."
          },
          "operating_status": {
            "type": "string"
          },
          "coordinate_precision": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "FeatureCollection": {
        "type": "object",
        "required": [
          "type",
          "features"
        ],
        "properties": {
          "type": {
            "const": "FeatureCollection"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type",
                "geometry",
                "properties"
              ],
              "properties": {
                "type": {
                  "const": "Feature"
                },
                "geometry": {
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "properties": {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "additionalProperties": true
            }
          }
        }
      },
      "Catalog": {
        "type": "object",
        "required": [
          "version",
          "facilities",
          "meta"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "facilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Facility"
            }
          },
          "meta": {
            "type": "object"
          }
        },
        "additionalProperties": true
      },
      "Infrastructure": {
        "type": "object",
        "required": [
          "overlays",
          "proximity",
          "meta"
        ],
        "properties": {
          "overlays": {
            "$ref": "#/components/schemas/FeatureCollection"
          },
          "proximity": {
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        },
        "additionalProperties": true
      },
      "Atlas": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Catalog"
          },
          {
            "type": "object",
            "required": [
              "overlays",
              "proximity"
            ],
            "properties": {
              "overlays": {
                "$ref": "#/components/schemas/FeatureCollection"
              },
              "proximity": {
                "type": "object"
              }
            }
          }
        ]
      },
      "Screening": {
        "type": "object",
        "required": [
          "model_version",
          "metadata",
          "bhopal",
          "national"
        ],
        "properties": {
          "model_version": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "bhopal": {
            "$ref": "#/components/schemas/FeatureCollection"
          },
          "mp": {
            "$ref": "#/components/schemas/FeatureCollection"
          },
          "national": {
            "$ref": "#/components/schemas/FeatureCollection"
          }
        },
        "additionalProperties": true
      },
      "PublishedRuns": {
        "type": "object",
        "description": "Existing generated analysis summaries. Inspect snapshot metadata and individual source records before reuse.",
        "additionalProperties": true
      }
    }
  },
  "externalDocs": {
    "description": "Source attribution, data contract and limitations",
    "url": "https://not-vibhu.github.io/datacenter-geo/discover/data/"
  }
}
