Send device data via HTTP
This page shows you how to send data via a HTTP client to the Bosch IoT Hub. As exemplary device the Swagger UI of the Bosch IoT Suite API Docs is used.
Your are logged in to the Bosch IoT Hub - HTTP adapter. Refer to Login to Bosch IoT Hub - HTTP adapter
Send telemetry messages
Make sure that you have a connected consumer. Otherwise you will receive a 503 Service Unavailable HTTP response.
Navigate to the telemetry section selecting the POST operation.
Press the Try it out button.
For your first tries you can leave the request body as is. The example uses JSON for ease of use. Bosch IoT Hub does not make any restrictions regarding content type. You can use whatever fits your use-case and applications best.
Finally run the request by hitting the Execute button.
Verify that the request was successful (Code 202).
Now your consumer application should receive the message that was forwarded by the Bosch IoT Hub.
Send event messages
Sending event messages works exactly the same way like sending telemetry messages except for two differences:
- Use the POST operation of the event section.
- Make sure the consumer application is listening for event messages.