REST API

1. Overview

The QoE REST API provides programmatic access to device monitoring and alarm data. All endpoints are served under the /api base path and return JSON responses.

The API is documented with OpenAPI 3.0 (Swagger). The interactive Swagger UI is available at:

http://<host>:<port>/qoeUI/swagger-ui.html
The Swagger UI and the OpenAPI document (/qoeUI/v3/api-docs) are part of the dashboard, not of the REST API. They need a logged-in UI session with the ADMIN role: an anonymous request is redirected to the login page, and a user with the USER role gets 403. The credentials in the request body and the JWT described under Authentication do not open them; the REST API itself is authenticated as described there. An integrator gets the specification by logging in to the dashboard as an administrator in a browser and either using the Swagger UI or downloading http://<host>:<port>/qoeUI/v3/api-docs from that same browser session.

2. Authentication

What is checked depends on the endpoint group. Spring Security lets /rest/api/ and /qoe/ through without a login; the checks below are done by the application itself.

Device REST API (/api/System/Token, /api/Device/*)
  • The endpoints are reachable as /qoeUI/rest/api/…​ without a dashboard login. The same controllers are also mapped as /qoeUI/api/…​; that path needs a dashboard session with the USER or ADMIN role, or a JWT as below.

  • POST /api/System/Token checks the creator field and the SHA-256 hash of the password in the request body against the user accounts, and answers with a JWT (also in the Authorization: Bearer <token> response header). The token is signed with QOE_JWT_SECRET and expires.

  • /api/Device/Parameter and /api/Device/Alarms accept that JWT in the Authorization: Bearer <token> request header (on /api/…​ and /rest/api/…​). Without a usable identity — no token, an invalid or expired one, a token of a disabled user — they fall back to the creator and SHA-256 password hash in the request body; wrong credentials are rejected.

  • A valid token is trusted instead of the body credentials: when it is present the body is not checked.

Control API (/qoe/**)
  • /qoeUI/qoe/monitor/save, /qoe/cpe/, /qoe/monitoring/ and /qoe/control/* check nothing: no session, no JWT, no body credentials, neither in the security filter chain nor in the controllers. Anyone who can reach the port can call them; see the warning in the installation guide on keeping this path off untrusted networks.

  • The OpenAPI document declares a Bearer JWT scheme on these endpoints as well. That is only a description; the server does not enforce or read a token there.

3. Device Parameter Data

Retrieves device information along with monitored parameter data.

3.1. Request

Method

POST

Path

/api/Device/Parameter

Content-Type

application/json

3.2. Request Body

{
  "creator": "username",
  "password": "sha256-hashed-password",
  "serial": "device-serial-number",
  "parameters": ["param1", "param2"]
}

3.3. Response

Returns ApiResponseMonitoredData containing device details and monitored parameter values.

3.4. Status Codes

Code Description

200

Request processed successfully

401

Authentication failed

500

Internal server error

4. Device Alarms Data

Retrieves device information along with alarm data.

4.1. Request

Method

POST

Path

/api/Device/Alarms

Content-Type

application/json

4.2. Request Body

{
  "creator": "username",
  "password": "sha256-hashed-password",
  "serial": "device-serial-number"
}

4.3. Response

Returns ApiResponseAlarmsData containing device details and alarm information.

4.4. Status Codes

Code Description

200

Request processed successfully

401

Authentication failed

500

Internal server error

← Back | Main Page