{
  "openapi": "3.1.0",
  "info": {
    "title": "Tasmanian deaths index, 1803 to 1939 query API",
    "version": "2024-11-28",
    "summary": "Filter, page and aggregate Tasmanian deaths index, 1803 to 1939 from Libraries Tasmania.",
    "description": "The query API returns only the rows you ask for, as JSON, NDJSON or CSV, from the same typed rows as the files. It needs no key. The API allows 60 requests in 10 seconds from one address. Above that it answers 429 for 10 seconds with a `Retry-After` header, a `RateLimit-Policy` header and a JSON body that gives the limit. Every API answer carries the same `RateLimit-Policy`. A client should wait the `Retry-After` seconds, or read the files, which have no limit. Every JSON answer carries the version, licence and attribution. CSV and NDJSON answers carry them in response headers. Libraries Tasmania has not endorsed this site. The whole site is described in https://publicdata.au/openapi.json.",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://publicdata.au"
    }
  ],
  "externalDocs": {
    "url": "https://publicdata.au/d/tas-deaths-1803-1939/#query"
  },
  "tags": [
    {
      "name": "query"
    }
  ],
  "paths": {
    "/api/v1/datasets/tas-deaths-1803-1939/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query Tasmanian deaths index, 1803 to 1939",
        "operationId": "queryRows_tas_deaths_1803_1939",
        "description": "Rows of Tasmanian deaths index, 1803 to 1939 in the newest loaded version, filtered and paged. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "record_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The publisher's number for the record in the Tasmanian Names Index. From 470662 to 2038553."
          },
          {
            "name": "record_url",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Surname, then given names. A second name the record gives follows a vertical bar."
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. The year of death or burial as the index gives it. A few records give two."
          },
          {
            "name": "death_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As the source gives it, which may be a full date, a month and year, or a year."
          },
          {
            "name": "age",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As recorded, which may be in years or a phrase."
          },
          {
            "name": "gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Female, Male, Not stated.",
            "examples": [
              "eq.Not stated"
            ]
          },
          {
            "name": "reg_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Zeehan"
            ]
          },
          {
            "name": "reg_year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.1933"
            ]
          },
          {
            "name": "burial_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "property",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "property_index",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "where_died",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc_sr",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873.",
            "examples": [
              "eq.Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873"
            ]
          },
          {
            "name": "remarks",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Note: This data was compiled by the Tasmanian Family History Society. It was published on CD-ROM as part of the Tasmanian Federation Index Births 1900-1919, Deaths and Marriages 1900-1930 by Macbeth Genealogical Services, 2006. Libraries Tasmania does not hold the original documents used to create this index. Contact Births, Deaths and Marriages for access to the original records, or to obtain a certificate., SC195/1/35 Inquest 3335:date of death 11 Aug 1854.",
            "examples": [
              "eq.SC195/1/35 Inquest 3335:date of death 11 Aug 1854"
            ]
          },
          {
            "name": "father",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "mother",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "spouse",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also_sp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Beedle, Thomas, Brooks, John, Brown, Wilson, Buddington, Dennis, Calvert, George, Green, William, Kane, WIlliam, McKenna, John, Rose, David, Wallace, James.",
            "examples": [
              "eq.Wallace, James"
            ]
          },
          {
            "name": "name_rank",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.War Worker"
            ]
          },
          {
            "name": "ship",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "ship_native_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "admiss_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "birth_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.31 Dec 1910"
            ]
          },
          {
            "name": "will_no",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "select",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Fields to return, comma-separated. Every field when absent."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/tas-deaths-1803-1939/versions/{version}/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query Tasmanian deaths index, 1803 to 1939",
        "operationId": "queryRows_tas_deaths_1803_1939_version",
        "description": "Rows of Tasmanian deaths index, 1803 to 1939 in one dated version, filtered and paged. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "A dated version loaded for queries, from the versions path. Answers for a dated version never change."
          },
          {
            "name": "record_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The publisher's number for the record in the Tasmanian Names Index. From 470662 to 2038553."
          },
          {
            "name": "record_url",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Surname, then given names. A second name the record gives follows a vertical bar."
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. The year of death or burial as the index gives it. A few records give two."
          },
          {
            "name": "death_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As the source gives it, which may be a full date, a month and year, or a year."
          },
          {
            "name": "age",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As recorded, which may be in years or a phrase."
          },
          {
            "name": "gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Female, Male, Not stated.",
            "examples": [
              "eq.Not stated"
            ]
          },
          {
            "name": "reg_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Zeehan"
            ]
          },
          {
            "name": "reg_year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.1933"
            ]
          },
          {
            "name": "burial_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "property",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "property_index",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "where_died",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc_sr",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873.",
            "examples": [
              "eq.Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873"
            ]
          },
          {
            "name": "remarks",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Note: This data was compiled by the Tasmanian Family History Society. It was published on CD-ROM as part of the Tasmanian Federation Index Births 1900-1919, Deaths and Marriages 1900-1930 by Macbeth Genealogical Services, 2006. Libraries Tasmania does not hold the original documents used to create this index. Contact Births, Deaths and Marriages for access to the original records, or to obtain a certificate., SC195/1/35 Inquest 3335:date of death 11 Aug 1854.",
            "examples": [
              "eq.SC195/1/35 Inquest 3335:date of death 11 Aug 1854"
            ]
          },
          {
            "name": "father",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "mother",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "spouse",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also_sp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Beedle, Thomas, Brooks, John, Brown, Wilson, Buddington, Dennis, Calvert, George, Green, William, Kane, WIlliam, McKenna, John, Rose, David, Wallace, James.",
            "examples": [
              "eq.Wallace, James"
            ]
          },
          {
            "name": "name_rank",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.War Worker"
            ]
          },
          {
            "name": "ship",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "ship_native_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "admiss_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "birth_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.31 Dec 1910"
            ]
          },
          {
            "name": "will_no",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "select",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Fields to return, comma-separated. Every field when absent."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/{slug}/aggregate": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Counts, sums, averages, minimums and maximums by group",
        "operationId": "aggregate",
        "description": "Groups and totals of any dataset in the newest loaded version. Filters work as they do on rows. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "tas-deaths-1803-1939"
              ]
            },
            "description": "The dataset's slug, as in its page URL `/d/<slug>/`."
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "On `aggregate`, fields to group by, comma-separated."
          },
          {
            "name": "metric",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "count"
            },
            "description": "On `aggregate`, `count`, `sum.field`, `avg.field`, `min.field` or `max.field`, comma-separated. `count` when absent."
          },
          {
            "name": "record_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The publisher's number for the record in the Tasmanian Names Index. From 470662 to 2038553."
          },
          {
            "name": "record_url",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Surname, then given names. A second name the record gives follows a vertical bar."
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. The year of death or burial as the index gives it. A few records give two."
          },
          {
            "name": "death_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As the source gives it, which may be a full date, a month and year, or a year."
          },
          {
            "name": "age",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As recorded, which may be in years or a phrase."
          },
          {
            "name": "gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Female, Male, Not stated.",
            "examples": [
              "eq.Not stated"
            ]
          },
          {
            "name": "reg_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Zeehan"
            ]
          },
          {
            "name": "reg_year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.1933"
            ]
          },
          {
            "name": "burial_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "property",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "property_index",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "where_died",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc_sr",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873.",
            "examples": [
              "eq.Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873"
            ]
          },
          {
            "name": "remarks",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Note: This data was compiled by the Tasmanian Family History Society. It was published on CD-ROM as part of the Tasmanian Federation Index Births 1900-1919, Deaths and Marriages 1900-1930 by Macbeth Genealogical Services, 2006. Libraries Tasmania does not hold the original documents used to create this index. Contact Births, Deaths and Marriages for access to the original records, or to obtain a certificate., SC195/1/35 Inquest 3335:date of death 11 Aug 1854.",
            "examples": [
              "eq.SC195/1/35 Inquest 3335:date of death 11 Aug 1854"
            ]
          },
          {
            "name": "father",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "mother",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "spouse",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also_sp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Beedle, Thomas, Brooks, John, Brown, Wilson, Buddington, Dennis, Calvert, George, Green, William, Kane, WIlliam, McKenna, John, Rose, David, Wallace, James.",
            "examples": [
              "eq.Wallace, James"
            ]
          },
          {
            "name": "name_rank",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.War Worker"
            ]
          },
          {
            "name": "ship",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "ship_native_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "admiss_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "birth_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.31 Dec 1910"
            ]
          },
          {
            "name": "will_no",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/{slug}/versions/{version}/aggregate": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Counts, sums, averages, minimums and maximums by group",
        "operationId": "aggregateVersion",
        "description": "Groups and totals of any dataset in one dated version. Filters work as they do on rows. Each filter is `field=operator.value` in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with `ilike`. Prefix `not.` to negate a filter, as `not.eq.value`. Operators: `eq.value`, `neq.value`, `gt.value`, `gte.value`, `lt.value`, `lte.value`, `like.*text*`, `ilike.*text*`, `in.(a,b,c)`, `is.null`.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "tas-deaths-1803-1939"
              ]
            },
            "description": "The dataset's slug, as in its page URL `/d/<slug>/`."
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "A dated version loaded for queries, from the versions path. Answers for a dated version never change."
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "On `aggregate`, fields to group by, comma-separated."
          },
          {
            "name": "metric",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "count"
            },
            "description": "On `aggregate`, `count`, `sum.field`, `avg.field`, `min.field` or `max.field`, comma-separated. `count` when absent."
          },
          {
            "name": "record_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. The publisher's number for the record in the Tasmanian Names Index. From 470662 to 2038553."
          },
          {
            "name": "record_url",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Surname, then given names. A second name the record gives follows a vertical bar."
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. The year of death or burial as the index gives it. A few records give two."
          },
          {
            "name": "death_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As the source gives it, which may be a full date, a month and year, or a year."
          },
          {
            "name": "age",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. As recorded, which may be in years or a phrase."
          },
          {
            "name": "gender",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Female, Male, Not stated.",
            "examples": [
              "eq.Not stated"
            ]
          },
          {
            "name": "reg_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.Zeehan"
            ]
          },
          {
            "name": "reg_year",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.1933"
            ]
          },
          {
            "name": "burial_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "property",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "property_index",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Cornelian Bay Cemetery, General Hospital Hobart.",
            "examples": [
              "eq.General Hospital Hobart"
            ]
          },
          {
            "name": "where_died",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "desc_sr",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873.",
            "examples": [
              "eq.Russian or Polish cabin passenger - 14 or 15 yrs - lost at sea on board 'North Fleet' - January 1873"
            ]
          },
          {
            "name": "remarks",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Note: This data was compiled by the Tasmanian Family History Society. It was published on CD-ROM as part of the Tasmanian Federation Index Births 1900-1919, Deaths and Marriages 1900-1930 by Macbeth Genealogical Services, 2006. Libraries Tasmania does not hold the original documents used to create this index. Contact Births, Deaths and Marriages for access to the original records, or to obtain a certificate., SC195/1/35 Inquest 3335:date of death 11 Aug 1854.",
            "examples": [
              "eq.SC195/1/35 Inquest 3335:date of death 11 Aug 1854"
            ]
          },
          {
            "name": "father",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "mother",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "spouse",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "name_see_also_sp",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Beedle, Thomas, Brooks, John, Brown, Wilson, Buddington, Dennis, Calvert, George, Green, William, Kane, WIlliam, McKenna, John, Rose, David, Wallace, James.",
            "examples": [
              "eq.Wallace, James"
            ]
          },
          {
            "name": "name_rank",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.War Worker"
            ]
          },
          {
            "name": "ship",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "ship_native_place",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "admiss_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "birth_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string.",
            "examples": [
              "eq.31 Dec 1910"
            ]
          },
          {
            "name": "will_no",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`field.asc` or `field.desc`, comma-separated. The publisher's row order when absent."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "description": "Rows per page, 1 to 10,000. 100 when absent."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Rows to skip. The `next` URL in each answer sets it for you."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv"
              ],
              "default": "json"
            },
            "description": "`json`, `ndjson` or `csv`. JSON carries the provenance header, and the others carry it in response headers."
          }
        ],
        "responses": {
          "200": {
            "description": "Rows with the version, licence and attribution. `next` is the URL of the following page, or null."
          },
          "400": {
            "description": "The query names a field the dataset does not have, or a value of the wrong type."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datasets/{slug}/versions": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "The versions loaded for queries, newest first, with the URLs to query each",
        "operationId": "queryVersions",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "tas-deaths-1803-1939"
              ]
            },
            "description": "The dataset's slug, as in its page URL `/d/<slug>/`."
          }
        ],
        "responses": {
          "200": {
            "description": "Loaded versions with row counts and URLs."
          },
          "404": {
            "description": "The dataset or version is not loaded for queries."
          },
          "429": {
            "description": "More than 60 requests in 10 seconds from one address. Blocked for 10 seconds. Wait `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the block lifts."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The limit, as \"fair-use\";q=60;w=10."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer",
                      "const": 429
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "window_seconds": {
                      "type": "integer"
                    },
                    "block_seconds": {
                      "type": "integer"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "files": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
