REST API

Revision for “REST API” created on February 20, 2015 @ 08:52:34

Title
REST API
Content
Each IoT Resource provides an easy-to-use REST interface to retrieve data about the resource and it is current state. It is also possible to invoke actions. <h3>Retrieving Services</h3> By providing the endpoint and the keyword <em>services </em>it is possible to retrieve all services offered.<a href="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST1.png"><img class="aligncenter wp-image-461 size-large" src="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST1-1024x498.png" alt="resourceREST1" width="620" height="302" /></a> <h3>Retrieving Statevariables</h3> Supplying the service name and the keyword statevariables will list all statevariables associated with the service. is <a href="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST2.png"><img class="size-medium wp-image-462 aligncenter" src="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST2-300x146.png" alt="resourceREST2" width="300" height="146" /></a> <h3>Checking Statevariable Values</h3> <a href="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST3.png"><img class="size-medium wp-image-463 aligncenter" src="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST3-300x66.png" alt="resourceREST3" width="300" height="66" /></a> <h3>Retrieving Actions</h3> <a href="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST4.png"><img class="size-medium wp-image-464 aligncenter" src="http://www.iotworldservices.com/wp-content/uploads/2014/12/resourceREST4-300x189.png" alt="resourceREST4" width="300" height="189" /></a> <h3>Invoking Actions</h3> Actions can be invoked using parameters following the syntax action?param1=X&amp;param2=Y <h3>Summary</h3> <table> <tbody> <tr> <td width="481">http://&lt;endpoint&gt;/services</td> <td width="481"> Retrieves all services offered by the IoTResource</td> </tr> <tr> <td width="481">http://<span style="text-decoration: underline;"><span style="color: #0066cc;">&lt;endpoint&gt;</span></span>/services/&lt;name&gt;</td> <td width="481">Retrieves all state variables associated with the service</td> </tr> <tr> <td width="481">http://<span style="text-decoration: underline;"><span style="color: #0066cc;">&lt;endpoint&gt;</span></span>/services/&lt;name&gt;/statevariables</td> <td width="481">Retrieves the current value of all state variables</td> </tr> <tr> <td width="481">http://<span style="text-decoration: underline;"><span style="color: #0066cc;">&lt;endpoint&gt;</span></span>/services/&lt;name&gt;/statevariables/&lt;name&gt;</td> <td width="481">Retrieves the value of a specified state variable</td> </tr> <tr> <td width="481">http://<span style="text-decoration: underline;"><span style="color: #0066cc;">&lt;endpoint&gt;</span></span>/services/&lt;name&gt;/actions</td> <td width="481">Retrieves all actions that can be performed on the IoTResource</td> </tr> <tr> <td width="481">http://<span style="text-decoration: underline;"><span style="color: #0066cc;">&lt;endpoint&gt;</span></span>/services/&lt;name&gt;/actions/&lt;name&gt;?param1=X&amp;param2=Y</td> <td width="481">Invokes an action with or without parameters.</td> </tr> </tbody> </table>
Excerpt


OldNewDate CreatedAuthorActions
February 20, 2015 @ 08:52:34 admin
December 18, 2014 @ 13:42:08 Peter Rosengren
December 18, 2014 @ 13:41:09 Peter Rosengren
December 18, 2014 @ 13:37:50 Peter Rosengren
December 18, 2014 @ 13:25:02 Peter Rosengren
December 18, 2014 @ 13:24:49 Peter Rosengren
December 18, 2014 @ 13:23:37 Peter Rosengren
December 18, 2014 @ 13:21:00 Peter Rosengren
December 18, 2014 @ 13:20:40 Peter Rosengren
December 14, 2014 @ 21:59:25 Peter Rosengren