curl --request GET \
--url https://fleet.graviton.ma/api/v2/reports \
--header 'Authorization: <api-key>'import requests
url = "https://fleet.graviton.ma/api/v2/reports"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://fleet.graviton.ma/api/v2/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet.graviton.ma/api/v2/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": [
{
"report_id": 123,
"name": "<unknown>",
"type": "<unknown>",
"format": "<unknown>",
"show_addresses": "<unknown>",
"zones_addresses": "<unknown>",
"show_trip_image": "<unknown>",
"stop_duration": "<unknown>",
"speed_limit": "<unknown>",
"imei": "<unknown>",
"zone_ids": "<unknown>",
"sensor_names": "<unknown>",
"data_items": "<unknown>",
"schedule_period": "<unknown>",
"schedule_email_address": "<unknown>",
"dt_schedule_d": "<unknown>",
"dt_schedule_w": "<unknown>"
}
],
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}List reports
Works with resources accessible to your account. Subaccounts need the reports permission.
curl --request GET \
--url https://fleet.graviton.ma/api/v2/reports \
--header 'Authorization: <api-key>'import requests
url = "https://fleet.graviton.ma/api/v2/reports"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://fleet.graviton.ma/api/v2/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet.graviton.ma/api/v2/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": [
{
"report_id": 123,
"name": "<unknown>",
"type": "<unknown>",
"format": "<unknown>",
"show_addresses": "<unknown>",
"zones_addresses": "<unknown>",
"show_trip_image": "<unknown>",
"stop_duration": "<unknown>",
"speed_limit": "<unknown>",
"imei": "<unknown>",
"zone_ids": "<unknown>",
"sensor_names": "<unknown>",
"data_items": "<unknown>",
"schedule_period": "<unknown>",
"schedule_email_address": "<unknown>",
"dt_schedule_d": "<unknown>",
"dt_schedule_w": "<unknown>"
}
],
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}Authorizations
Your Graviton API token. Send Authorization: Bearer YOUR_API_TOKEN or Authorization: YOUR_API_TOKEN. Each token has individual permissions; a valid token without the permission required by the method and route returns 403 TOKEN_PERMISSION_DENIED.
Query Parameters
x >= 11 <= x <= 500Partial text search across the resource's registered safe search fields. Whitespace is trimmed; literal percent and underscore characters are escaped. Search is applied after account, ownership, privilege, and object scope.
2 - 100asc, desc Registered field used for sorting.
report_id, name, type, format, show_addresses, zones_addresses, show_trip_image, stop_duration, speed_limit, imei, zone_ids, sensor_names, data_items, schedule_period, schedule_email_address, dt_schedule_d, dt_schedule_w Exact-match filter for name.
Exact-match filter for type.
Exact-match filter for format.
Exact-match filter for show_addresses.
Exact-match filter for zones_addresses.
Exact-match filter for show_trip_image.
Exact-match filter for stop_duration.
Exact-match filter for speed_limit.
Exact-match filter for imei.
Exact-match filter for zone_ids.
Exact-match filter for sensor_names.
Exact-match filter for data_items.
Exact-match filter for schedule_period.
Exact-match filter for schedule_email_address.
Exact-match filter for dt_schedule_d.
Exact-match filter for dt_schedule_w.

