Retrieve Messages (Long Poll)

This action is designed for receiving new messages from any Hardware in your account as quickly as possible; therefore it's limited to returning a maximum of 200 messages at a time. If you need to retrieve historical messages for a given period, use DataMo/GetMessages instead.

Action will return all messages after specified lastMessageRetrieved - if there's no newer messages, the service will wait up to maxPollTime for new messages, before returning - as such the response may contain no messages.

If lastMessageRetrieved is not supplied, this action will return the latest message.

This mechanism facilitates "long-polling" - avoiding the need to continuously poll and reduces latency.

Example Flow (LMR = Last Message Retrieved)

  1. Initial Request - no LMR parameter is submitted as last message is unknown
  2. Server returns most recent Message (provided in LMR response field)
  3. Client makes follow-on request, this time supplying above LMR value
  4. Server will immediately return any new messages since LMR (if available, maximum 200)
  5. If no new messages, service will wait up to maxPollTime for new messages
  6. Service will return as soon as a new Message is received
  7. If no new Messages after maxPollTime - Service will return an empty response
  8. Client Repeat - Goto 3

It's important that you correctly configure http client timeouts to facilitate the specified maxPollTime


Message Decoding

Messages originating from a decodable source (e.g. RockSTAR, RockFLEET or RockAIR) will be decoded automatically. Decoded messages (e.g. position reports) will be embedded within the "decoded" property.

For more information about how to interpret the decoded messages; see the P6 section.

Click Try It! to start a request and see the response here!