Usage
Singular Responses
Singular responses are a single item, like Crime #123 or User #567.
Collection Responses
Collection responses are a set of multiple items. These responses have two guaranteed attributes: meta
and results
.
The meta
attribute is an object that contains metadata about the results data. This can include pagination information, api limits, query information, data types, display hints, and other useful information about the data. This object will always contain results
and total
counts to help with pagination.
The results
attribute is an array of objects representing the data you requested from the API.
Coordinate System
All coordinates are assumed to be WSG84. Geographic objects are represented as GeoJSON.
We typically avoid using the GeoJSON Polygon and use a GeoJSON MultiPolygon to support a wider variety of shapes.
Reminder: GeoJSON positions are [ longitude, latitude, elevation ]
(you can learn more about that here).
Time Formatting
All timestamps are represented as ISO-8601 strings.
The ISO-8601 format is YYYY-MM-DDTHH:mm:ss.sssZ
, so September 14th, 2016 at 6:05:30PM
is represented as 2016-09-14T22:05:30.161Z
.
Measurements
All measurements are stored using the metric system for maximum accuracy and accessibility. If your data source is using non-metric measurements you'll need to convert it to metric.
Missing Fields
Empty fields are included as null
instead of being omitted from the response. While this may increase bandwidth slightly, it provides more context and information about the data available.
Comments
0 comments
Please sign in to leave a comment.