The event is the main part of this data ingestion API. This element is where the information of the event generated by each of the devices will be sent to the platform in real time.
-
Method: POST
-
URL: {baseUrl}/v1/event
-
Body:
{ "actionId": "CLI_235", "beaconId": "cff92179-dc0a-47da-bd9e-5e9c5b14d251", "beaconTypeId": 1, "timestamp": "2021-03-15T13:34:00.000Z", "lon": -3.45368, "lat": 40.36586, "eventTypeId": 1, "hdop": 1, "speed": 120 }
* = Required field
-
actionId * (text): unique event identifier
-
beaconId * (text): unique beacon identifier (for example, the MAC)
-
beaconTypeId * (integer number): beacon type identifier. Possible values in / beaconTypes. 1 = Vehicle, 2 = Mobile
-
timestamp * (UTC time): date and time in UTC format of when the event was generated. It must be a maximum of 15 seconds old with respect to UTC time. The date must end with the character 'Z' that marks that it is in UTC
-
lon * (decimal number): longitude in WGS 84 coordinate system where the event was generated
-
lat * (decimal number): latitude in WGS 84 coordinate system where the event was generated
-
eventTypeId * (integer number): identifier of the event type. Possible values in / eventTypes. 1 = VAC en camino, 2 = VAC en intervención, 3 = VAC intervención finalizada
-
hdop * (integer number): DOP value to determine the quality of the GPS information. More information here
-
speed * (integer number): speed measured in kilometers per hour at which the element is at the moment it sends the event
In order to maintain the quality of the messages, the following requirements will apply to the content of the messages:
-
-
The geographical position must be contained in the Spanish territory
-
The order, quantity and frequency of the messages are set out below:
- One single message for event type Vac en camino (optional)
- As many messages as the duration of the intervention with event type VAC en intervención , with a frequency of 100 seconds between two messages.
- One single message of event type VAC en intervencion finalizada.
-
The position provided by the GPS must not have an error greater than 5 meters
-
Events will be accepted with a maximum age of 15 seconds with respect to UTC time, and that is not a future data. In case of non-compliance, an HTTP Status: 400 Bad Request Error code: 10 will be received