{
 "openapi": "3.1.0",
 "info": {
  "title": "The War Record API",
  "version": "1",
  "description": "Static, read-only JSON. Every response carries api_version, generated, licence and data.",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  }
 },
 "servers": [
  {
   "url": "https://thewarrecord.com/api/v1"
  }
 ],
 "paths": {
  "/index.json": {
   "get": {
    "summary": "What is here",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/conflicts.json": {
   "get": {
    "summary": "The wars",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/theatres.json": {
   "get": {
    "summary": "Theatres",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/actors.json": {
   "get": {
    "summary": "Actors",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/places.json": {
   "get": {
    "summary": "Places",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/sources.json": {
   "get": {
    "summary": "The source registry",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/{collection}/{id}.json": {
   "get": {
    "summary": "One record by id (statements, claims, tolls, corrections, links, resolutions, series)",
    "parameters": [
     {
      "name": "collection",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/events/index.json": {
   "get": {
    "summary": "Every event: id, war, date, status and the monthly bundle that holds it",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/events/by-month/{month}.json": {
   "get": {
    "summary": "Every event that occurred in a month (YYYY-MM), in any state",
    "parameters": [
     {
      "name": "month",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/{conflict}/latest.json": {
   "get": {
    "summary": "The latest day with records",
    "parameters": [
     {
      "name": "conflict",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/{conflict}/days/index.json": {
   "get": {
    "summary": "Days with records, newest first",
    "parameters": [
     {
      "name": "conflict",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/{conflict}/days/{date}.json": {
   "get": {
    "summary": "Events and statements on a day",
    "parameters": [
     {
      "name": "conflict",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "date",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/{conflict}/tolls.json": {
   "get": {
    "summary": "Current toll figures and their history",
    "parameters": [
     {
      "name": "conflict",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/{conflict}/claims.json": {
   "get": {
    "summary": "Claims and track records",
    "parameters": [
     {
      "name": "conflict",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/changes/index.json": {
   "get": {
    "summary": "Dates with changes",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/changes/{date}.json": {
   "get": {
    "summary": "Records that entered or changed on a date",
    "parameters": [
     {
      "name": "date",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/fields.json": {
   "get": {
    "summary": "The field dictionary with allowed values",
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  },
  "/schema/{type}.json": {
   "get": {
    "summary": "JSON Schema for a record type",
    "parameters": [
     {
      "name": "type",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {}
      }
     }
    }
   }
  }
 }
}
