Device.startSession

Description

Used to tell Lhings that the specified device is available. After calling this service Lhings marks the device as online and it will send actions, status requests or any other kind of message to the device.

Request specification

  • Method: PUT
  • URL: /devices/{uuid}/states/online

Example Request

  • Request URL: https://www.lhings.com/laas/api/v1/devices/11111111-2222-3333-4444-555555555555/states/online
  • Request headers: X-Api-Key: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee Content-Type: application/json
  • Request method: PUT
  • Request body:
    {"name":"online", "value":true}

Example Response

  • HTTP status: 200 OK
  • Response body:
    {"responseStatus":200,"message":"OK"}

Error summary

  • 200: success.
  • 400: bad request. Usually caused by a wrong syntax in the JSON request body.
  • 401: Api key not provided or invalid.
  • 404: given uuid does not match any installed device.
Back to top