Get driving segments
curl --request GET \
--url https://fleet.graviton.ma/api/v2/objects/{imei}/drives \
--header 'Authorization: <api-key>'import requests
url = "https://fleet.graviton.ma/api/v2/objects/{imei}/drives"
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/objects/{imei}/drives', 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/objects/{imei}/drives",
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": {
"imei": "<string>",
"from": "<string>",
"to": "<string>",
"data": [
{
"from": "<string>",
"to": "<string>",
"start_lat": 123,
"start_lng": 123,
"end_lat": 123,
"end_lng": 123,
"max_speed": 123,
"duration_seconds": 123
}
]
},
"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
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}Tracking
Get driving segments
Requires the history permission for subaccounts. Supply from and to with explicit timezones; the interval must not exceed 93 days. Calculation uses at most 10,000 points. Stops use speed below 1; driving uses speed of 1 or greater.
GET
/
objects
/
{imei}
/
drives
Get driving segments
curl --request GET \
--url https://fleet.graviton.ma/api/v2/objects/{imei}/drives \
--header 'Authorization: <api-key>'import requests
url = "https://fleet.graviton.ma/api/v2/objects/{imei}/drives"
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/objects/{imei}/drives', 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/objects/{imei}/drives",
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": {
"imei": "<string>",
"from": "<string>",
"to": "<string>",
"data": [
{
"from": "<string>",
"to": "<string>",
"start_lat": 123,
"start_lng": 123,
"end_lat": 123,
"end_lng": 123,
"max_speed": 123,
"duration_seconds": 123
}
]
},
"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
}
}{
"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.
Path Parameters
Pattern:
^[A-Za-z0-9_-]{1,20}$
