Retrieves SenML 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
Unique channel identifier.
Query Parameters
Possible values: >= 1
and <= 1500
Default value: 10
Size of the subset to retrieve.
Number of items to skip during retrieval.
Unique thing identifier.
Possible values: [messages
, params
, infos
]
Default value: messages
Message type.
Message subtopic.
SenML message name.
SenML message value.
SenML message bool value.
SenML message string value.
SenML message data value.
SenML message time in nanoseconds (integer part represents seconds).
SenML message time in nanoseconds (integer part represents seconds).
Data decimation granularity. Format: {number}{s|m|h|d|w|M|y}
Possible values: [max
, min
, avg
, sum
, stddev
, variance
]
Data decimation algorithm.
Possible values: [v
, vb
]
Data decimation type. v
: number, vb
: boolean
Responses
- 200
- 400
- 401
- 500
Data retrieved.
- application/json
- Schema
- Example (from schema)
Schema
Total number of items that are present on the system.
Number of items that were skipped during retrieval.
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>'