DataSetQueryCriteriaLocations
The location option criteria to filter results by in a data set query.
The results can be matched by either the location option’s ID or a code. Note the following differences:
- IDs only match a single location
- Codes may match multiple locations
Whilst codes are generally unique to a single location, they can be used for multiple locations. This may match more results than you expect so it’s recommended to use IDs where possible.
Properties
Property | Type | Required | Description |
---|---|---|---|
eq |
one of: | false |
Filter the results to be in this location. |
notEq |
one of: | false |
Filter the results to not be in this location. |
in |
array (one of: ) | false |
Filter the results to be in one of these locations. |
notIn |
array (one of: ) | false |
Filter the results to not be in one of these locations. |
Example schema
{
"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"
}
]
}