Get a event rule
curl --request GET \
--url https://fleet.graviton.ma/api/v2/events/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://fleet.graviton.ma/api/v2/events/{id}"
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/events/{id}', 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/events/{id}",
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": {
"event_id": 123,
"type": "<unknown>",
"name": "<unknown>",
"active": "<unknown>",
"week_days": "<unknown>",
"day_time": "<unknown>",
"imei": "<unknown>",
"checked_value": "<unknown>",
"route_trigger": "<unknown>",
"zone_trigger": "<unknown>",
"routes": "<unknown>",
"zones": "<unknown>",
"notify_system": "<unknown>",
"notify_email": "<unknown>",
"notify_email_address": "<unknown>",
"notify_sms": "<unknown>",
"notify_sms_number": "<unknown>",
"notify_telegram": "<unknown>",
"email_template_id": "<unknown>",
"sms_template_id": "<unknown>",
"cmd_send": "<unknown>",
"cmd_gateway": "<unknown>",
"cmd_type": "<unknown>",
"cmd_string": "<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
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}Events
Get a event rule
Works with resources accessible to your account. Subaccounts need the event_notifications permission.
GET
/
events
/
{id}
Get a event rule
curl --request GET \
--url https://fleet.graviton.ma/api/v2/events/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://fleet.graviton.ma/api/v2/events/{id}"
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/events/{id}', 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/events/{id}",
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": {
"event_id": 123,
"type": "<unknown>",
"name": "<unknown>",
"active": "<unknown>",
"week_days": "<unknown>",
"day_time": "<unknown>",
"imei": "<unknown>",
"checked_value": "<unknown>",
"route_trigger": "<unknown>",
"zone_trigger": "<unknown>",
"routes": "<unknown>",
"zones": "<unknown>",
"notify_system": "<unknown>",
"notify_email": "<unknown>",
"notify_email_address": "<unknown>",
"notify_sms": "<unknown>",
"notify_sms_number": "<unknown>",
"notify_telegram": "<unknown>",
"email_template_id": "<unknown>",
"sms_template_id": "<unknown>",
"cmd_send": "<unknown>",
"cmd_gateway": "<unknown>",
"cmd_type": "<unknown>",
"cmd_string": "<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
}
}{
"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
Required range:
x >= 1
