API Reference Documentation
Please read Lhings API Documentation before reading the API Reference.
Device Api
Call Name |
Description |
---|
Device.register |
Registers a new device into the platform. |
Device.setDescriptor |
Used to send to Lhings the descriptor of the device with the givenn uuid. |
Device.startSession |
Tells the platform that the device specified is ready to communicate with Lhings. |
Device.endSession |
Tells the platform that the device specified is no longer able to communicate with Lhings. |
Device.sendEvent |
Notifies that the event named eventName has been generated by the device with the given uuid. |
Management API
Device Management
Call Name |
Description |
---|
Device.delete |
Deletes the device with the given uuid. |
Device.doAction |
Commands the device with the given uuid to perform the action specified by actionName. |
Device.info |
Retrieve the descriptor of the device with the given uuid. |
Device.list |
Returns a list of the devices that belong to the user account used to authenticate the request. |
Device.status |
Retrieves the current value of the state variables of the device with the given uuid. |
Rule Management
Call Name |
Description |
---|
Rule.create |
Creates a new rule. |
Rule.delete |
Deletes the rule with the given ruleId. |
Rule.disable |
Commands Lhings to disable the rule with the given ruleId. |
Rule.enable |
Commands Lhings to enable the rule with the given ruleId. |
Rule.isEnabled |
Tells whether the rule with the given ruleId is enabled or not. |
Rule.isBroken |
Tells whether the rule with the given ruleId is broken or not. |
Rule.list |
Returns a list of all the rules that belong to the user account used to authenticate the request. |
Data API
Call Name |
Description |
---|
Status.retrieve |
Retrieves historical status data from a device between two given dates. |
Status.store |
Stores the status data provided by a device together with the timestamp when the data was generated. |
Events.retrieve |
Retrieves the number of times an event was generated between two given dates, on an hourly or daily basis. |