Update a event rule
curl --request PATCH \
--url https://fleet.graviton.ma/api/v2/events/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"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>"
}
'import requests
url = "https://fleet.graviton.ma/api/v2/events/{id}"
payload = {
"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>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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
Update a event rule
Works with resources accessible to your account. Subaccounts need the event_notifications permission. Requires write access. A read-only account cannot perform this operation.
PATCH
/
events
/
{id}
Update a event rule
curl --request PATCH \
--url https://fleet.graviton.ma/api/v2/events/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"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>"
}
'import requests
url = "https://fleet.graviton.ma/api/v2/events/{id}"
payload = {
"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>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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 >= 1Body
application/json
Type.
Name.
Active.
Week days.
Day time.
Imei.
Checked value.
Route trigger.
Zone trigger.
Routes.
Zones.
Notify system.
Notify email.
Notify email address.
Notify sms.
Notify sms number.
Notify telegram.
Email template id.
Sms template id.
Cmd send.
Cmd gateway.
Cmd type.
Cmd string.

