{
  "openapi": "3.1.0",
  "info": {
    "title": "Puffin Compute data",
    "version": "v1",
    "summary": "Sourced figures for a neocloud credit file.",
    "description": "Power is the borrowing base. Facilities are the interconnection sites operators have listed, with the contact they published. A null value means the figure is not evidenced. The file is not a credit rating. An agent reads /api/v1/agent.json. An engineer reads these JSON records. A finance workbook is /api/v1/power/sites.csv."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/api/v1.json": {
      "get": {
        "operationId": "getRoot",
        "responses": {
          "200": {
            "description": "API index"
          }
        }
      }
    },
    "/api/v1/datasets.json": {
      "get": {
        "operationId": "listDatasets",
        "responses": {
          "200": {
            "description": "Datasets"
          }
        }
      }
    },
    "/api/v1/datasets/{dataset}.json": {
      "get": {
        "operationId": "getDataset",
        "responses": {
          "200": {
            "description": "One dataset"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/power/zones.json": {
      "get": {
        "operationId": "listZones",
        "responses": {
          "200": {
            "description": "Power zones"
          }
        }
      }
    },
    "/api/v1/power/zones/{zone}.json": {
      "get": {
        "operationId": "getZone",
        "responses": {
          "200": {
            "description": "One zone"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/power/zones/{zone}/sites.json": {
      "get": {
        "operationId": "listZoneSites",
        "responses": {
          "200": {
            "description": "Campuses in a zone"
          }
        }
      }
    },
    "/api/v1/power/sites.json": {
      "get": {
        "operationId": "listSites",
        "responses": {
          "200": {
            "description": "Campuses"
          }
        }
      }
    },
    "/api/v1/power/sites.csv": {
      "get": {
        "operationId": "downloadSitesCsv",
        "responses": {
          "200": {
            "description": "Campus sheet for a workbook"
          }
        }
      }
    },
    "/api/v1/agent.json": {
      "get": {
        "operationId": "getAgentBrief",
        "responses": {
          "200": {
            "description": "One brief an agent can read"
          }
        }
      }
    },
    "/api/v1/power/sites/{site}.json": {
      "get": {
        "operationId": "getSite",
        "responses": {
          "200": {
            "description": "One campus"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/facilities.json": {
      "get": {
        "operationId": "listFacilities",
        "responses": {
          "200": {
            "description": "Listed facilities and their published contacts"
          }
        }
      }
    },
    "/api/v1/facilities/countries/{country}.json": {
      "get": {
        "operationId": "listFacilitiesInCountry",
        "responses": {
          "200": {
            "description": "Facilities in one country"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "responses": {
          "200": {
            "description": "OpenAPI document"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Fact": {
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "basis": {
            "type": [
              "string",
              "null"
            ]
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "description": "YYYY-MM-DD. Null when the figure is not evidenced."
          },
          "source": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "reported",
              "classification",
              null
            ]
          }
        },
        "required": [
          "value",
          "unit",
          "basis",
          "as_of",
          "source",
          "method"
        ]
      }
    }
  }
}