API for publishing location-based tracking events in the PositionPal system. This WebSocket API allows real-time communication for location tracking, routing, and SOS alerts. Clients can send various events and receive user updates from the server.
Main WebSocket channel for all location-based events. Clients can send location updates, routing events, and SOS alerts. The server will send user status updates through this channel.
Send sampled location updates to the server.
Available only on servers:
the id of the group
the id of the user
Accepts the following message:
Regular location update from a user
{
"SampledLocation": {
"timestamp": "2019-08-24T14:15:22Z",
"user": "0cf7a1de-d7f7-43c5-8bd2-2b70b5f86d1f",
"group": "9a4763d0-b06e-49bc-9e0f-c4a051744e9f",
"position": {
"latitude": 44.147843982335836,
"longitude": 12.23510261898422
}
}
}
Main WebSocket channel for all location-based events. Clients can send location updates, routing events, and SOS alerts. The server will send user status updates through this channel.
Send routing start events to the server.
Available only on servers:
the id of the group
the id of the user
Accepts the following message:
Event when a user starts navigation
{
"RoutingStarted": {
"timestamp": "2019-08-24T14:15:22Z",
"user": "0cf7a1de-d7f7-43c5-8bd2-2b70b5f86d1f",
"group": "9a4763d0-b06e-49bc-9e0f-c4a051744e9f",
"position": {
"latitude": 44.147843982335836,
"longitude": 12.23510261898422
},
"mode": "WALKING",
"destination": {
"name": "Via Dell'Università 50, Cesena, Italy",
"position": {
"latitude": 44.147843982335836,
"longitude": 12.23510261898422
}
},
"expectedArrival": "2019-08-24T14:15:22Z"
}
}
Main WebSocket channel for all location-based events. Clients can send location updates, routing events, and SOS alerts. The server will send user status updates through this channel.
Send routing stop events to the server.
Available only on servers:
the id of the group
the id of the user
Accepts the following message:
Event when a user stops navigation
{
"RoutingStopped": {
"timestamp": "2019-08-24T14:15:22Z",
"user": "0cf7a1de-d7f7-43c5-8bd2-2b70b5f86d1f",
"group": "9a4763d0-b06e-49bc-9e0f-c4a051744e9f"
}
}
Main WebSocket channel for all location-based events. Clients can send location updates, routing events, and SOS alerts. The server will send user status updates through this channel.
Send SOS alerts to the server.
Available only on servers:
the id of the group
the id of the user
Accepts the following message:
Emergency alert triggered by user
{
"SOSAlertTriggered": {
"timestamp": "2019-08-24T14:15:22Z",
"user": "0cf7a1de-d7f7-43c5-8bd2-2b70b5f86d1f",
"group": "9a4763d0-b06e-49bc-9e0f-c4a051744e9f",
"position": {
"latitude": 44.147843982335836,
"longitude": 12.23510261898422
}
}
}
Main WebSocket channel for all location-based events. Clients can send location updates, routing events, and SOS alerts. The server will send user status updates through this channel.
Send SOS alert stops to the server.
Available only on servers:
the id of the group
the id of the user
Accepts the following message:
Emergency alert cancelled by user
{
"SOSAlertStopped": {
"timestamp": "2019-08-24T14:15:22Z",
"user": "0cf7a1de-d7f7-43c5-8bd2-2b70b5f86d1f",
"group": "9a4763d0-b06e-49bc-9e0f-c4a051744e9f"
}
}
Main WebSocket channel for all location-based events. Clients can send location updates, routing events, and SOS alerts. The server will send user status updates through this channel.
Receive user update events from the server.
Available only on servers:
the id of the group
the id of the user
Accepts the following message:
Server-sent update about a user's status
{
"UserUpdate": {
"timestamp": "2019-08-24T14:15:22Z",
"user": "0cf7a1de-d7f7-43c5-8bd2-2b70b5f86d1f",
"group": "9a4763d0-b06e-49bc-9e0f-c4a051744e9f",
"position": {
"latitude": 44.147843982335836,
"longitude": 12.23510261898422
},
"status": "ACTIVE"
}
}
Unique identifier for a user.
Unique identifier for a group.
The current state of a user in the system