REST API Reference
The TR-069 Emulator exposes two REST controllers. Both are served on the same host/port (8555) and documented interactively in Swagger UI.
Overview
| Base path | UI mode | Purpose |
|---|---|---|
|
Configure and run a batch of emulated CPEs; device-level speed/WiFi/invoke helpers. |
|
|
Full per-device lifecycle: start/stop individual devices, browse and edit the parameter tree, trigger events, read logs. MCP-friendly. |
Base URLs
http://localhost:8555/api # Load Test controller http://localhost:8555/apiV2 # Single Mode controller
Interactive Documentation
http://localhost:8555/swagger-ui.html # Swagger UI http://localhost:8555/v3/api-docs # OpenAPI 3 spec (JSON)
For a lightweight liveness check use GET /api/status (returns 200 with Running/Stopped) or GET /apiV2/activeEmulators. The Spring Boot Actuator endpoints (/actuator/**) are not exposed by the running service.
Load Test API (/api)
Backs Load Test Mode. The emulator keeps one shared configuration (the EmulatorParameter set, persisted to start_params.properties); Start launches a batch from it.
Configuration & Status
| Method & Path | Description | Body / Response |
|---|---|---|
|
Get the current emulator configuration |
Response: EmulatorPropertiesDto |
|
Update the configuration (ACS, batch size, options) and persist it |
Body: EmulatorPropertiesDto → |
|
Current run status |
|
|
Get the periodic-inform interval |
Response: |
|
Set the periodic-inform interval (seconds) |
Body: |
Lifecycle
| Method & Path | Description | Body / Response |
|---|---|---|
|
Start the configured batch |
no body → |
|
Stop the batch |
no body → |
|
Stop the batch, optionally clearing caches |
Body: |
Device Actions
All take a serial body: { "serial": "SERIAL001" }.
| Method & Path | Description |
|---|---|
|
Trigger a |
|
Apply a 3-second speed delay to the device |
|
Clear the speed delay for the device |
|
Reset WiFi parameters (channel and SNR) for the device |
Parameter Tree Files
| Method & Path | Description | Body / Response |
|---|---|---|
|
List XML files in |
Response: |
|
Get the active device-tree file |
Response: |
|
Set the active device-tree file (reloads the tree) |
Body: |
|
Upload an XML file (form field |
|
|
Delete an XML file (not the active one) |
Body: |
Single Mode API (/apiV2)
Backs Single Emulator Mode. Operations are per device, addressed by serial. Designed to be automation/MCP friendly.
Configuration
| Method & Path | Description | Body / Response |
|---|---|---|
|
Frontend config (default ACS URL) |
Response: |
Device Lifecycle
| Method & Path | Description | Body / Response |
|---|---|---|
|
Start a new device. Query |
Body: InitDeviceDto → |
|
Stop and remove a running device |
Body: |
|
List running devices |
Response: array of |
|
Is the device running? |
Response: |
|
Is the device in an active TR-069 session? |
Response: |
|
Reset uptime and fire a |
Body: |
|
Restart from stored config and fire |
Body: |
|
Copy a device config to a new serial |
Body: |
|
TR-069 DeviceId (Manufacturer, OUI, ProductClass, SerialNumber, …) |
Response: string map |
|
Overall counts |
Response: |
Stored Devices
| Method & Path | Description | Body / Response |
|---|---|---|
|
List saved configurations |
Response: array of InitDeviceDto |
|
Get one saved configuration |
Response: InitDeviceDto ( |
|
Save a configuration without starting |
Body: InitDeviceDto → |
|
Delete a saved configuration |
Body: |
|
Start from a saved configuration |
Body: |
|
Start from a base tree in |
Body: |
Parameter Operations
| Method & Path | Description | Body / Response |
|---|---|---|
|
Full parameter tree (can be large) |
Response: array of |
|
Parameters under a path prefix |
Response: array of ParameterInfo |
|
Names under a path (TR-069 GetParameterNames). |
Response: array of |
|
Single value lookup |
Response: |
|
Full metadata for one parameter |
Response: ParameterInfo ( |
|
Existence check; |
Response: |
|
Search by name/value (default |
Response: array of ParameterInfo |
|
Set one value (no ValueChange event) |
Body: |
|
Set many values; fires ValueChange if any has active notification |
Body: |
|
Set one value the way a real CPE does; fires a |
Body: |
|
Set notification level: |
Body: |
|
Add an object instance (e.g. a new SSID) |
Body: |
|
Add one parameter; type/writable/notification resolved from the CWMP template |
Body: |
|
Delete an object/branch and everything under it |
Body: |
Events
| Method & Path | Description | Body / Response |
|---|---|---|
|
Trigger a TR-069 event (see TR-069 Event Codes) |
Body: |
|
Set the periodic-inform interval (seconds; |
Body: |
Logs
| Method & Path | Description | Body / Response |
|---|---|---|
|
Download the full log file |
|
|
Log content for live viewing; supports incremental reads |
|
|
Log counts |
Response: |
|
Clear the device log |
Body: |
Updatable Parameters & Tree Files
| Method & Path | Description | Body / Response |
|---|---|---|
|
Get the device’s auto-update list |
Response: array of Parameter |
|
Set the device’s auto-update list |
Body: |
|
List available parameter-tree templates |
Response: |
|
Upload a parameter-tree XML (form field |
|
TR-069 Event Codes
Used by POST /apiV2/invoke (eventName, case-sensitive — use the exact names below). See also Protocol Support — Event Codes.
| Event Name | Code | Meaning |
|---|---|---|
|
0 |
Initial setup / factory reset |
|
1 |
Device reboot |
|
2 |
Scheduled inform |
|
4 |
Parameter with active notification changed |
|
6 |
ACS-initiated connection request |
|
7 |
Download/upload completed |
|
8 |
Diagnostics complete |
|
11 |
Deployment-unit state change complete |
The Single Mode Invoke Event dropdown exposes codes 0, 1, 2, 4, 6, 7, 8. DUStateChangeComplete (11) can only be triggered through this API, not from the dropdown.
|
Data Models
EmulatorPropertiesDto (/api)
Mirrors the EmulatorParameter set. Used by GET/POST /api/properties.
| Field | Type | Example | Description |
|---|---|---|---|
|
string |
|
ACS protocol ( |
|
string |
|
ACS host |
|
integer |
|
ACS port |
|
string |
|
ACS URL path |
|
integer |
|
Number of device groups |
|
integer |
|
Devices per group |
|
integer |
|
Registration group id |
|
integer |
|
Delay between registrations (ms) |
|
integer |
|
Startup spread |
|
string |
`` |
Scheduled start ( |
|
boolean |
|
Enable periodic inform |
|
boolean |
|
Enable Connection Request listener |
|
boolean |
|
Skip the initial inform |
|
boolean |
|
Randomise retry counts |
|
boolean |
|
Emulate Download/Upload transfers |
|
string |
|
Transfer delay(s) |
|
boolean |
|
Lightweight (inform-only) mode |
|
boolean |
|
Per-device file logging |
|
string |
|
Active parameter-tree file |
|
integer |
|
GetParameterValues execution delay (s) |
|
integer |
|
SetParameterValues execution delay (s) |
|
integer |
|
GetParameterNames execution delay (s) |
|
integer |
|
GetParameterAttributes execution delay (s) |
|
integer |
|
SetParameterAttributes execution delay (s) |
|
integer |
|
AddObject execution delay (s) |
|
integer |
|
DeleteObject execution delay (s) |
|
integer |
|
Download execution delay (s) |
|
integer |
|
Upload execution delay (s) |
|
integer |
|
Reboot execution delay (s) |
|
integer |
|
FactoryReset execution delay (s) |
|
integer |
|
ChangeDUState (TR-157) execution delay (s) |
|
integer |
|
GetRPCMethods execution delay (s) |
|
Task execution delays hold the emulated CPE for the given number of seconds before it
processes each ACS-issued RPC, modelling real-CPE "thinking time". The default is |
InitDeviceDto (/apiV2)
Used by start, saveDevice, cloneDevice and the storedDevices responses.
| Field | Type | Example | Required | Description |
|---|---|---|---|---|
|
string |
|
Yes |
Unique device serial |
|
string |
No |
ACS URL (defaults to |
|
|
string |
|
No |
Tree file from |
|
boolean |
|
No |
Start the per-device CR listener |
|
array |
see Parameter |
No |
Auto-updating parameters |
|
boolean |
|
No |
Managed by the system |
Parameter (auto-update entry)
| Field | Type | Description |
|---|---|---|
|
string |
Full parameter path |
|
|
Data type (default |
|
|
Update mode (default |
|
integer |
Value range (numeric types) |
|
integer |
Step size for increment/decrement |
|
string[] |
Optional fixed value set |
Error Handling
Standard HTTP status codes are used:
| Status | Meaning |
|---|---|
|
Success with a response body |
|
Success, no body (most mutations) |
|
Invalid parameters or file |
|
Device, parameter or stored config not found |
|
Operation conflicts with current state (e.g. already running, device in session) |
|
Unexpected server error |
Error responses, where a body is returned, use:
{ "error": "Error message description" }