Devices

Read

GET https://interay.io/api/v1/devices/get

Read device details

type

object

properties

  • device

The device unique identifier. Device Unique ID / Device External key

type

string (UUID) / string

Response

type

object

properties

  • uid

Unique ID

type

string (UUID)

  • enabled

Enabled

type

boolean

  • name

Name

type

string

  • key

External key

type

string

Example request

GET https://interay.io/api/v1/devices/get?device=00000000-0000-0000-0000-000000000000
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example response

200 OK
Content-Type: application/json
{
        "displayName": "Docs (docs)",
        "key": "docs",
        "uid": "00000000-0000-0000-0000-000000000000",
        "enabled": true,
        "link": "https://interay.io/admin/devices/00000000-0000-0000-0000-000000000000",
        "name": "Docs"
}

Read List

GET https://interay.io/api/v1/devices/list

Read devices details

type

object

properties

  • entity

The parent unique identifier. Product Unique ID / Location Unique ID

type

string (UUID)

  • i

Zero-based result index (pagination offset)

type

number

default

0

  • l

Maximum number of results (pagination limit)

type

number

default

unlimited

  • q

Search query

type

string

Response

type

array

items

type

object

properties

  • uid

Unique ID

type

string (UUID)

  • enabled

Enabled

type

boolean

  • name

Name

type

string

  • key

External key

type

string

Notes

  1. All devices are listed in the result when no entity or q is specified.

  2. Search query is partially matching the device name, key or parent name.

Example request

GET https://interay.io/api/v1/devices/list
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example response

200 OK
Content-Type: application/json
[
        {
                "displayName": "Docs (docs)",
                "key": "docs",
                "uid": "00000000-0000-0000-0000-000000000000",
                "enabled": true,
                "link": "https://interay.io/admin/devices/00000000-0000-0000-0000-000000000000",
                "name": "Docs"
        }
]

Write

POST https://interay.io/api/v1/devices/set

Write device details

type

object

properties

  • device

The device unique identifier. Device Unique ID / Device External key

type

string (UUID) / string

  • values

The device details

type

object

properties

  • enabled

Enabled

type

boolean

  • name

Name

type

string

  • key

External key

type

string

Notes

  1. Only specified details with a different value are overwritten. Existing non-specified details are preserved.

Example request

POST https://interay.io/api/v1/devices/set
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
        "device": "00000000-0000-0000-0000-000000000000",
        "values": {
                "enabled": true,
                "name": "Docs",
                "key": "docs"
        }
}

Example response

200 OK