{
  "api": "Civgraph",
  "version": "v1",
  "status": "stable",
  "compatibility": "Routes, parameters and answer shapes in v1 change only compatibly (additions). An incompatible change is a new version; v1 keeps answering.",
  "legacyPrefix": "/_api",
  "openapi": "/api/v1/openapi.json",
  "methods": [
    "GET",
    "HEAD"
  ],
  "endpoints": [
    {
      "path": "/api/v1/elections",
      "legacy": "/_api/elections",
      "summary": "Elections, contests, candidates and counts",
      "parameters": [
        "body",
        "key",
        "slug",
        "constituency",
        "constituencyName",
        "contest",
        "format",
        "lite",
        "view",
        "decade",
        "q",
        "limit",
        "offset",
        "person"
      ]
    },
    {
      "path": "/api/v1/persons",
      "legacy": "/_api/persons",
      "summary": "People: search, list and one record with candidacies and votes",
      "parameters": [
        "slug",
        "q",
        "limit",
        "offset",
        "facets",
        "view",
        "body",
        "decade",
        "elected",
        "party",
        "sort"
      ]
    },
    {
      "path": "/api/v1/parties",
      "legacy": "/_api/parties",
      "summary": "Parties: the list, one party, its profile, its members, ballot-label folds",
      "parameters": [
        "slug",
        "view",
        "limit",
        "offset"
      ]
    },
    {
      "path": "/api/v1/sources",
      "legacy": "/_api/sources",
      "summary": "Catalogued sources and their citations",
      "parameters": [
        "slug",
        "q",
        "limit",
        "offset",
        "provider",
        "category",
        "publicationStatus",
        "view",
        "sort"
      ]
    },
    {
      "path": "/api/v1/register-interests",
      "legacy": "/_api/register-interests",
      "summary": "Registers of members' interests",
      "parameters": [
        "slug",
        "q",
        "limit",
        "offset",
        "memberName",
        "electedBody",
        "category",
        "view",
        "sort"
      ]
    },
    {
      "path": "/api/v1/votes",
      "legacy": "/_api/votes",
      "summary": "Parliamentary divisions and how members voted",
      "parameters": [
        "view",
        "division",
        "shard",
        "person",
        "party",
        "body",
        "term"
      ]
    },
    {
      "path": "/api/v1/graph",
      "legacy": "/_api/graph",
      "summary": "The semantic graph: entities and statements",
      "parameters": [
        "entity",
        "browse",
        "slug",
        "q",
        "limit",
        "offset",
        "related",
        "view"
      ]
    },
    {
      "path": "/api/v1/stats",
      "legacy": "/_api/stats",
      "summary": "Headline counts of the records",
      "parameters": []
    },
    {
      "path": "/api/v1/catalogue",
      "legacy": "/_api/catalogue",
      "summary": "The map catalogue",
      "parameters": [
        "id",
        "slug",
        "category",
        "visible",
        "view"
      ]
    },
    {
      "path": "/api/v1/layers",
      "legacy": "/_api/layers",
      "summary": "Map layers: the full metadata, the startup index, each layer record and its duplicate-id sidecar",
      "parameters": [
        "view"
      ],
      "subpaths": true
    },
    {
      "path": "/api/v1/search",
      "legacy": "/_api/search",
      "summary": "Map features by name",
      "parameters": [
        "q",
        "limit"
      ]
    },
    {
      "path": "/api/v1/spatial",
      "legacy": "/_api/spatial",
      "summary": "Map features of one map (or several, mapIds) in a bounding box",
      "parameters": [
        "mapId",
        "mapIds",
        "bbox"
      ]
    },
    {
      "path": "/api/v1/data-index",
      "legacy": "/_api/data-index",
      "summary": "The published files on data.civgraph.net, by prefix",
      "parameters": [
        "prefix",
        "cursor",
        "limit"
      ]
    },
    {
      "path": "/api/v1/proni/node",
      "legacy": "/_api/proni/node",
      "summary": "PRONI eCatalogue: the fonds, or one node with its ancestors and children",
      "parameters": [
        "ref"
      ]
    },
    {
      "path": "/api/v1/proni/search",
      "legacy": "/_api/proni/search",
      "summary": "PRONI eCatalogue full-text search",
      "parameters": [
        "q",
        "fields",
        "letter",
        "from",
        "to",
        "top",
        "level",
        "access",
        "sort",
        "dir",
        "limit",
        "offset"
      ]
    },
    {
      "path": "/api/v1/proni/count",
      "legacy": "/_api/proni/count",
      "summary": "PRONI eCatalogue: the number of matches, by level",
      "parameters": [
        "q",
        "fields",
        "letter",
        "from",
        "to",
        "top",
        "level",
        "access"
      ]
    },
    {
      "path": "/api/v1/proni/export",
      "legacy": "/_api/proni/export",
      "summary": "PRONI eCatalogue: matches as CSV",
      "parameters": [
        "q",
        "fields",
        "letter",
        "from",
        "to",
        "top",
        "level",
        "access"
      ]
    }
  ]
}