FORMAT: 1A HOST: https://api.arrayofthings.org/api
Welcome the Array of Things HTTP API!
The Array of Things (AoT) is an experimental environmental sensing project. More information about the project can be found at https://arrayofthings.org/.
Data, in the sense of sensor measurements and node metrics, are maintained in the API for one week. After a week, the data is expunged from the database. If you need data that is older than seven days, we recommend you use the AoT File Browser to access the full data sets.
Results from the API are returned as pages of data, and can be sized and iterated against using the order
, page
and size
query parameters.
The size
parameter controls the number of results returned in the page. It must be an integer between 1
and 5000
. The default value is 200
.
The page
parameter controls which page of data is being returned. It must be an integer of at least 1
with no enforced maximum -- values that exceed the number of records available for a given entity will return an empty page. The default value is 1
.
The order
parameter controls the ordering of the results in the page. It is a string, and it must follow the format {direction}:{field}
where direction is one of asc
for ascending order or desc
for descending order, and field
is the field name of the entity to order on. Each entity has its own default ordering:
- projects are arranged by
slug
in ascending order - nodes are arranged by
vsn
in ascending order - sensors are arranged by
path
in ascending order - observations and metrics are arranged by
timestamp
in descending order
The following listings describe the entities made available via the API.
The Array of Things is geographically distributed globally. Nodes within the system are arranged by projects. Most commonly these projects are named for major urban centers or universities that administer the nodes. For example, our largest deployment of nodes is in the city of Chicago so we have a project named chicago
to track those nodes; just as we have a set of nodes administered by Vanderbilt University and project named vanderbilt
.
Field | Type | Description |
---|---|---|
name | string | The full name of the project |
slug | string | The slugged name used to build references |
hull | geojson object | The convex hull of the nodes that are part of the project |
archive_url | string | The link to the full CSV archive of the project's data |
Nodes are the physical devices that are deployed to record measurements. They are typically comprised of several sensors that record multiple observation types.
Field | Type | Description |
---|---|---|
vsn | string | The unique identifier of the node -- its name |
location | geojson object | The coordinates of the node |
address | string | The human readable location of the node |
description | string | Additional information about the node |
Sensors are the (usually, although not always) physical devices onboard the nodes that record measurements. In some instances, sensors are purely software based and rely on one or more other physical devices for input to record their observations -- for example the image detection sensors use a single camera input to determine car and pedestrian counts at intersections.
Field | Type | Description |
---|---|---|
path | string | The unique identifier of the sensor -- its name |
uom | string | The unit of measurement the sensor records its observations in |
min | float | The typical minimum value of the observation values recorded |
max | float | The typical maximum value of the observation values recorded |
data_sheet | string | A link to the sensor's data sheet |
Sensors record their measurements, and those are collected as one of two different types: observations are the environmental measurements that are recorded (e.g. temperature), and metrics are the system measurements collected for monitoring and error reporting (e.g. CPU load). They both have the same table structure and are separated only because they are interesting to different groups of users -- someone designing a map of urban heat islands probably doesn't care much about the humidity inside of the node, just as I (an AoT admin) want to be able to create applications to monitor node state and send alerts when things go sideways.
Field | Type | Description |
---|---|---|
node_van | string | The reference to the node from which the measurement was recorded |
sensor_path | string | The reference to the sensor that recorded the measurement |
location | geojson object | The coordinates of the node when the measurement was recorded |
timestamp | UTC date time string | The date and time (in UTC) that the measurement was recorded |
value | float | The value of the recorded measurement |
uom | string | The unit of measurement of the recorded measurement |
Each entity type has its own endpoint in the API.
NOTE: The API has a rate limit of 1,000 requests per minute per IP address.
Get a single project.
- Parameters
- slug (string) - The slug value of the project you want detailed information from.
-
Parameters
- slug (string) - The slug value of the project you want detailed information from.
- Default chicago
- slug (string) - The slug value of the project you want detailed information from.
-
Response 200 (application/json)
{"data":{"slug":"chicago","name":"Chicago","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Chicago.complete.latest.tar"}}
Page through projects.
- Parameters
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
{direction}:{field}
where direction is one ofasc
for ascending order ordesc
for descending order, andfield
is the field name of the entity to order on. The default isasc:name
. - size (number, optional) - Controls the number of results returned in the page. It must be an integer between
1
and5000
. The default value is200
. - page (number, optional) - Controls which page of data is being returned. It must be an integer of at least
1
with no enforced maximum -- values that exceed the number of records available for a given entity will return an empty page. The default value is1
. - format (string, optional) - Controls the type of the data returned. It must be one of
json
orgeojson
. The default value isjson
.
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
-
Response 200 (application/json)
{"meta":{"links":{"previous":null,"next":"https://api-of-things.plenar.io/api/projects?order=asc%3Aname&page=2&size=200","current":"https://api-of-things.plenar.io/api/projects?order=asc%3Aname&page=1&size=200"}},"data":[{"slug":"bristol","name":"Bristol","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Bristol.complete.latest.tar"},{"slug":"chicago","name":"Chicago","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Chicago.complete.latest.tar"},{"slug":"denver","name":"Denver","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Denver.complete.latest.tar"},{"slug":"detroit","name":"Detroit","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Detroit.complete.latest.tar"},{"slug":"ga-tech","name":"GA Tech","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_GA_Tech.complete.latest.tar"},{"slug":"gasp","name":"GASP","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/GASP.complete.latest.tar"},{"slug":"linknyc","name":"LinkNYC","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/LinkNYC.complete.latest.tar"},{"slug":"niu","name":"NIU","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_NIU.complete.latest.tar"},{"slug":"nucwr-mugs","name":"NUCWR-MUGS","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/NUCWR-MUGS.complete.latest.tar"},{"slug":"portland","name":"Portland","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Portland.complete.latest.tar"},{"slug":"rune-test","name":"Rune Test","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/Rune_Test.complete.latest.tar"},{"slug":"seattle","name":"Seattle","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Seattle.complete.latest.tar"},{"slug":"stanford","name":"Stanford","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Stanford.complete.latest.tar"},{"slug":"syracuse","name":"Syracuse","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Syracuse.complete.latest.tar"},{"slug":"unc","name":"UNC","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_UNC.complete.latest.tar"},{"slug":"uw","name":"UW","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_UW.complete.latest.tar"},{"slug":"vanderbilt","name":"Vanderbilt","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/AoT_Vanderbilt.complete.latest.tar"},{"slug":"waggle-dronebears","name":"Waggle Dronebears","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/Waggle_Dronebears.complete.latest.tar"},{"slug":"waggle-others","name":"Waggle Others","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/Waggle_Others.complete.latest.tar"},{"slug":"waggle-tokyo","name":"Waggle Tokyo","hull":null,"archive_url":"https://www.mcs.anl.gov/research/projects/waggle/downloads/datasets/Waggle_Tokyo.complete.latest.tar"}]}
-
Parameters
- size (number, optional) - Controls the number of results returned in the page. It must be an integer between
1
and5000
. The default value is200
.- Default: 2
- page (number, optional) - Controls which page of data is being returned. It must be an integer of at least
1
with no enforced maximum -- values that exceed the number of records available for a given entity will return an empty page. The default value is1
.- Default: 2
- size (number, optional) - Controls the number of results returned in the page. It must be an integer between
-
Response 200 (application/json)
Get a single node.
- Parameters
- vsn (string) - The vsn value of the node you want detailed information from.
-
Parameters
- vsn (string) - The vsn value of the node you want detailed information from.
- Default: 004
- vsn (string) - The vsn value of the node you want detailed information from.
-
Response 200 (application/json)
{"data":{"vsn":"004","location":{"type":"Feature","geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.627678,41.878377]}},"description":"AoT Chicago (S) [C]","address":"State St & Jackson Blvd Chicago IL"}}
Page through nodes.
There is a special parameter for this endpoint: location
. The parameter takes a special format to filter results.
?location=within:{GeoJSON object}
filters results to those whose location value is within the given GeoJSON object. This is to say that a node resides within a given bounding box.
?location=diwithin:{distance in meters}:{GeoJSON object}
filters results to those whose location is within the given distance from the given GeoJSON object. This is to say that a node is location within X meters from a given point.
The format of the GeoJSON object is a fully URL encoded object. In its full format (without encoding), you would specify values such as:
?location=within:{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[
[1, 1],
[1, 2],
[2, 2],
[2, 1],
[1, 1]
]],
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
}
}
}
or
?location=dwithin:2000:{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [1,2],
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
}
}
}
- Parameters
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
{direction}:{field}
where direction is one ofasc
for ascending order ordesc
for descending order, andfield
is the field name of the entity to order on. The default isasc:vsn
. - size (number, optional) - Controls the number of results returned in the page. It must be an integer between
1
and5000
. The default value is200
. - page (number, optional) - Controls which page of data is being returned. It must be an integer of at least
1
with no enforced maximum -- values that exceed the number of records available for a given entity will return an empty page. The default value is1
. - format (string, optional) - Controls the type of the data returned. It must be one of
json
orgeojson
. The default value isjson
. - location (object,optional) - See notes above. The default is
null
. - project (string, optional) - Filters the results to those who are related to the project slug. Default is
null
.
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
-
Parameters
- size (number, optional) - Controls the number of results returned in the page. It must be an integer between
1
and5000
. The default value is200
.- Default: 5
- size (number, optional) - Controls the number of results returned in the page. It must be an integer between
-
Response 200 (application/json)
{"meta":{"links":{"previous":null,"next":"https://api-of-things.plenar.io/api/nodes?order=asc%3Avsn&page=2&size=5","current":"https://api-of-things.plenar.io/api/nodes?order=asc%3Avsn&page=1&size=5"}},"data":[{"vsn":"003","location":{"type":"Feature","geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[0.0,0.0]}},"description":"AoT Chicago (T) - Replace","address":"TCS 4302 - Returned from CDOT 04 Dec 2017"},{"vsn":"004","location":{"type":"Feature","geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.627678,41.878377]}},"description":"AoT Chicago (S) [C]","address":"State St & Jackson Blvd Chicago IL"},{"vsn":"005","location":{"type":"Feature","geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[0.0,0.0]}},"description":"AoT UNC (S) [C]","address":"TBD"},{"vsn":"006","location":{"type":"Feature","geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.616055,41.858136]}},"description":"AoT Chicago (S)","address":"18th St & Lake Shore Dr Chicago IL"},{"vsn":"007","location":{"type":"Feature","geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[0.0,0.0]}},"description":"AoT Node (S)","address":"TCS 4302 P2,S7"}]}
-
Parameters
- size (number, optional) - Controls the number of results returned in the page. It must be an integer between
1
and5000
. The default value is200
.- Default: 5
- format (string, optional) - Controls the type of the data returned. It must be one of
json
orgeojson
. The default value isjson
.- Default: geojson
- project (string, optional) - Filters the results to those who are related to the project slug. Default is
null
.- Default: chicago
- size (number, optional) - Controls the number of results returned in the page. It must be an integer between
-
Response 200 (application/json)
{"meta":{"links":{"previous":null,"next":"https://api-of-things.plenar.io/api/nodes?format=geojson&order=asc%3Avsn&page=2&project=chicago&size=5","current":"https://api-of-things.plenar.io/api/nodes?format=geojson&order=asc%3Avsn&page=1&project=chicago&size=5"}},"data":[{"type":"Feature","properties":{"vsn":"004","description":"AoT Chicago (S) [C]","address":"State St & Jackson Blvd Chicago IL"},"geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.627678,41.878377]}},{"type":"Feature","properties":{"vsn":"006","description":"AoT Chicago (S)","address":"18th St & Lake Shore Dr Chicago IL"},"geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.616055,41.858136]}},{"type":"Feature","properties":{"vsn":"00A","description":"AoT Chicago (S) [CA]","address":"Lake Shore Drive & Fullerton Ave Chicago IL"},"geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.6307578,41.9262614]}},{"type":"Feature","properties":{"vsn":"00D","description":"AoT Chicago (S)","address":"Cornell & 47th St Chicago IL"},"geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.590228,41.810342]}},{"type":"Feature","properties":{"vsn":"010","description":"AoT Chicago (S) [C]","address":"Homan Ave & Roosevelt Rd Chicago IL"},"geometry":{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[-87.710543,41.866349]}}]}
Get a single sensor.
- Parameters
- path (string) - The path value of the sensor you want detailed information from.
-
Parameters
- path (string) - The path value of the sensor you want detailed information from.
- Default metsense.htu21d.temperature
- path (string) - The path value of the sensor you want detailed information from.
-
Response 200 (application/json)
{"data":{"uom":"C","path":"metsense.htu21d.temperature","min":-40.0,"max":125.0,"data_sheet":"https://github.com/waggle-sensor/sensors/raw/master/sensors/datasheets/htu21d.pdf"}}
Page through sensors.
- Parameters
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
{direction}:{field}
where direction is one ofasc
for ascending order ordesc
for descending order, andfield
is the field name of the entity to order on. The default isasc:path
. - size (number, optional) - Controls the number of results returned in the page. It must be an integer between
1
and5000
. The default value is200
. - page (number, optional) - Controls which page of data is being returned. It must be an integer of at least
1
with no enforced maximum -- values that exceed the number of records available for a given entity will return an empty page. The default value is1
.
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
Observations [/observations{?order,size,page,format,location,project,node,sensor,timestamp,value,histogram,time_bucket}]
Page through observations.
- Parameters
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
{direction}:{field}
where direction is one ofasc
for ascending order ordesc
for descending order, andfield
is the field name of the entity to order on. The default isasc:vsn
. - size (number, optional) - Controls the number of results returned in the page. It must be an integer between
1
and5000
. The default value is200
. - page (number, optional) - Controls which page of data is being returned. It must be an integer of at least
1
with no enforced maximum -- values that exceed the number of records available for a given entity will return an empty page. The default value is1
. - format (string, optional) - Controls the type of the data returned. It must be one of
json
orgeojson
. The default value isjson
. - location (object,optional) - See notes about the use of location in the nodes section above. The default is
null
. - project (string, optional) - Filters the results to those who are related to the project slug. Default is
null
. - node (string, optional) - Filters the results to those who are related to the node vsn. This can be an array value to limit to multiple nodes using the format
node[]=004&node[]=005
. Default isnull
. - sensor (string, optional) - Filters the results to those who are related to the sensor path. This can be an array value to limit to multiple sensors using the format
sensor[]=foo&sensor[]=bar
. Default isnull
. - timestamp (string, optional) - Filters the results to those whose values satisfy the given query. The format of the value must be
{function}:{comparator}
where function is one ofeq
,lt
,le
,gt
orge
and the comparator is the value you are comparing against. Default isnull
. - value (string, optional) - Filters the results to those whose values satisfy the given query. The format of the value must be
{function}:{comparator}
where function is one ofeq
,lt
,le
,gt
orge
and the comparator is the value you are comparing against. Default isnull
. - histogram (string, optional) - Returns a histogram of values. The format of the value must be
{min}::{max}::{number of buckets}
. This should be used in conjunction with at least asensor
param and usually in combination withproject
. Default isnull
. - time_bucket (string, optional) - Returns a histogram of values. The format of the value must be
{function}:{interval}
where function is one ofmin
,max
,avg
ormedian
and interval is PostgreSQL interval value (e.g.6 hours
). This should be used in conjunction with at least asensor
param and usually in combination withnode
orproject
. Default isnull
.
- order (string, optional) - Controls the ordering of the results in the page. It must follow the format
-
Parameters
- sensor (string, optional) - Filters the results to those who are related to the sensor path. This can be an array value to limit to multiple sensors using the format
sensor[]=foo&sensor[]=bar
. Default isnull
.- Default: metsense.htu21d.temperature
- histogram (string, optional) - Returns a histogram of values. The format of the value must be
{min}::{max}::{number of buckets}
. This should be used in conjunction with at least asensor
param and usually in combination withnode
orproject
. Default isnull
.- Default: "0:100:10"
- sensor (string, optional) - Filters the results to those who are related to the sensor path. This can be an array value to limit to multiple sensors using the format
-
Response 200 (application/json)
-
Parameters
- node (string, optional) - Filters the results to those who are related to the node vsn. This can be an array value to limit to multiple nodes using the format
node[]=004&node[]=005
. Default isnull
.- Default: 004
- sensor (string, optional) - Filters the results to those who are related to the sensor path. This can be an array value to limit to multiple sensors using the format
sensor[]=foo&sensor[]=bar
. Default isnull
.- Default: metsense.htu21d.temperature
- time_bucket (string, optional) - Returns a histogram of values. The format of the value must be
{function}:{interval}
where function is one ofmin
,max
,avg
ormedian
and interval is PostgreSQL interval value (e.g.6 hours
). This should be used in conjunction with at least asensor
param and usually in combination withnode
orproject
. Default isnull
.- Default: "median:6 hours"
- node (string, optional) - Filters the results to those who are related to the node vsn. This can be an array value to limit to multiple nodes using the format
-
Response 200 (application/json)