KKonsol Developers

List devices

GET
/integration/v1/devices

Lists the devices your integration key can reach. Every page can be read and total_count is exact, so you can load the whole fleet.

Filter by status, or by trading with trading_id or trading_external_ref. Find one device by its serial number with device_identifier, or sort by -updated_at to see the most recently changed first.

Authorization

integrationKey
headerAuthorizationBearer <token>

Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>. Konsol issues it.

Query Parameters

page?integer
Range1 <= value
Default1
limit?integer
Range1 <= value <= 100
Default20
device_identifier?string

The device's serial number, matched exactly.

Length1 <= length <= 128
status?string
Value in"not_activated""activated""suspended""decommissioned"
trading_id?string

Devices currently assigned to this trading, as trading_ids lists them.

Formatuuid
trading_external_ref?string

The trading by your identifier for it, matched exactly; none matching is an empty page.

Match^\S(.*\S)?$
Length1 <= length <= 128
sort?string

Orders by a field, ascending, or descending with a - prefix. Ties break on id. Without it the list is in id order.

Value in"created_at""-created_at""updated_at""-updated_at""device_identifier""-device_identifier""status""-status""activated_at""-activated_at"

Response Body

A page of devices

application/json
  1. response
data*array<>
page*integer
Range1 <= value
limit*integer
Range1 <= value <= 100
total_count*integer

Exact count of matching devices.

Range0 <= value
total_is_capped*boolean

Always false.

total_pages*integer
Range0 <= value
has_more*boolean
Example Request
curl -X GET 'https://api.konsol.my/integration/v1/devices'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "device_identifier": "string",      "display_name": "string",      "status": "not_activated",      "activated_at": "2019-08-24T14:15:22Z",      "trading_ids": [        "f974492b-bfc0-4d85-99be-88d5e8ec0ac6"      ],      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "page": 1,  "limit": 1,  "total_count": 0,  "total_is_capped": true,  "total_pages": 0,  "has_more": true}