Device.info
Description
Retrieve the descriptor of the device with the given uuid. The descriptor contains all the information of the device that Lhings needs to communicate with it, specially its actions, events, and state variables. Notice that Device.info provides more information than the specified by the device in Device.setDescriptor. The additional information is mostly used internally by Lhings and can be safely ignored.
Request specification
- Method: GET
- URL:
/devices/{uuid}
Example Request
- Request URL:
https://www.lhings.com/laas/api/v1/devices/11111111-2222-3333-4444-555555555555/
- Request headers:
X-Api-Key: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
- Request method: GET
Example Response
- HTTP status: 200 OK
- Response body:
{ "stateVariableList" : [ { "name" : "status", "modifiable" : null, "type" : "string" } ], "icon" : "/icons/icon.png", "modelName" : "Java Virtual Device", "manufacturer" : "Lyncos", "deviceType" : "javavirtualdevice", "serialNumber" : "0017880a54ce", "friendlyName" : "testDev-8390770877511190198", "uuid" : "82f34fb1-4f52-4273-9f9a-0acf3a6c907b", "actionList" : [ { "name" : "action1", "description" : "dummy action", "inputs" : [ { "name" : "arg1", "type" : "integer", "relatedStateVariable" : null }, { "name" : "arg2", "type" : "boolean", "relatedStateVariable" : null } ], "controlURL" : "/api/v1/devices/82f34fb1-4f52-4273-9f9a-0acf3a6c907b/action1", "internal" : false } ], "eventList" : [ { "name" : "hello", "description" : null } ], "version" : 1 }
Error summary
- 200: success.
- 401: Api key not provided or invalid.
- 404: given uuid does not match any installed device.