{
  "openapi": "3.1.0",
  "info": {
    "title": "Regional urban bus patronage by operator, Queensland query API",
    "version": "2023-11-20",
    "summary": "Filter, page and aggregate Regional urban bus patronage by operator, Queensland from Department of Transport and Main Roads.",
    "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. Department of Transport and Main Roads has not endorsed this site. The whole site is described in https://publicdata.au/openapi.json.",
    "license": {
      "name": "CC BY 3.0 AU",
      "url": "https://creativecommons.org/licenses/by/3.0/au/"
    }
  },
  "servers": [
    {
      "url": "https://publicdata.au"
    }
  ],
  "externalDocs": {
    "url": "https://publicdata.au/d/qld-regional-bus-patronage/#query"
  },
  "tags": [
    {
      "name": "query"
    }
  ],
  "paths": {
    "/api/v1/datasets/qld-regional-bus-patronage/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query Regional urban bus patronage by operator, Queensland",
        "operationId": "queryRows_qld_regional_bus_patronage",
        "description": "Rows of Regional urban bus patronage by operator, Queensland 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": "region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Airline Beach & Proserpine, Bowen, Bundaberg, Cairns, Gladstone, Gympie, Innisfail, Kilcoy & Caboolture, Mackay, Maryborough & Hervey Bay, North Stradbroke Island, Rockhampton, Sunshine Coast Hinterland, Toowoomba, Townsville & Magnetic Island, Warwick, Yeppoon.",
            "examples": [
              "eq.Yeppoon"
            ]
          },
          {
            "name": "operator",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Bowen Transit, Bus Queensland, CDC Queensland, Christensen Bus & Coach, Duffy's, Glasshouse County Coaches, Haidleys Panoramic Coaches, Kinetic, Mackay Transit, Polleys, Stewart & Sons, Stradbroke Island Buses, TransNorth, Whitsunday Transit, Wide Bay Transit, Youngs Bus Service.",
            "examples": [
              "eq.Youngs Bus Service"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: -28.2163204, -27.5647329, -27.5610193, -26.9426721, -26.7585572, -26.1900447, -25.2985784, -24.8653253, -23.8431724, -23.3782137, -23.1348035, -21.141956, -20.2694109, -20.012125, -19.2569391, -17.5241721, -16.9206657.",
            "examples": [
              "eq.-16.9206657"
            ]
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: 145.7721854, 146.0311418, 146.8239537, 148.2462901, 148.718164, 149.1865149, 150.5134227, 150.7436625, 151.256132, 151.953351, 152.0327039, 152.3516785, 152.5653789, 152.6600256, 152.8531169, 152.8535216, 153.4487382.",
            "examples": [
              "eq.153.4487382"
            ]
          },
          {
            "name": "trips_2012_13",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 4265, 11393, 24107, 42379, 52890, 60547, 123708, 142900, 303458, 322151, 394682, 478453, 529758, 579116, 751904, 903938, 2475910, 3472136.",
            "examples": [
              "eq.3472136"
            ]
          },
          {
            "name": "trips_2013_14",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7903, 14209, 22114, 48200, 48533, 55028, 162394, 278790, 325301, 410089, 427798, 526547, 582226, 698080, 835206, 901602, 2774874, 3498599.",
            "examples": [
              "eq.3498599"
            ]
          },
          {
            "name": "trips_2014_15",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 9091, 12703, 31169, 48615, 52451, 71235, 157116, 238302, 319850, 400211, 415707, 528501, 588590, 645261, 823425, 849438, 2895403, 3419197.",
            "examples": [
              "eq.3419197"
            ]
          },
          {
            "name": "trips_2015_16",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8907, 12188, 37789, 49456, 57056, 66693, 175346, 227437, 338881, 393561, 464015, 524430, 573655, 650380, 773477, 819727, 2967366, 3406852.",
            "examples": [
              "eq.3406852"
            ]
          },
          {
            "name": "trips_2016_17",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8910, 14399, 39241, 63485, 64782, 65095, 191046, 209380, 329400, 371216, 430095, 546941, 547074, 648321, 717409, 787685, 2823839, 3292316.",
            "examples": [
              "eq.3292316"
            ]
          },
          {
            "name": "trips_2017_18",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8208, 14788, 33367, 54825, 62645, 66461, 216115, 222158, 327310, 393992, 411969, 529307, 562419, 646301, 716544, 771619, 2912705, 3081618.",
            "examples": [
              "eq.3081618"
            ]
          },
          {
            "name": "trips_2018_19",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7502, 11166, 38805, 47954, 49745, 57084, 211196, 215076, 308698, 404432, 409819, 526286, 531811, 642887, 703954, 709042, 2866136, 3058957.",
            "examples": [
              "eq.3058957"
            ]
          },
          {
            "name": "trips_2019_20",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7003, 9559, 33318, 40618, 57175, 81070, 178949, 200590, 283682, 330152, 339863, 445364, 456805, 552951, 581346, 650045, 2471487, 2753101.",
            "examples": [
              "eq.2753101"
            ]
          },
          {
            "name": "trips_2020_21",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7225, 9516, 37040, 43111, 55736, 142098, 148853, 191333, 225803, 328948, 351071, 419749, 465994, 519122, 527701, 799990, 2209460, 2280348.",
            "examples": [
              "eq.2280348"
            ]
          },
          {
            "name": "trips_2021_22",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 6724, 8641, 31199, 37311, 38315, 114685, 165797, 168529, 202966, 303409, 303487, 404803, 413189, 471315, 482005, 782256, 2108579, 2136546.",
            "examples": [
              "eq.2136546"
            ]
          },
          {
            "name": "trips_2022_23",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7050, 8039, 34794, 45247, 46935, 115921, 220461, 223452, 260617, 286478, 322820, 333882, 400503, 475694, 517382, 841800, 2315472, 2720667.",
            "examples": [
              "eq.2720667"
            ]
          },
          {
            "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/qld-regional-bus-patronage/versions/{version}/rows": {
      "get": {
        "tags": [
          "query"
        ],
        "summary": "Query Regional urban bus patronage by operator, Queensland",
        "operationId": "queryRows_qld_regional_bus_patronage_version",
        "description": "Rows of Regional urban bus patronage by operator, Queensland 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": "region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Airline Beach & Proserpine, Bowen, Bundaberg, Cairns, Gladstone, Gympie, Innisfail, Kilcoy & Caboolture, Mackay, Maryborough & Hervey Bay, North Stradbroke Island, Rockhampton, Sunshine Coast Hinterland, Toowoomba, Townsville & Magnetic Island, Warwick, Yeppoon.",
            "examples": [
              "eq.Yeppoon"
            ]
          },
          {
            "name": "operator",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Bowen Transit, Bus Queensland, CDC Queensland, Christensen Bus & Coach, Duffy's, Glasshouse County Coaches, Haidleys Panoramic Coaches, Kinetic, Mackay Transit, Polleys, Stewart & Sons, Stradbroke Island Buses, TransNorth, Whitsunday Transit, Wide Bay Transit, Youngs Bus Service.",
            "examples": [
              "eq.Youngs Bus Service"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: -28.2163204, -27.5647329, -27.5610193, -26.9426721, -26.7585572, -26.1900447, -25.2985784, -24.8653253, -23.8431724, -23.3782137, -23.1348035, -21.141956, -20.2694109, -20.012125, -19.2569391, -17.5241721, -16.9206657.",
            "examples": [
              "eq.-16.9206657"
            ]
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: 145.7721854, 146.0311418, 146.8239537, 148.2462901, 148.718164, 149.1865149, 150.5134227, 150.7436625, 151.256132, 151.953351, 152.0327039, 152.3516785, 152.5653789, 152.6600256, 152.8531169, 152.8535216, 153.4487382.",
            "examples": [
              "eq.153.4487382"
            ]
          },
          {
            "name": "trips_2012_13",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 4265, 11393, 24107, 42379, 52890, 60547, 123708, 142900, 303458, 322151, 394682, 478453, 529758, 579116, 751904, 903938, 2475910, 3472136.",
            "examples": [
              "eq.3472136"
            ]
          },
          {
            "name": "trips_2013_14",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7903, 14209, 22114, 48200, 48533, 55028, 162394, 278790, 325301, 410089, 427798, 526547, 582226, 698080, 835206, 901602, 2774874, 3498599.",
            "examples": [
              "eq.3498599"
            ]
          },
          {
            "name": "trips_2014_15",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 9091, 12703, 31169, 48615, 52451, 71235, 157116, 238302, 319850, 400211, 415707, 528501, 588590, 645261, 823425, 849438, 2895403, 3419197.",
            "examples": [
              "eq.3419197"
            ]
          },
          {
            "name": "trips_2015_16",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8907, 12188, 37789, 49456, 57056, 66693, 175346, 227437, 338881, 393561, 464015, 524430, 573655, 650380, 773477, 819727, 2967366, 3406852.",
            "examples": [
              "eq.3406852"
            ]
          },
          {
            "name": "trips_2016_17",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8910, 14399, 39241, 63485, 64782, 65095, 191046, 209380, 329400, 371216, 430095, 546941, 547074, 648321, 717409, 787685, 2823839, 3292316.",
            "examples": [
              "eq.3292316"
            ]
          },
          {
            "name": "trips_2017_18",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8208, 14788, 33367, 54825, 62645, 66461, 216115, 222158, 327310, 393992, 411969, 529307, 562419, 646301, 716544, 771619, 2912705, 3081618.",
            "examples": [
              "eq.3081618"
            ]
          },
          {
            "name": "trips_2018_19",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7502, 11166, 38805, 47954, 49745, 57084, 211196, 215076, 308698, 404432, 409819, 526286, 531811, 642887, 703954, 709042, 2866136, 3058957.",
            "examples": [
              "eq.3058957"
            ]
          },
          {
            "name": "trips_2019_20",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7003, 9559, 33318, 40618, 57175, 81070, 178949, 200590, 283682, 330152, 339863, 445364, 456805, 552951, 581346, 650045, 2471487, 2753101.",
            "examples": [
              "eq.2753101"
            ]
          },
          {
            "name": "trips_2020_21",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7225, 9516, 37040, 43111, 55736, 142098, 148853, 191333, 225803, 328948, 351071, 419749, 465994, 519122, 527701, 799990, 2209460, 2280348.",
            "examples": [
              "eq.2280348"
            ]
          },
          {
            "name": "trips_2021_22",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 6724, 8641, 31199, 37311, 38315, 114685, 165797, 168529, 202966, 303409, 303487, 404803, 413189, 471315, 482005, 782256, 2108579, 2136546.",
            "examples": [
              "eq.2136546"
            ]
          },
          {
            "name": "trips_2022_23",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7050, 8039, 34794, 45247, 46935, 115921, 220461, 223452, 260617, 286478, 322820, 333882, 400503, 475694, 517382, 841800, 2315472, 2720667.",
            "examples": [
              "eq.2720667"
            ]
          },
          {
            "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": [
                "qld-regional-bus-patronage"
              ]
            },
            "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": "region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Airline Beach & Proserpine, Bowen, Bundaberg, Cairns, Gladstone, Gympie, Innisfail, Kilcoy & Caboolture, Mackay, Maryborough & Hervey Bay, North Stradbroke Island, Rockhampton, Sunshine Coast Hinterland, Toowoomba, Townsville & Magnetic Island, Warwick, Yeppoon.",
            "examples": [
              "eq.Yeppoon"
            ]
          },
          {
            "name": "operator",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Bowen Transit, Bus Queensland, CDC Queensland, Christensen Bus & Coach, Duffy's, Glasshouse County Coaches, Haidleys Panoramic Coaches, Kinetic, Mackay Transit, Polleys, Stewart & Sons, Stradbroke Island Buses, TransNorth, Whitsunday Transit, Wide Bay Transit, Youngs Bus Service.",
            "examples": [
              "eq.Youngs Bus Service"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: -28.2163204, -27.5647329, -27.5610193, -26.9426721, -26.7585572, -26.1900447, -25.2985784, -24.8653253, -23.8431724, -23.3782137, -23.1348035, -21.141956, -20.2694109, -20.012125, -19.2569391, -17.5241721, -16.9206657.",
            "examples": [
              "eq.-16.9206657"
            ]
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: 145.7721854, 146.0311418, 146.8239537, 148.2462901, 148.718164, 149.1865149, 150.5134227, 150.7436625, 151.256132, 151.953351, 152.0327039, 152.3516785, 152.5653789, 152.6600256, 152.8531169, 152.8535216, 153.4487382.",
            "examples": [
              "eq.153.4487382"
            ]
          },
          {
            "name": "trips_2012_13",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 4265, 11393, 24107, 42379, 52890, 60547, 123708, 142900, 303458, 322151, 394682, 478453, 529758, 579116, 751904, 903938, 2475910, 3472136.",
            "examples": [
              "eq.3472136"
            ]
          },
          {
            "name": "trips_2013_14",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7903, 14209, 22114, 48200, 48533, 55028, 162394, 278790, 325301, 410089, 427798, 526547, 582226, 698080, 835206, 901602, 2774874, 3498599.",
            "examples": [
              "eq.3498599"
            ]
          },
          {
            "name": "trips_2014_15",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 9091, 12703, 31169, 48615, 52451, 71235, 157116, 238302, 319850, 400211, 415707, 528501, 588590, 645261, 823425, 849438, 2895403, 3419197.",
            "examples": [
              "eq.3419197"
            ]
          },
          {
            "name": "trips_2015_16",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8907, 12188, 37789, 49456, 57056, 66693, 175346, 227437, 338881, 393561, 464015, 524430, 573655, 650380, 773477, 819727, 2967366, 3406852.",
            "examples": [
              "eq.3406852"
            ]
          },
          {
            "name": "trips_2016_17",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8910, 14399, 39241, 63485, 64782, 65095, 191046, 209380, 329400, 371216, 430095, 546941, 547074, 648321, 717409, 787685, 2823839, 3292316.",
            "examples": [
              "eq.3292316"
            ]
          },
          {
            "name": "trips_2017_18",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8208, 14788, 33367, 54825, 62645, 66461, 216115, 222158, 327310, 393992, 411969, 529307, 562419, 646301, 716544, 771619, 2912705, 3081618.",
            "examples": [
              "eq.3081618"
            ]
          },
          {
            "name": "trips_2018_19",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7502, 11166, 38805, 47954, 49745, 57084, 211196, 215076, 308698, 404432, 409819, 526286, 531811, 642887, 703954, 709042, 2866136, 3058957.",
            "examples": [
              "eq.3058957"
            ]
          },
          {
            "name": "trips_2019_20",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7003, 9559, 33318, 40618, 57175, 81070, 178949, 200590, 283682, 330152, 339863, 445364, 456805, 552951, 581346, 650045, 2471487, 2753101.",
            "examples": [
              "eq.2753101"
            ]
          },
          {
            "name": "trips_2020_21",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7225, 9516, 37040, 43111, 55736, 142098, 148853, 191333, 225803, 328948, 351071, 419749, 465994, 519122, 527701, 799990, 2209460, 2280348.",
            "examples": [
              "eq.2280348"
            ]
          },
          {
            "name": "trips_2021_22",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 6724, 8641, 31199, 37311, 38315, 114685, 165797, 168529, 202966, 303409, 303487, 404803, 413189, 471315, 482005, 782256, 2108579, 2136546.",
            "examples": [
              "eq.2136546"
            ]
          },
          {
            "name": "trips_2022_23",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7050, 8039, 34794, 45247, 46935, 115921, 220461, 223452, 260617, 286478, 322820, 333882, 400503, 475694, 517382, 841800, 2315472, 2720667.",
            "examples": [
              "eq.2720667"
            ]
          },
          {
            "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": [
                "qld-regional-bus-patronage"
              ]
            },
            "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": "region",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Airline Beach & Proserpine, Bowen, Bundaberg, Cairns, Gladstone, Gympie, Innisfail, Kilcoy & Caboolture, Mackay, Maryborough & Hervey Bay, North Stradbroke Island, Rockhampton, Sunshine Coast Hinterland, Toowoomba, Townsville & Magnetic Island, Warwick, Yeppoon.",
            "examples": [
              "eq.Yeppoon"
            ]
          },
          {
            "name": "operator",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "string. Values: Bowen Transit, Bus Queensland, CDC Queensland, Christensen Bus & Coach, Duffy's, Glasshouse County Coaches, Haidleys Panoramic Coaches, Kinetic, Mackay Transit, Polleys, Stewart & Sons, Stradbroke Island Buses, TransNorth, Whitsunday Transit, Wide Bay Transit, Youngs Bus Service.",
            "examples": [
              "eq.Youngs Bus Service"
            ]
          },
          {
            "name": "latitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: -28.2163204, -27.5647329, -27.5610193, -26.9426721, -26.7585572, -26.1900447, -25.2985784, -24.8653253, -23.8431724, -23.3782137, -23.1348035, -21.141956, -20.2694109, -20.012125, -19.2569391, -17.5241721, -16.9206657.",
            "examples": [
              "eq.-16.9206657"
            ]
          },
          {
            "name": "longitude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "number. Values: 145.7721854, 146.0311418, 146.8239537, 148.2462901, 148.718164, 149.1865149, 150.5134227, 150.7436625, 151.256132, 151.953351, 152.0327039, 152.3516785, 152.5653789, 152.6600256, 152.8531169, 152.8535216, 153.4487382.",
            "examples": [
              "eq.153.4487382"
            ]
          },
          {
            "name": "trips_2012_13",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 4265, 11393, 24107, 42379, 52890, 60547, 123708, 142900, 303458, 322151, 394682, 478453, 529758, 579116, 751904, 903938, 2475910, 3472136.",
            "examples": [
              "eq.3472136"
            ]
          },
          {
            "name": "trips_2013_14",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7903, 14209, 22114, 48200, 48533, 55028, 162394, 278790, 325301, 410089, 427798, 526547, 582226, 698080, 835206, 901602, 2774874, 3498599.",
            "examples": [
              "eq.3498599"
            ]
          },
          {
            "name": "trips_2014_15",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 9091, 12703, 31169, 48615, 52451, 71235, 157116, 238302, 319850, 400211, 415707, 528501, 588590, 645261, 823425, 849438, 2895403, 3419197.",
            "examples": [
              "eq.3419197"
            ]
          },
          {
            "name": "trips_2015_16",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8907, 12188, 37789, 49456, 57056, 66693, 175346, 227437, 338881, 393561, 464015, 524430, 573655, 650380, 773477, 819727, 2967366, 3406852.",
            "examples": [
              "eq.3406852"
            ]
          },
          {
            "name": "trips_2016_17",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8910, 14399, 39241, 63485, 64782, 65095, 191046, 209380, 329400, 371216, 430095, 546941, 547074, 648321, 717409, 787685, 2823839, 3292316.",
            "examples": [
              "eq.3292316"
            ]
          },
          {
            "name": "trips_2017_18",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 8208, 14788, 33367, 54825, 62645, 66461, 216115, 222158, 327310, 393992, 411969, 529307, 562419, 646301, 716544, 771619, 2912705, 3081618.",
            "examples": [
              "eq.3081618"
            ]
          },
          {
            "name": "trips_2018_19",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7502, 11166, 38805, 47954, 49745, 57084, 211196, 215076, 308698, 404432, 409819, 526286, 531811, 642887, 703954, 709042, 2866136, 3058957.",
            "examples": [
              "eq.3058957"
            ]
          },
          {
            "name": "trips_2019_20",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7003, 9559, 33318, 40618, 57175, 81070, 178949, 200590, 283682, 330152, 339863, 445364, 456805, 552951, 581346, 650045, 2471487, 2753101.",
            "examples": [
              "eq.2753101"
            ]
          },
          {
            "name": "trips_2020_21",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7225, 9516, 37040, 43111, 55736, 142098, 148853, 191333, 225803, 328948, 351071, 419749, 465994, 519122, 527701, 799990, 2209460, 2280348.",
            "examples": [
              "eq.2280348"
            ]
          },
          {
            "name": "trips_2021_22",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 6724, 8641, 31199, 37311, 38315, 114685, 165797, 168529, 202966, 303409, 303487, 404803, 413189, 471315, 482005, 782256, 2108579, 2136546.",
            "examples": [
              "eq.2136546"
            ]
          },
          {
            "name": "trips_2022_23",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "integer. Values: 7050, 8039, 34794, 45247, 46935, 115921, 220461, 223452, 260617, 286478, 322820, 333882, 400503, 475694, 517382, 841800, 2315472, 2720667.",
            "examples": [
              "eq.2720667"
            ]
          },
          {
            "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": [
                "qld-regional-bus-patronage"
              ]
            },
            "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"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
