v15

latestOpenAPI 3.1.02026-07-1295183803.5 KB
Tracking_Subscribe

POST Action

post/skynet/subscribe

Request body

idstring

Specify a custom ID for the subscription. It can be used to reference a given subscription in the downstream applications / systems.

action'TRIP_SUBSCRIBE' | 'TRIP_UNSUBSCRIBE' | 'HEARTBEAT' required

Specify the behavior that needs to be achieved for the subscription. Following values are accepted:

  • TRIP_SUBSCRIBE: Enable a trip subscription.

  • TRIP_UNSUBSCRIBE: Unsubscribe from a trip

  • HEARTBEAT: Enable heartbeat mechanism for a web-socket connection. The action message need to be sent at a frequency higher than every 5 mins to keep the connection alive. Alternatively, users can chose to respond to the ping frame sent by web socket server to keep the connection alive. Refer to connection details for more details.

Response

idstring

Subscription ID as provided in the input action message.

statusstring

Status of the action. It can have only two values - "success" or "error".

errorstring

Returns the error message when status: error. Otherwise, response doesn't contain this field.

timestampinteger

Returns the UNIX timestamp, in milliseconds format, when the web-socket returns the action response.