Data API¶
These API endpoints are documented solely for the purpose of Point 97 developers. They are subject to change without notice.
Note
For all endpoints listed, you can add .csv
to the end of it and get a
CSV download of the data.
Single Select Count¶
-
GET
/reports/single-select-count/<question_slug>
¶ Returns the count of survey responses for each answer in the single select.
Example request:
GET /reports/single-select-count/market
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "success": true, "data": [ {"answer": "Market A", "count": 4}, {"answer": "Market B", "count": 2}, ], "meta": {"labels": ["Market A", "Market B"]} }
Query Parameters: - status – one of
accepted
,rejected
, orflagged
- start_date – filter results to on or after
start_date
formated like:%Y-%m-%d
- end_date – filter results to on or before
end_date
formatted like:%Y-%m-%d
- status – one of
Grid Standard Deviation¶
-
GET
/reports/grid-standard-deviation/<question_slug>/<interval>
¶ Groups the responses by type in the given interval and gives the minimum, maximum, average, and total of the responses.
Example request:
GET /reports/grid-standard-deviation/market/month
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "success": true, "data": [ { "row_label": "Trout", "row_text": "trout", "date": 1385884800000, "minimum": 2, "average": 5, "maximum": 15, "total": 54, }, { "row_label": "Trout", "row_text": "trout", "date": 1388563200000 "minimum": 2, "average": 5, "maximum": 15, "total": 54, }, ], "meta": {"labels": ["Trout"]} }
Query Parameters: - status – one of
accepted
,rejected
, orflagged
- start_date – filter results to on or after
start_date
formated like:%Y-%m-%d
- end_date – filter results to on or before
end_date
formatted like:%Y-%m-%d
- row – string that matches a
row_label
in the question - col – string that matches a
col_label
in the question
- status – one of
Surveyor Stats¶
Note
This endpoint also includes the ability to get a more raw form of the data
by omiting /<interval>
and adding .csv
.
-
GET
/reports/surveyor-stats/<survey_slug>/<interval>
¶ Gives the stats for each surveyor who has gathered data for
survey_slug
, aggregated by the providedinterval
.Example request:
GET /reports/surveyor-stats/market-survey/month
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "success": true, "data": [ { "surveyor": "John Doe", "count": 2, "timestamp": 1385884800000 }, { "surveyor": "Jane Doe", "count": 4, "timestamp": 1385884800000 }, ], "meta": null }
Query Parameters: - status – one of
accepted
,rejected
, orflagged
- start_date – filter results to on or after
start_date
formated like:%Y-%m-%d
- end_date – filter results to on or before
end_date
formatted like:%Y-%m-%d
- surveyor – filter results to only include a specific surveyor by their ID
- status – one of