Monitors
Update an existing Monitor.
Update an existing Monitor that has been posted (and accepted previously) for this fleet. The monitor object (body) provided should be complete because the aggregation is not supported for the update of the monitor. You can first retrieve this object using the GET /monitor/{mid} API, then modify it and finally publish it (via this PUT API).
put/fleets/{fid}/monitors/{mid}
Path parameters
midstring required
id of the monitor.
fidstring required
Resource is related to this fleet ID only.
Request body
Example request
{
"subscribeParam": {
"retryPolicy": {
"retryNumber": 10,
"retryDelay": 60
},
"callback": {
"webhook": {
"target": "https://my.post.callback",
"name": "My_Webhook",
"attributes": [
{
"type": "Header",
"key": "X-Vehicle_Id",
"value": "$vin"
}
]
}
},
"refreshEvent": 120
},
"triggerParam": {
"triggers": [
{
"zone": {
"transition": "Out",
"place": {
"radius": 20,
"center": {
"longitude": 2.333333,
"latitude": 48.866667
}
}
},
"time": {
"times": [
{
"recurrence": "Daily",
"start": "PT8H30M",
"duration": "PT7H30M",
"occurence": [
"Mon",
"Tue",
"Thu",
"Fri"
]
}
],
"timeZone": "Europe/Paris"
},
"data": {
"data": "vehicle.energy.electric.level",
"op": "greaterThan",
"value": [
"75"
]
}
}
],
"boolExp": "((z1 & t1) | (z2 & !t1) | (f & z1) | (a & (z1|t)) | (o & (z1 | z2)))"
}
}Response
Monitor created or updated successfully