latestOpenAPI 3.0.0Groupe PSA Licence2026-08-0647172197.4 KB

023ff3e3fe51

Monitors

Create a new Monitor.

Create a Monitor for all Vehicles of the fleet. This is a kind of vehicle monitor that generates an event following the transition state of one of the (monitored) data of the vehicles. As for example the fuel level, the moving out of a defined geographical area.

When the trigger occurs, the built event expressed as a JSON object will be sent over the subscribed callback.

post/fleets/{fid}/monitors

Path parameters

fidstring required

Resource is related to this fleet ID only.

Request body

labelstring required

Monitor label (usually its name).

extendedEventParamstring[]

Allow to set extra vehicle data (defined in data model) to add to the monitor event when publishing. The possible values are :

valuedescriptionRelated model
vehicle.doorsStateLatest known door state (timestamped) before the eventDateDoorState
vehicle.statusLatest known vehicle status (timestamped) before the eventDateStatus
vehicle.maintenanceLatest known maintenance(timestamped) before the eventDateMaintenance
vehicle.positionLast vehicle position (timestamped) before the eventDatePosition
vehicle.telemetry${.TelemetryEnum}Latest known telemetry (timestamped) before the eventDate filtered with typeTelemetry
vehicle.alertsList of active alerts at the eventDateAlert
vehicle.collisionsLatest known collisions before the eventDateCollision
vehicle.tripTrip related to the event that triggers the notificationTrip
vehicle.stolenVehicle Stolen context at the eventDate (only returns when vehicle is reported stolen)Stolen
  • For telemetry extension:
    • The suffix ${.TelemetryEnum} can be selected to refine with telemetry type (from the TelemetryEnum list). This value (with suffix) can be selected several times to included suitable telemetry messages with the extention.
    • Using vehicle.telemetry without suffix means to include all available telemetries.
  • The set of data will then correspond to the union of extensions used in the request.

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