Sends message to a communication channel
POSThttps://apis.<domain>/iot/http/channels/:id/messages/:subtopic
Authorization: http
name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`
Sends message to a communication channel.
Authorization Action:
core:channels:publish
Request
Path Parameters
id uuidrequired
Unique connectable's channel identifier.
subtopic string
Message subtopic.
Follow these instructions to target a specific custom service runnig on an edge device.
- application/json
Body
arrayrequired
Message to be sent.
- Array [
- ]
bn string
Base Name
bt double
Base Time
bu double
Base Unit
bv double
Base Value
n string
Name
u string
Unit
v double
Value
vs string
String Value
vb boolean
Boolean Value
vd string
Data Value
s double
Value Sum
t double
Time
Responses
- 202
- 400
- 401
- 500
Message is accepted for processing.
Bad request.
Unauthorized.
Unexpected server-side error occurred.
- application/json
- Schema
Schema
- string byte
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://apis.<domain>/iot/http/channels/:id/messages/:subtopic' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '[
{
"bn": "string",
"bt": 0,
"bu": 0,
"bv": 0,
"n": "string",
"u": "string",
"v": 0,
"vs": "string",
"vb": true,
"vd": "string",
"s": 0,
"t": 0
}
]'