Local DWS API Reference#

The Diagnostic Web Server (DWS) provides local HTTP API access to BrightSign players for diagnostics and control.

Enabling DWS#

Sub EnableDWS()
    nc = CreateObject("roNetworkConfiguration", 0)
    nc.SetupDWS({
        password: "your-secure-password"
    })
End Sub

Or via registry:

reg = CreateObject("roRegistrySection", "networking")
reg.Write("dwse", "true")     ' Enable DWS
reg.Write("dwsp", "password") ' Set password
reg.Flush()

Base URL#

http://{player-ip}/api/v1/

Authentication#

DWS uses HTTP Digest Authentication:

1
2
3
4
5
const response = await fetch('http://192.168.1.100/api/v1/info', {
    headers: {
        'Authorization': 'Digest username="admin", ...'
    }
});

System Information#

Get Device Info#

GET /info Digest Auth

Response:

1
2
3
4
5
6
7
{
    "serial": "D3A8C1234567",
    "model": "XT1144",
    "firmware": "9.0.123",
    "uptime": 86400,
    "timezone": "America/Los_Angeles"
}

Get Storage Info#

GET /storage Digest Auth

Response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "devices": [
        {
            "path": "SD:",
            "size": 32000000000,
            "used": 15000000000,
            "free": 17000000000
        }
    ]
}

Control Operations#

Reboot Player#

PUT /control/reboot Digest Auth

Factory Reset#

PUT /control/factory-reset Digest Auth

Warning: This erases all content and settings.

Files#

List Files#

GET /files/{path} Digest Auth

Download File#

GET /files/{path}?download=true Digest Auth

Upload File#

PUT /files/{path} Digest Auth

Delete File#

DELETE /files/{path} Digest Auth

Logs#

Get Log Files#

GET /logs Digest Auth

Response:

1
2
3
4
5
6
7
{
    "logs": [
        "BrightSignLog.0.txt",
        "BrightSignLog.1.txt",
        "SystemLog.txt"
    ]
}

Download Log#

GET /logs/{filename} Digest Auth

Screenshots#

Capture Screenshot#

GET /snapshot Digest Auth

Returns PNG image data.

Registry#

Read Registry Section#

GET /registry/{section} Digest Auth

Write Registry Key#

PUT /registry/{section}/{key} Digest Auth
1
{ "value": "new-value" }

Network#

Get Network Status#

GET /network Digest Auth

Response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
    "interfaces": [
        {
            "name": "eth0",
            "type": "ethernet",
            "ip": "192.168.1.100",
            "mac": "00:11:22:33:44:55",
            "connected": true
        }
    ]
}

Example: DWS Client#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class DWSClient {
    constructor(host, password) {
        this.baseUrl = `http://${host}/api/v1`;
        this.auth = { username: 'admin', password };
    }

    async request(method, endpoint, body = null) {
        const options = {
            method,
            headers: {
                // Digest auth headers would be computed here
            }
        };

        if (body) {
            options.body = JSON.stringify(body);
            options.headers['Content-Type'] = 'application/json';
        }

        const response = await fetch(`${this.baseUrl}${endpoint}`, options);
        return response.json();
    }

    async getInfo() {
        return this.request('GET', '/info');
    }

    async reboot() {
        return this.request('PUT', '/control/reboot');
    }

    async getScreenshot() {
        const response = await fetch(`${this.baseUrl}/snapshot`);
        return response.blob();
    }
}
BrightScript Tip
DWS is disabled by default for security. Only enable it on trusted networks and always use a strong password.