Event - dgt30-eng/Use-case-5 GitHub Wiki
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/events
-
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 = Start, 2 = End, 3 = Intermediate, 4 = Perimeter
-
timestamp * (UTC time): date and time in UTC format of when the event was generated. It must be a maximum of 30 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 = Start, 2 = End
-
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
-
A maximum message sending frequency is established of one message every 10 seconds
-
The position provided by the GPS must not have an error greater than 5 meters
-
A maximum age of 15 seconds with respect to UTC time is required for all types of vehicles
-
The order and quantity of the messages are set out below:
- Events of type Activation, a single message (optional).
- Events of type Actived, as many messages as the activity lasts.
- Events of type Deactivation, a single message.
-