### GET /iot/reader/channels/{chanId}/messages Source: https://connhex.com/api/core/latest/reader/api.json Retrieves a list of messages sent to a specific channel. Required Permission: - Resource: ```core:channels:{id}``` - Action: ```core:channels:subscribe``` ```markdown ### Parameters - **chanId** (string (uuid), path, required): Unique channel identifier. - **limit** (integer, query, optional): Size of the subset to retrieve. - **offset** (integer, query, optional): Number of items to skip during retrieval. - **from** (number, query, optional): Message time in Unix epoch seconds. The integer part represents whole seconds; the fractional part provides sub-second precision. - **to** (number, query, optional): Message time in Unix epoch seconds. The integer part represents whole seconds; the fractional part provides sub-second precision. - **publisher** (string (uuid), query, optional): Unique thing identifier (also known as "Connhex ID"). - **format** (string (messages|params|infos|metrics), query, optional): Message type. For more information, please check the official [CMP doc](https://connhex.com/docs/core/connhex-message-policy#components). - **subtopic** (string (string), query, optional): Message subtopic. - **name** (string, query, optional): SenML message name. _Only available for SenML messages_. - **v** (string, query, optional): SenML message value. _Only available for SenML messages_. - **vb** (boolean, query, optional): SenML message bool value. _Only available for SenML messages_. - **vs** (string, query, optional): SenML message string value. _Only available for SenML messages_. - **vd** (string, query, optional): SenML message data value. _Only available for SenML messages_. - **ds** (string, query, optional): Data decimation granularity. Format: `{number}{s|m|h|d|w|M|y}`. _Only available for SenML messages_. - **dsf** (string (max|min|avg|sum|stddev|variance), query, optional): Data decimation algorithm. _Only available for SenML messages_. - **dsv** (string (v|vb), query, optional): Data decimation type. `v`: number, `vb`: boolean. _Only available for SenML messages_. ### Responses #### 200 - response **MessagesPage** - **total** (number): Total number of items that are present on the system. - **offset** (number): Number of items that were skipped during retrieval. - **limit** (number): Size of the subset that was retrieved. - **messages** (array (object)) Array items: - **channel** (integer): Unique channel id. - **publisher** (integer): Unique publisher id. - **protocol** (string): Protocol name. - **name** (string): Measured parameter name. - **unit** (string): Value unit. - **value** (number): Measured value in number. - **stringValue** (string): Measured value in string format. - **boolValue** (boolean): Measured value in boolean format. - **dataValue** (string): Measured value in binary format. - **valueSum** (number): Sum value. - **time** (number): Time of measurement. - **updateTime** (number): Time of updating measurement. #### 400 - Bad request. Bad request. #### 401 - Unauthorized. Unauthorized. #### 500 - response Unexpected server error. ### Example Usage ```bash curl -X GET "https://apis./iot/reader/channels/{chanId}/messages?limit=10&offset=0&from=0&to=0&publisher=string&format=messages&subtopic=string&name=string&v=string&vb=true&vs=string&vd=string&ds=string&dsf=max&dsv=v" ``` ``` -------------------------------- ### Security: $ref Source: https://connhex.com/api/core/latest/reader/api.json Security scheme: $ref ```markdown ## Security: $ref **Description:** Security scheme: $ref **Type:** unknown ``` -------------------------------- ### API Overview: connhex-reader Source: https://connhex.com/api/core/latest/reader/api.json OpenAPI specification version 1.5.0 ```yaml # connhex-reader # Version: 1.5.0 OpenAPI specification # Base URL: https://apis. ``` -------------------------------- ### Schema: MessagesPage Source: https://connhex.com/api/core/latest/reader/api.json Schema definition for MessagesPage ```markdown ## Schema: MessagesPage Schema definition for MessagesPage **Type:** object - **total** (number): Total number of items that are present on the system. - **offset** (number): Number of items that were skipped during retrieval. - **limit** (number): Size of the subset that was retrieved. - **messages** (array (object)) Array items: - **channel** (integer): Unique channel id. - **publisher** (integer): Unique publisher id. - **protocol** (string): Protocol name. - **name** (string): Measured parameter name. - **unit** (string): Value unit. - **value** (number): Measured value in number. - **stringValue** (string): Measured value in string format. - **boolValue** (boolean): Measured value in boolean format. - **dataValue** (string): Measured value in binary format. - **valueSum** (number): Sum value. - **time** (number): Time of measurement. - **updateTime** (number): Time of updating measurement. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.