Retrieves JSON messages
GEThttps://apis.<domain>/iot/reader/channels/:chanId/messages
Authorization: http
name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`
Retrieves a list of messages sent to a specific channel.
Authorization Action:
core:channels:subscribe
Request
Path Parameters
chanId uuidrequired
Unique channel identifier.
Query Parameters
format string
Possible values: [messages
, params
, infos
]
Default value: messages
Message type.
subtopic string
Message subtopic.
limit integer
Possible values: >= 1
and <= 1500
Default value: 10
Size of the subset to retrieve.
offset integer
Number of items to skip during retrieval.
from number
Message time in nanoseconds (integer part represents seconds).
to number
Message time in nanoseconds (integer part represents seconds).
Responses
- 200
- 400
- 401
- 500
Data retrieved.
- application/json
- Schema
- Example (from schema)
Schema
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 object[]
{
"total": 0,
"offset": 0,
"limit": 0,
"messages": [
{
"channel": 0,
"publisher": 0,
"protocol": "string",
"name": "string",
"unit": "string",
"value": 0,
"stringValue": "string",
"boolValue": true,
"dataValue": "string",
"valueSum": 0,
"time": 0,
"updateTime": 0
}
]
}
Bad request.
Unauthorized.
Unexpected server error.
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'https://apis.<domain>/iot/reader/channels/:chanId/messages' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'