Skip to main content

DataSetQueryCriteriaFacets

A set of criteria specifying which facets the query should match results with.

All parts of the criteria must resolve to true to match a result.

Properties

Property Type Required Description
filters DataSetQueryCriteriaFilters false

Query criteria relating to filter options.

geographicLevels DataSetQueryCriteriaGeographicLevels false

Query criteria relating to geographic levels.

locations DataSetQueryCriteriaLocations false

Query criteria relating to location options.

timePeriods DataSetQueryCriteriaTimePeriods false

Query criteria relating to time periods.

Example schema

{
  "filters": {
    "eq": "pVAkV",
    "notEq": "wUzft",
    "in": [
      "q1g3J",
      "ufp2K"
    ],
    "notIn": [
      "ksrK9",
      "s1J8a"
    ]
  },
  "geographicLevels": {
    "eq": "NAT",
    "notEq": "PROV",
    "in": [
      "REG",
      "LA"
    ],
    "notIn": [
      "LAD",
      "SCH"
    ]
  },
  "locations": {
    "eq": {
      "id": "2tYX",
      "level": "NAT"
    },
    "notEq": {
      "id": "2tYX",
      "level": "NAT"
    },
    "in": [
      {
        "id": "2tYX",
        "level": "NAT"
      },
      {
        "code": "E12000003",
        "level": "NAT"
      },
      {
        "code": "E08000019",
        "level": "LA"
      },
      {
        "oldCode": "373",
        "level": "LA"
      },
      {
        "ukprn": "123454678",
        "level": "PROV"
      },
      {
        "laEstab": "1234567",
        "level": "SCH"
      },
      {
        "urn": "123456",
        "level": "SCH"
      }
    ],
    "notIn": [
      {
        "id": "2tYX",
        "level": "NAT"
      },
      {
        "code": "E12000003",
        "level": "NAT"
      },
      {
        "code": "E08000019",
        "level": "LA"
      },
      {
        "oldCode": "373",
        "level": "LA"
      },
      {
        "ukprn": "123454678",
        "level": "PROV"
      },
      {
        "laEstab": "1234567",
        "level": "SCH"
      },
      {
        "urn": "123456",
        "level": "SCH"
      }
    ]
  },
  "timePeriods": {
    "eq": {
      "period": "2020/2021",
      "code": "AY"
    },
    "notEq": {
      "period": "2020/2021",
      "code": "AY"
    },
    "in": [
      {
        "period": "2020/2021",
        "code": "AY"
      }
    ],
    "notIn": [
      {
        "period": "2020/2021",
        "code": "AY"
      }
    ],
    "gt": {
      "period": "2020/2021",
      "code": "AY"
    },
    "gte": {
      "period": "2020/2021",
      "code": "AY"
    },
    "lt": {
      "period": "2020/2021",
      "code": "AY"
    },
    "lte": {
      "period": "2020/2021",
      "code": "AY"
    }
  }
}