1. Home
  2. Docs
  3. IoTGtw API Samples
  4. Messaging API (Upstream Application Data)
  5. Retrieve Message Records

Retrieve Message Records

Retrieve device messages from the “shipped”, “pending” and “failed” queues (all_queues) – return default fields only – paginated
Property Description
Resource URL /customer/v1/{customer_id}/messaging/{messaging_profile_id}/retrieve
Method POST
Body Messaging Retrieve Object
Sample Request

Sample Response

Note:
• In the example there were no message records in the device pending queues, hence no result returned for that queue.
• When the fieldset array attribute is left blank only the default fields are returned as shown above.
• The fieldset request attribute can be used to indicate the exact fields to return from the message records. To return the entire fields of the message records (i.e. meta-data + payload), the fieldset attribute may be set to [“all_fields”]. To return all fields except the payload set to [“all_fields_except_payload”], to return specific fields only indicate the exact fields to be returned as follows: [“udid”, “device_tx_protocol”, “payload.length”].
• When performing message retrieve operation, if fieldset includes payload data (payload.data), the max message records per request page is restricted to 1000. If fieldset does not include payload data then upto 10000 message records per request can be retrieved.
• The “message_queue” attribute is used to indicate which queues to retrieve messages from. It can be set to: “shipped”, “pending” “failed” queues. It may also be set to “all_queues” to retrieve from all three queues. The following sub-queues are also accepted: “shipped_uplink”, “shipped_downlink”, “pending_uplink”, “pending_downlink”, “failed_uplink”, “failed_downlink”.
• When performing “all_queues” type query, the specified page and limit is applied to each queue type (shipped, pending & failed) individually.
Retrieve messages from the “shipped”, “pending” and “failed” queues (all_queues) – return meta-data fields only – paginated
Property Description
Resource URL /customer/v1/{customer_id}/messaging/{messaging_profile_id}/retrieve
Method POST
Body Messaging Retrieve Object
Sample Request

Sample Response

Retrieve messages from the “shipped”, “pending” and “failed” queues – include all fields (and payload)
Property Description
Resource URL /customer/v1/{customer_id}/messaging/{messaging_profile_id}/retrieve
Method POST
Body Messaging Retrieve Object
Sample Request

Sample Response

Retrieve device messages from the “failed ” queues of devices – exclude payload (meta-data only)
Property Description
Resource URL /customer/v1/{customer_id}/messaging/{messaging_profile_id}/retrieve
Method POST
Body Messaging Retrieve Object
Sample Request

Sample Response

Retrieve device messages from the “shipped”, “pending” and “failed” queues – ungrouped
Property Description
Resource URL /customer/v1/{customer_id}/messaging/{messaging_profile_id}/retrieve
Method POST
Body Messaging Retrieve Object
Sample Request

Sample Response

Note:
When group_by_queue is set to false in the retrieve message request, the queue name is appended to each message record returned for the requestor to easily identify which device queues the messages are fetched from.
Was this article helpful to you? Yes No

How can we help?