Devices List

Get list of user devices including devices shared with user.

This API let your app fetch list of user devices. This list also includes devices that are shared with user.

List Devices API

GET https://api.goodlife.pk/v1/devices

This API call returns JSON response

Headers

NameTypeDescription

appid

string

This is App ID you received after your app is approved.

x-access-key

string

This is API Key you received from the user.

{
  "error": 0,
  "devices": [
    {
      "id": "Device Unique ID",
      "name": "Device Name",
      "asset": {
        "name": "Asset Name"
      },
      "user": {
        "name": "Name of the User"
      }
    },
    {
      ...
    }
  ]
}

Error Response

In case of error, your app will receive error response in JSON format with error=1 and description of error in msg="error message"

{"error":1,"msg":"Error detail"}

Last updated