Send Data to the Platform from the Device

Data must be sent via HTTP or MQTT to SmartWorks IoT by creating a connection between SmartWorks IoT and the object to send the data. This connection can be created from an API.

Each Thing has a Raw History Section to store historical data.


Figure 1.
  1. Send data to store the state and the temperature of the lamp. The request should look like this:
    POST
    https://api.swx.altairone.com/spaces/your-spaceID/data  


    Figure 2.
  2. To send Data through HTTP a valid client-id and secret-id need to be provided to authenticate the request. Credentials can be found as shown below.


    Figure 3.
  3. Select the Auth section to complete the information required.


    Figure 4.
  4. Select the Body section and enter the following payload.
    {
      "lamp-state":"Ok",
      "temperature":28
    }


    Figure 5.