Get Retained Message
emqx_get_retainedFetch the retained message stored for an MQTT topic, returning found=false when no value exists.
Instructions
Read the retained message stored for one topic.
Returns found=false when the topic has nothing retained — that is an ordinary answer, not an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Exact topic whose retained message to read, e.g. 'woow/test/switch/state'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qos | No | QoS the message was published at. | |
| found | Yes | False when nothing is retained there. | |
| topic | Yes | Topic the message is retained on. | |
| lookup | No | How it was located: 'direct' or 'listing'. Hierarchical topics cannot be addressed directly by EMQX's REST API. | |
| payload | No | Decoded payload text. | |
| publish_at | No | When it was published. |