Account Reports¶
An Authenticated user can get a list of reports from all previous driving range sessions:
GET /api/account/reports
Host:
https://api.trackmanrange.com
If the request is successful, you'll get back an http 200 response from the server together with a json document with the following structure:
{
"items": [
{
"id": "fd5d425e-bdf0-4c58-aa94-71c3e4cd6e1d",
"title": "Report from Smørum",
"time": "2017-07-14T14:14:40.0990836+02:00",
"link": "https://api.trackmanrange.com/DynamicReport?ReportId=2997354e-2a95-47c8-b841-9734a568c968",
"strokeCount": 15,
"player": {
"id": "95f1f380-f325-4454-b311-d4dd0febbea2",
"name": "Test player",
"email": "tp@trackman.dk"
},
"_links": {}
},
{
"id": "89cb87e0-a610-b960-44dd-f5a185ac36a2",
"title": "Report from Rungsted",
"time": "2017-06-20T10:14:52.2434921+02:00",
"link": "https://api.trackmanrange.com/DynamicReport?ReportId=b4f6eb32-9ff3-42c1-aab4-c5288a710e2a",
"strokeCount": 55,
"player": {
"id": "95f1f380-f325-4454-b311-d4dd0febbea2",
"name": "Test player",
"email": "tp@trackman.dk"
},
"_links": {}
},
{
"id": "3ae58ba8-c3f4-b5b2-0f99-662d27806d5d",
"title": "Report from Rungsted",
"time": "2017-05-09T14:59:15.0806911+02:00",
"link": "https://api.trackmanrange.com/DynamicReport?ReportId=1054fa21-4076-4237-8fd6-aa8be6ecd1d6",
"strokeCount": 30,
"player": {
"id": "95f1f380-f325-4454-b311-d4dd0febbea2",
"name": "Test player",
"email": "tp@trackman.dk"
},
"_links": {}
}
],
"_links": {
"self": {
"method": "GET",
"href": "https://api.trackmanrange.comapi/account/reports?pageSize=50"
},
"first": {
"method": "GET",
"href": "https://api.trackmanrange.comapi/account/reports?pageSize=50"
},
"last": {
"method": "GET",
"href": "https://api.trackmanrange.comapi/account/reports?pageSize=50"
}
},
"page": 1,
"pageSize": 50,
"pageCount": 1,
"total": 3
}
Filtering¶
It is possible to filter the reports on date by specifying a ´dateFromand/or a
dateTo` parameter. Dates must be specified in 'YYYY-MM-DD' format.
Specifying dateFrom
and/or dateTo
will include data from the dateFrom
date up to - but not including - the dateTo
date. Eg. specifying dateFrom = “2016-01-01”
and dateTo = “2016-01-02”
will only return data from “2016-01-01”.
The following request will return all reports from March 2017:
GET /api/account/reports?dateFrom=2017-03-01&dateTo=2017-04-01