Device speedtest
POST
/api/v1/integrations/devices/{serial_number}/speedtestIntegration APIRuns a speedtest on the device by publishing an MQTT command and waiting for a response. The account is resolved from the Bearer token; the device must belong to that account.
Authentication
Bearer access tokenContent-Type
application/jsonPath parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
serial_number | string | Yes | Device serial number. |
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <access_token> | Yes |
Content-Type | application/json | Yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
interface | string | Yes | Network interface to test (passed through to the device speedtest command). |
timeout | integer | No | How long to wait for the device response (seconds). |
Responses
| HTTP | Description |
|---|---|
| 200 | JSON body `{ "success": <bool>, "result": <object> }` from the device response (not wrapped in `ApiResponse`). |
| 401 | Unauthorized — invalid or missing Bearer token. |
| 404 | Account could not be resolved or device not found (`ApiResponse`, `success: false`). |
| 500 | Unexpected failure or MQTT error (`ApiResponse`, `success: false`). |
| 504 | No response from device within the timeout (`ApiResponse`, e.g. `"Device did not respond to speedtest command"`). |
Example
Success shape (200)
The result object is defined by your device firmware and MQTT handler; treat keys as examples only.
Last updated on