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
groupIdin 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| third-api-token | Yes | OpenAPI access token |
| X-Locale | No | Recommended: 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 Name | Type | Description |
|---|---|---|
| onlineCount | long | Number of currently online devices |
| offlineCount | long | Number of currently offline devices |
| totalCount | long | Total number of devices in the visible scope |
| onlineDeviceCodeList | array[string] | Device codes that are currently online |
| offlineDeviceCodeList | array[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=0onlineDeviceCodeList=[],offlineDeviceCodeList=[]