Get sensors by location ID
GET
/v3/locations/{locations_id}/sensors
const url = 'https://example.com/v3/locations/1/sensors';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/sensors \ --header 'X-API-Key: <X-API-Key>'Provides a list of sensors 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 sensors id
integer
Limit the results to a specific sensors id
Responses
Section titled “ Responses ”Successful Response
Media type application/json
SensorsResponse
object
meta
results
required
Results
Array<object>
Sensorobject
id
required
Id
integer
name
required
Name
string
parameter
required
datetimeFirst
Any of:
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
null
datetimeLast
Any of:
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
null
coverage
Any of:
Coverage
object
expectedCount
required
Expectedcount
integer
expectedInterval
required
Expectedinterval
string
observedCount
required
Observedcount
integer
observedInterval
required
Observedinterval
string
percentComplete
required
Percentcomplete
number
percentCoverage
required
Percentcoverage
number
datetimeFrom
Any of:
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
null
datetimeTo
Any of:
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
null
null
latest
Any of:
LatestBase
null
summary
Any of:
Summary
object
null
Example
{ "meta": { "name": "openaq-api", "website": "/", "page": 1, "limit": 100 }}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" } ]}