Skip to main content

Online devices

Applies to: API integrators with third-party API access.

Use Content-Type: application/json and optionally X-Locale: en. The third-api-token header is required. See common headers and error handling.

Brief Description

  • Query the number of currently online / offline devices and the total number of devices within the caller's visible scope.
  • Also returns the concrete device code lists for online and offline devices.
  • Data scope follows the user identity and selected groupId in the token (same visible device set as device list / devicePage).
  • A device is online when its main controller is online. Devices without an online flag are counted as offline.
  • Relationship: onlineCount + offlineCount = totalCount.

Request URL

  • https://{GATEWAY_HOST}/third-center-web/openapi/v1/phamboxDashboard/activeKiosks

Request Method

  • POST

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
third-api-tokenYesOpenAPI access token
X-LocaleNoRecommended: en

Parameters

  • No request body

Response Example

{
"code": 200,
"msg": "success",
"enMsg": null,
"data": {
"onlineCount": 2,
"offlineCount": 3,
"totalCount": 5,
"onlineDeviceCodeList": [
"D001",
"D003"
],
"offlineDeviceCodeList": [
"D002",
"D004",
"D005"
]
}
}

Response Parameter Description

Response data: object on success. An empty visible scope returns zero counts and empty device-code arrays.

Errors: data may be null, a string or an array of messages. Check the HTTP status and code before reading success data. See error handling.

Response data:

Parameter NameTypeDescription
onlineCountlongNumber of currently online devices
offlineCountlongNumber of currently offline devices
totalCountlongTotal number of devices in the visible scope
onlineDeviceCodeListarray[string]Device codes that are currently online
offlineDeviceCodeListarray[string]Device codes that are currently offline

Remarks

  • This is a real-time snapshot endpoint; it does not accept a time-range filter.
  • Empty visible scope returns zeros and empty lists:
    • onlineCount=0, offlineCount=0, totalCount=0
    • onlineDeviceCodeList=[], offlineDeviceCodeList=[]