Get flags by location ID
GET
/v3/locations/{locations_id}/flags
const url = 'https://example.com/v3/locations/1/flags?limit=100&page=1&datetime_from=2022-10-01T11%3A19%3A38-06%3A00&datetime_to=2022-10-01T11%3A19%3A38-06%3A00';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v3/locations/1/flags?limit=100&page=1&datetime_from=2022-10-01T11%3A19%3A38-06%3A00&datetime_to=2022-10-01T11%3A19%3A38-06%3A00' \ --header 'X-API-Key: <X-API-Key>'Provides a list of flags by location ID
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” locations_id
required
Locations Id
Limit the results to a specific locations
integer
Limit the results to a specific locations
Query Parameters
Section titled “Query Parameters ” limit
Limit
Change the number of results returned. e.g. limit=100 will return up to 100 results
integer
Change the number of results returned. e.g. limit=100 will return up to 100 results
page
Page
Paginate through results. e.g. page=1 will return first page of results
integer
Paginate through results. e.g. page=1 will return first page of results
Responses
Section titled “ Responses ”Successful Response
Media type application/json
LocationFlagsResponse
object
meta
results
required
Results
Array<object>
LocationFlagobject
locationId
required
Locationid
integer
flagType
required
FlagType
object
id
required
Id
integer
label
required
Label
string
level
required
Level
string
datetimeFrom
required
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
datetimeTo
required
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
sensorIds
Sensorids
Array<integer>
Example
{ "meta": { "name": "openaq-api", "website": "/", "page": 1, "limit": 100 }, "results": [ { "sensorIds": [] } ]}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}