Note
The REST network only allows publishing messages.
Your opinion helps us make a better documentation.
IoT Hub allows you to configure and use REST networks for your IoT applications.
To complete the actions presented below, you must have:
The REST network only allows publishing messages.
Keep this information, you need it to use your REST network.
Any HTTP client can be used to publish a message through a REST network. The required headers are:
X-Secret
: The network secret that was given while creating the network on a hub.X-Topic
: The topic that the message should be published on.Following an example using curl:
> curl -XPOST -H "X-Secret: <network-secret>" -H "X-Topic: <topic>" -d <payload> <network-endpoint>
Use the following values:
<network-secret>
: Enter here the network secret that was given when you created the network on your hub.<network-endpoint>
: Enter here the network endpoint that was given when you created the network on your hub.<topic>
: Choose here the topic that suits your needs. This topic will be prefixed with the network topic.<payload>
: Enter here the payload you want to publish (a JSON string for example).Your opinion helps us make a better documentation.