Report Tracker
User reports enable comprehensive statistics and analytics, presenting summary data in various perspectives through tables and graphs.
This section details API calls to interact with tracker reports.
For information on how to obtain data from reports, refer to the guide.
API actions
API path: /report/tracker.
delete
Deletes a report from the database.
required sub-user rights: reports.
Parameters
report_id
ID of a report that should be deleted.
int
Examples
curl -X POST 'https://api.eu.navixy.com/v2/report/tracker/delete' \
-H 'Content-Type: application/json' \
-d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "report_id": 1234567}'https://api.eu.navixy.com/v2/report/tracker/delete?hash=a6aa75587e5c59c32d347da438505fc3&report_id=1234567Response
{
"success": true
}Errors
101 – In demo mode this function disabled.
download
Retrieve generated report as a file.
required sub-user rights: reports
Parameters
report_id
ID of a report that should be deleted.
int
headless
Optional parameter. Default=false. If need report without title page and TOC, set it to true.
boolean
Examples
curl -X POST 'https://api.eu.navixy.com/v2/report/tracker/download' \
-H 'Content-Type: application/json' \
-d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "report_id": 1234567, "format": "pdf"}'https://api.eu.navixy.com/v2/report/tracker/download?hash=a6aa75587e5c59c32d347da438505fc3&report_id=1234567&format=pdfResponse
A report rendered to file (standard file download).
Errors
204 - Entity not found - if report with the specified ID not found.
229 - Requested data is not ready yet - if report exists, but its generation is still in progress.
generate
Requests a report generation with the specified parameters.
required sub-user rights: reports.
Parameters
title
Report title. Default title will be used if null.
string
trackers
List of trackers' IDs to be included in report (if report is by trackers).
int array
employees
List of employees' IDs to be included in report (if report is by employees. For example, plugin ID 82).
int array
time_filter
An object which contains everyday time and weekday limits for processed data, e.g. {"to":"18:00", "from":"12:00", "weekdays":[1,2,3,4,5]}.
JSON object
plugin
A plugin object (see below).
JSON object
Parameter object fields:
Part of parameters are plugin-specific. See "Tracker report plugins" section. Common parameters are:
plugin_id
An ID of a tracker report plugin which will be used to generate report.
int
show_seconds
Flag to define whether time values in report should have format with seconds. true - show seconds, false - don't show seconds.
boolean
Plugin example:
{
"details_interval_seconds": 300,
"plugin_id": 9,
"show_seconds": false,
"graph_type": "time",
"smoothing": false,
"sensors": [
{
"tracker_id": 123456,
"sensor_id": 123456
}
]
}Example
cURL
curl -X POST 'https://api.eu.navixy.com/v2/report/tracker/generate' \
-H 'Content-Type: application/json' \
-d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "title": "Trip report", "trackers": [669673], "from": "2020-10-05 00:00:00", "to": "2020-10-06 23:59:59", "time_filter": {"from": "00:00:00", "to": "23:59:59", "weekdays": [1,2,3,4,5,6,7]}, "plugin": {"hide_empty_tabs": true, "plugin_id": 4, "show_seconds": false, "include_summary_sheet_only": false, "split": true, "show_idle_duration": false, "show_coordinates": false, "filter": true, "group_by_driver": false}}'Response
{
"success": true,
"id": 222
}id- int. An ID of the report queued for generation. Can be used to request report generation status and to retrieve generated report.
Errors
15 - Too many requests / rate limit exceeded - the number of reports created by one user in parallel limited.
211 - Requested time span is too big - interval from
fromtotois bigger then max allowed time span (see response).
{
"success": false,
"status": {
"code": 211,
"description": "Requested time span is too big"
},
"max_time_span": "P90D"
}max_time_span- string. ISO 8601 duration.217 - List contains nonexistent entities - when one or more of tracker IDs belong to nonexistent tracker (or to a tracker belonging to different user).
222 - Plugin not found - when specified report plugin not found.
236 - Feature unavailable due to tariff restrictions - when one of the trackers has tariff with disabled reports ("has_reports" is false).
list
Returns info about all available generated or in-progress reports.
required sub-user rights: reports.
Examples
curl -X POST 'https://api.eu.navixy.com/v2/report/tracker/list' \
-H 'Content-Type: application/json' \
-d '{"hash": "a6aa75587e5c59c32d347da438505fc3"}'https://api.eu.navixy.com/v2/report/tracker/list?hash=a6aa75587e5c59c32d347da438505fc3Response
{
"success": true,
"list": [
{
"created": "2020-10-08 21:59:30",
"time_filter": {
"from": "00:00:00",
"to": "23:59:59",
"weekdays": [1, 2, 3, 4, 5, 6, 7]
},
"title": "Trip report",
"id": 5601797,
"parameters": {
"geocoder": "google",
"trackers": [669673],
"plugins": [
{
"plugin_id": 4,
"filter": true,
"hide_empty_tabs": true,
"show_coordinates": false,
"split": true,
"include_summary_sheet_only": false,
"show_seconds": false,
"group_by_driver": false,
"show_idle_duration": false
}
],
"locale_info": {
"locale": "ru_RU",
"time_zone": "Asia/Yekaterinburg",
"measurement_system": "metric"
}
},
"percent": 100,
"type": "user",
"from": "2020-10-05 00:00:00",
"to": "2020-10-06 23:59:59"
}
]
}created- string. Date when report created.time_filter- object.from- string. Control time "from" of day.to- string. Control time "to" of day.weekdays- int array. Control "weekdays" of the report. Can be 1 - 7.
title- string. Report title.id- int. Report ID which can be used to retrieve or download report.parameters- object with report parameters.trackers- int array. List of tracker IDs used for report.plugins- array of objects. List of parameters for all plugins which were used to generate report.locale_info- object with information about the locale, timezone, and measurement system used for the report.
percent- int. Report readiness in percent.type- enum. Type of created report.from- string. "from" parameter from generate.to- string. "to" parameter from generate.
Errors
General types only.
retrieve
Retrieves a generated report as JSON.
required sub-user rights: reports.
Parameters
report_id
ID of a report that should be deleted.
int
Examples
curl -X POST 'https://api.eu.navixy.com/v2/report/tracker/retrieve' \
-H 'Content-Type: application/json' \
-d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "report_id": 1234567}'https://api.eu.navixy.com/v2/report/tracker/retrieve?hash=a6aa75587e5c59c32d347da438505fc3&report_id=1234567Response
report- object. Body of the generated report. Its contents are plugin-dependent.
Errors
204 - Entity not found - if report with the specified ID not found.
229 - Requested data is not ready yet - if report exists, but its generation is still in progress.
status
Returns a report generation status for the specified report id.
required sub-user rights: reports.
Parameters
report_id
ID of a report that should be deleted.
int
Examples
curl -X POST 'https://api.eu.navixy.com/v2/report/tracker/status' \
-H 'Content-Type: application/json' \
-d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "report_id": 1234567}'https://api.eu.navixy.com/v2/report/tracker/status?hash=a6aa75587e5c59c32d347da438505fc3&report_id=1234567Response
{
"success": true,
"percent_ready": 75
}percent_ready- int. Report readiness in percent.
Errors
204 - Entity not found - if report with the specified ID not found.
Last updated
Was this helpful?