Agnitio data queries are performed by assembling a JSON description of the query and POSTing it to the specific dataset you wish to query.
The query structure has two required fields: metrics
and constraints
.
The metrics
field is an array of objects which describe which metrics you would like queried and returned.
These objects have a required name
field which specifies which metric is desired. They also have an optional as
field
which allows you to determine what the metric is called in the response.
The constraints
field is an array of objects which describe how the dimensions of the dataset should be limited and aggregated.
The map
field in the request constraints maps from the codes defined by the dimension's taxonomy to user defined values that will be returned in the response.
In addition to the map
field, you can use a shorthand option as well known as mapLevel
to roll out a given parent to all of its children as individual mappings at a specified level.
The API also supports operations like Location Quotient and Shift Share, as well as sorting, offsets, and limits for pagination.