Phone Server API Reference
By launching the internal API Node Host (Phone Web Server), the sandboxed emulator environment exposes a localized TCP socket port (typically 8080), allowing remote stations or browsers to monitor and tweak sandbox settings programmatically.
GET /api/status
Fetches current variables like connection headers, server status details, CORS origins, and lock statuses.
curl -i http://127.0.0.1:8080/api/status
Example Header and JSON Payload response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
{
"serverFriendlyName": "OP-TECH Remote Hub",
"isCorsEnabled": true,
"isReadOnlyMode": false,
"maxLogsCount": 50,
"activeConnections": 1,
"isSandboxActive": true
}
POST /api/config
Updates operational parameters of the Phone Web Server. Accepts raw JSON body input strings.
curl -X POST \
-H "Content-Type: application/json" \
-d '{"serverFriendlyName": "Alpha Station", "isCorsEnabled": true, "maxLogsCount": 75}' \
http://127.0.0.1:8080/api/config
Expected Response:
{
"status": "success",
"message": "Configuration updated successfully."
}
Sandbox Security & Read-Only Locks
To ensure host security is maintained, the API Server features a robust, toggleable **Read-only Mode (Sandbox Write Lock)**.
When Read-only Mode is active, all state-mutating API actions return HTTP 403 Forbidden with security errors:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"error": "Write Denied: Server is currently locked in Read-only Active Sandbox Mode."
}
To toggle Read-only constraints off or on, open the physical **System Toolboxes (Offline Tools)** in the emulator apps suite and toggle the corresponding master lock switch.