Skip to content

Publish data to Platform

We will use a simple tool Postman app as a simulated device to publish data to West Connectivity

Prerequisite

  1. Go through Provision the device and Define the data format to create a device and resource
  2. Install the Postman app
  3. Add a collection and add a request using Postman app Add a collection and add a request

Publish data

On Connector page, copy the connector URL by click link icon.

Copy connector link

The data publish API of HTTP is /api:v1/stack/alias The full request URL should be <connector URL>//api:v1/stack/alias,
(ex: https://u1iak1nbjna000000.m2.iot.westpharma.com/api:v1/stack/alias).

Fill in the request URL on Postman app and choose request method "POST".

Fill in the request URL

Add a header with value Authorization: Token <device-credential>

Add a header

Note

The device-credential is the credential you got following Provision the device

Add a x-www-form-urlencoded argument named "temperature" with value "33" in Body.

Add an argument

Click Send button, you would receive a response code 204 representing the data has been published on platform.

Receive a response code

You also can check the data on device page.

Resource value

Next: You can Review and retrieve the data