Difference between revisions of "Mbed/mbed Device Connector"

From ESS-WIKI
Jump to: navigation, search
(mbed connector api console part 1)
(mbed connector api console rest request)
Line 38: Line 38:
  
 
[[File:mbed_connector_apiConsole.png|800px]]
 
[[File:mbed_connector_apiConsole.png|800px]]
 +
 +
 +
For example, you can send a request to GET the data of resources exposed in your device. First, select '''endpoint''' (device) and '''resource-path''' (see "53b4decc-eb52..." and "/3304/0/5700" in example image below). Then click '''TEST API'''.
 +
 +
[[File:mbed_connector_restRequest.png|800px]]
 +
 +
 +
Then check the result of your request in '''Response''' area. The data of this requested resource, Humidity value (/3304/0/5700), is reported in "payload" field in Base64 format.
 +
 +
 +
[[File:mbed_connector_restRequestResult.png|800px]]

Revision as of 04:00, 20 July 2016

Introduction

ARM mbed Device Connector provides a service for mbed developer to connect mbed device to mbed cloud. The service makes IoT device messaging, provisioning and updates available to other software, web applications and cloud through easily-integrated REST APIs.

Account and Security Key

Create your account and login. In Dashboard you can see information about your device and security related topics.


Mbed connector dashboard.png


Security credentials

Click Security credentials under My Devices, then click GET MY DEVICE SECURITY CREDENTIALS.


Mbed connector securityCredentials.png


The security credential required for your device to successfully register to mbed connector service is created. Copy and paste all the content to 'security.h' file in your mbed client source tree.


Access keys

Click Access keys under My Applications, then click CREATE NEW ACCESS KEY to create access key for your application in order to connect to mbed Device Connector REST API.


Mbed connector accessKey.png


API Console

After connecting mbed device to mbed Device Connector, confirm it by checking Connected Devices under My Devices.


Mbed connector connectedDevice.png


Then go to API Console under Device Connector. API Console lets you simulate your application requests against mbed Device Connector REST API.


Mbed connector apiConsole.png


For example, you can send a request to GET the data of resources exposed in your device. First, select endpoint (device) and resource-path (see "53b4decc-eb52..." and "/3304/0/5700" in example image below). Then click TEST API.

Mbed connector restRequest.png


Then check the result of your request in Response area. The data of this requested resource, Humidity value (/3304/0/5700), is reported in "payload" field in Base64 format.


Mbed connector restRequestResult.png