Device.list

Description

Returns a list of the devices that belong to the user account used to authenticate the request.

Request specification

  • Method: GET
  • URL:
    • /devices: name and uuid of each device will be provided in the list returned. Name is the human readable name of the device and the uuid is its unique identifier in Lhings.
    • /devices?verbose=true: name, uuid, type, iconurl and online are provided. Type is a string that tells about the kind of device, iconurl is an url where an image that represents the kind of device is, and online tells if the device is online or not.

Example Request

  • Request URL: https://www.lhings.com/laas/api/v1/devices/?verbose
  • Request headers: X-Api-Key: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  • Request method: GET

Example Response

  • HTTP status: 200 OK
  • Response body:
    [
    {
    "uuid": "87c41d45-7eab-40da-9f33-e86f086b08c9",
    "name": "thermometer",
    "type": "Acme Sensor",
    "iconurl": "https://example.com/icon.png",
    "online": true
    },
    {
    "uuid": "f4b35ee9-5cd8-487a-b47d-da8afdae46a6",
    "name": "alarm clock",
    "type": "Acme Clock",
    "iconurl": "https://example.com/icon.png",
    "online": true
    }
    ]

Error summary

  • 200: success.
  • 401: Api key not provided or invalid.
Back to top