Remote DWS Endpoints - registry APIs
Base URL for these endpoints: https://ws.bsn.cloud/rest/v1/
_________________________________________________________________________
GET /info/
Retrieves general information about the player
Request Example
GET /rest/v1/info/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response
serial
string: The serial number of the playermodel
string: The model number of the device (e.g. "XD234")connectionType
string: The currently active network interface, which can be either "Ethernet" or "WiFi"ethernet
interfaceConfig{ }: An InterfaceConfig object containing information about the Ethernet connection. This property will only be available if there's a valid Ethernet connection on the player. The Interface Config object can contain the following properties:IPv4
ipConfig{ }: An IPConfig object containing information about the IPv4 configuration. The IPConfig object can contain the following properties:address
stringnetmask
stringfamily
stringmac
stringinternal
boolcidr
string
IPv6
ipConfig{ }: An IPConfig object containing information about the IPv6 configuration
bootVersion
string: The current version of the boot loaderfwVersion
string: The current version of firmware installed on the playerupTime
string: The amount of time (as a human-readable string) that the player has been powered on and working correctlyupTimeSeconds
int: The amount of time (in seconds) that the player has been powered on and working correctlyextensions
extension[ ]: An array of Extension objects describing Firmware Extensions currently installed on the playerblessings
blessing[ ]: An array of Blessing objects describing proprietary codecs that are currently authorized on the player
GET /time/
Retrieves the date and time as configured on the player. The date/time value is formatted as "yyyy-mm-dd hh:mm:ss <timezone>"
. This call is identical to using the Node.js® time API.
Request Example
GET /rest/v1/time/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Example
{
"route": "/v1/time",
"method": "GET",
"data": {
"result": {
"time": "2018-10-18 14:34:34 PDT",
"timezone_mins": null,
"timezone_name": "America/Los_Angeles",
"timezone_abbr": "PDT",
"year": 2018,
"month": 10,
"date": 18,
"hour": 14,
"minute": 34,
"second": 34,
"millisecond": 569
}
}
}
Endpoints:
- 1 GET /info/
- 2 GET /time/
- 3 PUT /time/
- 4 GET /video-mode/
- 5 GET /video/{:connector}/output/{:device}/
- 6 GET /video/{:connector}/output/{:device}/edid/
- 7 GET /video/{:connector}/output/{:device}/power-save/
- 8 PUT /video/{:connector}/output/{:device}/power-save/
- 9 GET /video/{:connector}/output/{:device}/modes/
- 10 GET /video/{:connector}/output/{:device}/mode/
- 11 PUT /video/{:connector}/output/{:device}/mode/
- 12 GET /logs/
- 13 GET /crash-dump/
- 14 PUT /control/reboot/
- 15 GET /control/dws-password/
- 16 PUT /control/dws-password/
- 17 GET /control/local-dws/
- 18 PUT /control/local-dws/
- 19 GET /files/{:path}/
- 20 PUT /files/{:path}
- 21 POST /files/{:path}/
- 22 DELETE /files/{:path}/
- 23 DELETE /storage/{:device_name}/
- 24 GET /re-provision/
- 25 GET /diagnostics/
- 26 GET /diagnostics/dns-lookup/{:domain_name}/
- 27 GET /diagnostics/ping/{:domain_name}/
- 28 GET /diagnostics/trace-route/{:domain_name}/
- 29 GET /diagnostics/network-configuration/{:interface}/
- 30 GET /diagnostics/network-neighborhood/
- 31 GET /diagnostics/packet-capture/
- 32 POST /diagnostics/packet-capture/
- 33 DELETE /diagnostics/packet-capture/
- 34 POST /snapshot/
- 35 GET /health/
- 36 PUT /custom/
- 37 GET /download-firmware/
- 38 GET /registry/
- 39 GET /registry/:section/:key
- 40 PUT /registry/:section/:key
- 41 DELETE /registry/:section/:key
- 42 GET /registry/recovery_url/
- 43 PUT /registry/recovery_url/
PUT /time/
Sets the date/time on the player
Request Body Parameters
time
string: The time to set on the player, formatted as"hh:mm:ss <timezone>"
date
string: The date to set on the player, formatted as"yyyy-mm-dd"
applyTimezone
bool: A flag specifying whether the date and time should be applied using the time zone configured on the player (true
) or the UTC time zone (false
)
Request Example
PUT /rest/v1/time/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 117
This is the example request body:
{
"data": {
"time": "22:00:00",
"date": "2023-11-07",
"applyTimezone": true
}
}
Response Example
A successful response would be a 200 status code with the following body:
{
"data": {
"result": true
}
}
GET /video-mode/
Retrieves the currently active video mode on the player
Request Example
GET /rest/v1/video-mode/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
width
int: The screen widthheight
int: The screen heightframes
int: The frameratescan
string: The scan method of the video signal, which can be either progressive ("p") or interlaced ("i")name
string: The full name of the video mode (a full list of modes can be found here)isAutoMode
bool: A flag indicating whether the video mode was set using auto modemode
mode{ }: A Mode object that gives additional information about the video output. This object can contain the following properties:preferred
bool: A flag indicating whether the video mode is the preferred modeoverscan
bool: A flag indicating whether the video output is using an overscan setting or notmodeName
string: The full name of the video mode (a full list of modes can be found here)interlaced
bool: A flag indicating whether the video output is interlaced (true
) or progressive (false
)width
int: The width of the video outputheight
int: The height of the video outputgraphicsPlaneWidth
int: The width of the graphics planegraphicsPlaneHeight
int: The height of the graphics planefrequency
int: The frame rate of the video outputdropFrame
bool: A flag indicating whether the video timecode utilizes drop framescolorSpace
string: The color space of the video signal ("rgb", "yuv420", or "yuv422")colorDepth
string: The color depth of the video signal ("8bit", "10bit", or "12bit")
GET /video/{:connector}/output/{:device}/
Retrieves information about the specified video output
Segments
connector
: The current value is alwayshdmi
device
: This value in /video/ URLs is currently0
for single-output Series 5 players and all Series 4 and older players. The value can be0
-3
for the XC4055, which has multiple outputs, and0
or1
for the XC2055.
Request Example
GET /rest/v1/video/hdmi/output/0/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
The following fields will be present in the response:
activeMode
: Information about the active video mode on the playerattached
bool: This value indicates if the HDMI® output is attached or notbestMode
string: The best video mode for the player. The HDMI connector must be attached because it gets details from EDID result.configuredMode
: The configured video mode on the player. This can be different than activeMode.edid
string: Returns the EDID read string of the display connected to the player. If power save is on, zeroes will be returnededid_identity
: Parses the above string in a JSON format for readability. Requires an HDMI output connected to the player and a display.modes
: List of all available video modes on the player.powerSaveStatus
bool: This value indicates the power save status of the display connected to the player.resolutions
resolutions[ ]: An array of information about the graphics, output, video resolution. Returns result values for height and width.status
:audioBitsPerSample
intaudioChannelCount
intaudioFormat
stringaudioSampleRate
inteotf
stringoutputPowered
booloutputPresent
boolunstable
bool
GET /video/{:connector}/output/{:device}/edid/
Returns the EDID information from a compatible monitor/television connected to the video output
Segments
connector
: The current value is alwayshdmi
device
: This value in /video/ URLs is currently0
for single-output Series 5 players and all Series 4 and older players. The value can be0
-3
for the XC4055, which has multiple outputs, and0
or1
for the XC2055.
Request Example
GET /rest/v1/video/hdmi/output/0/edid/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
result
string: The EDID string result
GET /video/{:connector}/output/{:device}/power-save/
Retrieves the power status of the monitor connected to the player (as reported over EDID)
Segments
connector
: The current value is alwayshdmi
device
: This value in /video/ URLs is currently0
for single-output Series 5 players and all Series 4 and older players. The value can be0
-3
for the XC4055, which has multiple outputs, and0
or1
for the XC2055.
Request Example
GET /rest/v1/video/hdmi/output/0/power-save/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
is_connected
bool: A flag indicating whether the monitor is connected to the HDMI output on the playeris_powered
bool: A flag indicating whether the monitor is on (for example, RX powered)enabled
bool: A flag indicating whether power-save mode has been enabled on the HDMI/VGA output
PUT /video/{:connector}/output/{:device}/power-save/
Enables or disables power-save mode on the monitor connected to the player (via HDMI, VGA, or Component)
Segments
connector
: The current value is alwayshdmi
device
: This value in /video/ URLs is currently0
for single-output Series 5 players and all Series 4 and older players. The value can be0
-3
for the XC4055, which has multiple outputs, and0
or1
for the XC2055.
Request Body Parameters
enabled
bool: Whether or not power save is enabled
Request Example
PUT /rest/v1/video/hdmi/output/0/power-save/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 51
This is the example request body:
{
"data": {
"enabled": true
}
}
Response Body
The server will return a success or error message
GET /video/{:connector}/output/{:device}/modes/
Retrieves all available video modes on the specified video output
Segments
connector
: The current value is alwayshdmi
device
: This value in /video/ URLs is currently0
for single-output Series 5 players and all Series 4 and older players. The value can be0
-3
for the XC4055, which has multiple outputs, and0
or1
for the XC2055.
Request Example
GET /rest/v1/video/hdmi/output/0/modes/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
Returns an array of video mode objects, each of which contain the following parameters:
modeName
string: The mode (for example, “1920x1080x60p”)colorDepth
string: The color depth of the video signalcolorSpace
string: The color space of the video signaldropFrame
bool: Whether or not the video timecode uses drop framefrequency
int: The frame rate of the video outputwidth
int: The width of the video outputheight
int: The height of the video outputgraphicsPlaneWidth
int: The width of the graphics planegraphicsPlaneHeight
int: The height of the graphics planeinterlaced
bool: Whether or not the video output is interlacedoverscan
bool: Whether or not the video output is using an overscan setting or notpreferred
bool: Whether or not video is the preferred mode
GET /video/{:connector}/output/{:device}/mode/
Retrieves the current video mode on the specified video output
Segments
connector
: The current value is alwayshdmi
device
: This value in /video/ URLs is currently0
for single-output Series 5 players and all Series 4 and older players. The value can be0
-3
for the XC4055, which has multiple outputs, and0
or1
for the XC2055.
Query String Parameters
Each of these parameters delivers a different mode value:
best
int optional: If set to 1, this returns the best modeactive
int optional: If set to 1, this returns the active modeconfigured
int optional: If set to 1, this returns the configured mode
Request Examples
GET /rest/v1/video/hdmi/output/0/mode/?best=1&destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
isAutoMode
bool: Whether the mode is set to “auto”name
string: The name of the video mode. Same asmode.modeName
below.width
string: The width value of the video mode.height
string: The height value of the video mode.frames
string: The frame rate value of the video mode.scan
string: The scan character value of the video mode.mode
object: The currently configured video mode on the video output with following parameters -modeName
string: The mode (for example, “1920x1080x60p”)colorDepth
string: The color depth of the video signalcolorSpace
string: The color space of the video signaldropFrame
bool: Whether or not the video timecode uses drop framefrequency
int: The frame rate of the video outputwidth
int: The width of the video outputheight
int: The height of the video outputgraphicsPlaneWidth
int: The width of the graphics planegraphicsPlaneHeight
int: The height of the graphics planeinterlaced
bool: Whether or not the video output is interlacedoverscan
bool: Whether or not the video output is using an overscan setting or notpreferred
bool: Whether or not video is the preferred mode
PUT /video/{:connector}/output/{:device}/mode/
Changes the video mode on the player
Segments
connector
: The current value is alwayshdmi
device
: This value in /video/ URLs is currently0
for single-output Series 5 players and all Series 4 and older players. The value can be0
-3
for the XC4055, which has multiple outputs, and0
or1
for the XC2055.
Request Body Parameters
A video mode object containing the following value(s):
modeName
string required: The mode (for example, “1920x1080x60p”)colorDepth
string optional: The color depth of the video signalcolorSpace
string optional: The color space of the video signaldropFrame
bool: Whether or not the video timecode uses drop framefrequency
int optional: The frame rate of the video outputwidth
int optional: The width of the video outputheight
int optional: The height of the video outputgraphicsPlaneWidth
int optional: The width of the graphics planegraphicsPlaneHeight
int optional: The height of the graphics planeinterlaced
bool optional: Whether or not the video output is interlacedoverscan
bool optional: Whether or not the video output is using an overscan setting or notpreferred
bool optional: Whether or not video is the preferred mode
Request Example
PUT /rest/v1/video/hdmi/output/0/mode/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 95
This is the example request body:
{
"data": {
"name": {
"modeName": "640x480x60p"
}
}
}
Response Body
The server will return a success or error message. A successful response will almost always cause a reboot which will be indicated in the response.
result
object: The response object.success
bool: Whether or not the operation was successfulreboot
bool: Whether or not the player is rebooting
GET /logs/
Fetches the player log files as a raw string. The log output is similar to the information generated through serial, Telnet, or SSH on the player.
Request Example
GET /rest/v1/logs/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}
Accept: application/json, application/vnd.bsn.error+json
Response Body
result
string: The raw contents of the player log. Each line is separated by a newline character ("\n")
GET /crash-dump/
Retrieves the crash dump from the player
Request Example
GET /rest/v1/crash-dump/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
result
Result: A Result object containing crash-dump files:isRecent
bool: A flag indicating if this is the most recent set of crash-dump filescrashDumpFiles
CrashDumpFiles[ ]: An array of CrashDumpFiles instances that contain the following entries:fileName
string: The name of the file. You can use this field to download the file later usingGET /v1/files/sd/{{filename}}?contents
.mimeType
string: The MIME type of the crash-dump filefileContents
string: The crash-dump file contents
PUT /control/reboot/
Reboots the player. The player will not send a response to a reboot request.
Request Body Parameters
crash_report
bool: Pass the body parameter{“crash_report": true}
. To be used only when directed by BrightSign customer service. This will reboot the player and save a crash-report file to the brightsign-dumps folder. Customer service may request the crash report when helping you troubleshoot a player.factory_reset
bool: Pass the body parameter{“factory_reset”: true}
. This resets the player to factory defaults, erasing all persistent registry settings for networking, security, and other applications.autorun
string: Pass the body parameter{“autorun”: “disable”}
. This disables the current autorun script, and this is especially helpful for debugging purposes.
Request Example
PUT /rest/v1/control/reboot/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Request Example (Crash Report)
PUT /rest/v1/control/reboot/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 56
This is the example request body:
{
"data": {
"crash_report": true
}
}
Request Example (Factory Reset)
PUT /rest/v1/control/reboot/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 57
This is the example request body:
{
"data": {
"factory_reset": true
}
}
Request Example (Disable Autorun)
PUT /rest/v1/control/reboot/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 56
This is the example request body:
{
"data": {
"autorun": "disable"
}
}
Response Body
The server will return a success or error message. A successful response will almost always cause a reboot which will be indicated in the response.
result
object: The response objectsuccess
bool: Whether or not the operation was successfulreboot
bool: Whether or not the player is rebooting
GET /control/dws-password/
Retrieves information about the current password of the local DWS (but not the password itself) such as whether the password is blank or invalid
Request Example
GET /rest/v1/control/dws-password/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
success
bool: A flag indicating whether the password was successfully readpassword
Password{ }: A Password object that describes the DWS password. The following are possible values:isResultValid
bool: A flag indicating whether the DWS password is validisBlank
bool: A flag indicating whether the DWS password is blank (i.e. no password is required)
PUT /control/dws-password/
Sets a new password for the local DWS (or removes the password requirement)
Request Body Parameters
password
string: The new local DWS password for the player. The absence of this parameter (or a blank string) will remove the password requirement for the DWS.previous_password
string: The previous DWS password. This parameter must be included. This value can be an empty string to indicate that the previous password was blank.
Request Example
PUT /rest/v1/control/dws-password/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 106
This is the example request body:
{
"data": {
"password": "newpassword",
"previous_password": "oldpassword"
}
}
Response Body
success
bool: A flag indicating whether the password was successfully setreboot
bool: A flag indicating whether the player will reboot to set the password
GET /control/local-dws/
Retrieves the current state of the local DWS
Request Example
GET /rest/v1/control/local-dws/?destinationType=player&destinationName=27D33C000051 HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
success
bool: A flag indicating whether the local DWS is enabled or disabled
PUT /control/local-dws/
Enables or disables the local DWS
Request Body
enable
bool: A flag indicating whether the local DWS should be enabled or disabled
Request Example
PUT /rest/v1/control/local-dws/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 50
This is the example request body:
{
"data": {
"enable": true
}
}
Response Body
success
bool: A flag indicating whether the local DWS was successfully enabled or disabledreboot
bool: A flag indicating whether the player will reboot to enable/disable the local DWS
GET /files/{:path}/
Lists the directories and/or files in a path
Segment
path
string: The path to the directories or files
Query String Parameter
raw
optional: Returns the raw contents of a directory
Request Example
GET /rest/v1/files/sd/autorun.brs/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
type
string: Either a directory or filepath
string: The path, for example, "sd"stat
object: Directory stats from the "fs" modulefiles
object[ ]:name
string: Name of the file or directorytype
string: Either "file" or "dir"path
string: The relative path of the file or directorystat
object: File stats from the “fs” modulemime
string: mime type (available only for type "file")
storageInfo
object: If the path in the URL is a storage device, this returns information about the storage device. For more information, see storageinfo.fileSystemType
string: The type of filesystem (for example, "fat32")stats
object:blockSize
int: The size of a native blockbytesFree
int: The amount of free spacefilesFree
int: The number of used inodesfilesUsed
int: The number of free inodesisReadOnly
bool: A flag indicating whether the filesystem is read onlysizeBytes
int: The amount of total space
mountedOn
string: The location where the file system is mounted (for example, "/storage/sd")contents
object[ ]:name
string: The name of the file or directorytype
string: Either "file" or "dir"path
string: The absolute path of the file or directorystat
object: The statistics from the "fs" modulemime
string: mime type (available only for type "file")children
object[ ]: This is available only for directory types and will have the same format as "contents"
PUT /files/{:path}
Uploads a new file to the player storage
If you are uploading zip and media files, you should use BOS version 8.5.44 or 9.0.101 or later.
Segment
path
string: The path is the folder in which you want to upload the file (for example:"/sd"
).
Request Body Parameters
files
object[]:fileName
string: The name of the filefileContents
string: The content of the file. It can be provided as plain text or as Data URL.fileType
string: Mime type
Request Example
The following request example would be used with one of the two request body examples (Plain Text or Data URL) below:
PUT /rest/v1/files/sd/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 196
In the request body examples below, use the FileReader's readAsText() or readAsDataURL() method to derive the fileContents
value.
Plain Text Request Body
Any file with mime type "text/*", or any “brs”, “json”, “js”, “xml”, “rtf” extension, can be sent as plain text using FileReader's readAsText() method:
{
"data": {
"fileUploadPath": "/sd",
"files": [
{
"fileName": "test.txt",
"fileContents": "Lorem Ipsum",
"fileType": "text/plain"
}
]
}
}
Data URL Request Body
For all other file types, including zip and media files, use the data URL format using FileReader's readAsDataURL() method:
{
"data": {
"fileUploadPath": "/sd",
"files": [
{
"fileName": "image.png",
"fileContents": "data:image/png;base64,DQpJbnRlcmZh.....",
"fileType": "image/png"
}
]
}
}
Response Body
success
bool: A flag that indicates if the operation succeeded or notresults
string[]: The names of the files that were successfully created
POST /files/{:path}/
Renames a file in the path (which should include the file name)
Segment
path
string: The path to the file (for example,/sd
)
Request Example
POST /rest/v1/files/sd/test.txt/?destinationType=player&destinationName={{deviceSerial} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 57
This is the example request body:
{
"data": {
"name": "newname.txt"
}
}
Response Body
The player will return a success or error message.
DELETE /files/{:path}/
Deletes a file from the player storage
Segment
path
string: The path to the file (for example,/sd
)
Request Example
DELETE /rest/v1/files/sd/test.txt/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
The player will return a success or error message.
DELETE /storage/{:device_name}/
Reformats the specified storage device
You must disable the autorun before reformatting the SD card on your device. To disable the autorun, use the PUT /v1/control/reboot with body parameter { “autorun”:”disable” }, as described in this section. This can also be done in the local DWS Diagnostics tab.
Segment
device_name
string: The specified storage device (see this page for a list of available devices)
Request Body Parameters
fs
string: The file system to use when reformatting a storage device. The default value of fs is "exfat".
Request Example
DELETE /rest/v1/storage/sd/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Content-Type: application/json
Content-Length: 49
This is the example request body:
{
"data": {
"fs": "exfat"
}
}
GET /re-provision/
Calling this endpoint will re-provision the player (in other words, the B-Deploy setup currently associated with the player will be downloaded, and the device will go through setup again).
The re-provision process involves the following steps:
If the “networking” section of the player’s registry contains the access and refresh tokens, it is assumed that the player was previously set up for BSN.cloud. So BrightSign keeps some setup-related keys in the networking section (these keys are listed at right) and deletes the rest of the registry entries. If the networking section does not include access and refresh tokens, it will empty the whole networking section, format the SD card, and reboot to try to provision the player.
BrightSign also sets the “deviceSetupComplete“ parameter in the “autorun” section to null, so that the player can set up again. This key is set to 1 only if the player was previously set up through the on-device setup option.
The code removes all files from the default storage device (this is almost always the SD card). You do not need to format the storage separately.
The player reboots, fetches the setup package from B-Deploy, and re-provisions itself.
Request Example
GET /rest/v1/reprovision/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
success
bool:True
means that the operation succeeded and the player will reboot.False
means that the operation failed.
GET /diagnostics/
Runs network diagnostics on the player
Request Example
GET /rest/v1/diagnostics/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
ethernet
string:diagnosis
string: Indicates if this type of interface is presentlog
object[ ]: This contains the diagnostic results for the ethernet interface. It has fields for name, pass, and result.name
string: The name of the diagnostic testpass
bool: Indicates whether the test passed or notresult
string: The actual value for the diagnostic tests like checking type and ping.
ok
bool: If diagnostics were run on the interface or not.
wifi
string:diagnosis
string: Indicates if this type of interface is presentlog
object[ ]: This contains the diagnostic results for the wifi interface. It has fields for name, pass, and result.name
string: The name of the diagnostic testpass
bool: Indicates whether the test passed or notresult
string: The actual value for the diagnostic tests like checking type and ping.
ok
bool: If diagnostics were run on the interface or not.
modem
string:diagnosis
string: Indicates if this type of interface is presentlog
object[ ]: This contains the diagnostic results for the modem interface. It has fields for name, pass, and result.name
string: The name of the diagnostic testpass
bool: Indicates whether the test passed or notresult
string: The actual value for the diagnostic tests like checking type and ping.
ok
bool: If diagnostics were run on the interface or not.
internet
string:diagnosis
string: Indicates if this type of interface is presentlog
object[ ]: This contains the diagnostic results for the internet connectivity. It has fields for info, name, pass, and result.info
string: Returns DNS server infoname
string: Checks DNS servers and internet connectivitypass
bool: Indicates whether the test passed or notresult
string: The actual value for the diagnostic tests like checking type and ping.
ok
bool: If diagnostics were run on the interface or not.
GET /diagnostics/dns-lookup/{:domain_name}/
Tests name resolution on the specified DNS address
Segment
domain_name
: The DNS address (for example, google.com)
Request Example
GET /rest/v1/diagnostics/dns-lookup/google.com/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
The player queries each DNS field separately, then collects returned data into the records object and returned errors into the errorList object. The following DNS fields are queried: "ipv4", "ipv6", "cname", "mx", "service", "text".
records
objectipv4
string[ ]ipv6
string[ ]text
string[ ]mx
object[ ]exchange
stringpriority
int
server_test
objecttcp
objectmade
int: The total number of DNS requests madepass
int: The total number of requests that passedfail
int: The total number of requests that failed.timeout
int: The total number of requests that timed out.mismatch
int
udp
objectmade
int: The total number of DNS requests madepass
int: The total number of requests that passedfail
int: The total number of requests that failed.timeout
int: The total number of requests that timed out.mismatch
int
errorList
object[ ]field
stringerr
objecterrno
string: Error number (usually the same value as code)code
string: Error code numbersyscall
stringhostname
string: The value passed in the URL
GET /diagnostics/ping/{:domain_name}/
Requests the player to ping the specified IP or DNS address on its local network. This call can take over 10 seconds to return.
Segment
domain_name
: The specified IP or DNS address
Request Example
GET /rest/v1/diagnostics/ping/0.0.0.0/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
success
bool: A flag that indicates if the operation succeeded or notresponse
object:hostname
string: The value that you passed in the URLresults
objectipv4
object[ ]address
string: The IPv4 addressresults
objectreceived
int: The number of packets receivedstats
objectaverage
int: The average time for the packet to returnquickest
int: The quickest time for packet to returnslowest
int: The slowest time for the packet to returnunits
int: The time units (usually microseconds)
transmitted
int: The number of packets transmitted
ipv6
object[ ]interface
stringsource
stringaddress
string: The IPv6 addressresults
objectreceived
int: The number of packets receivedtransmitted
int: The number of packets transmitted
The ipv6
entry will only be returned if IPv6 is present.
GET /diagnostics/trace-route/{:domain_name}/
Requests the player to perform a standard trace-route diagnostic on the specified IP or DNS address. This call can take several minutes to return.
Segment
domain_name
: The specified IP or DNS address
Query String Parameter
resolveAddress
bool: Specifies whether the IP or DNS address should be resolved or not
Request Example
GET /rest/v1/diagnostics/trace-route/google.com/?resolveAddress=true&destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
address
stringresults
objectoutput
string[ ]: Returns the trace route output information in text formatprotocol
string: The IP protocol, for example, "ipv4"route
object[ ]:hop
intservers
objectaddress
string: The address to which the trace route request is madehostname
stringstats
object[ ]reachable
stringtime
string: The time required for the trace route request to returnunits
string: The time units (usually in milliseconds)
GET /diagnostics/network-configuration/{:interface}/
Retrieves information about network-interface settings on the player
Segment
interface
: The network interface. Possible names includeeth0
,wlan0
, andmodem
.
Request Example
GET /rest/v1/diagnostics/network-configuration/eth0/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Response Body
Some entries (e.g. caCertificates
, clientIdentifier
) are identical for all interfaces.
text
string: The network configuration information in plain-text formoutput
Output: The network configuration information as a JSON object:interfaces
Interface[ ]: An array of Interface objects representing network interfaces:name
string: The interface name (for example,"eth0"
)errors
Error[ ]: An array of error messages associated with the interfaceparams
Param[ ]: An array of Param objects representing parameters associated with the network interface. Each Param interface has the following entries:name
string: The property name (e.g."MAC"
)value
string: The property value (e.g."90:ac:3f:0b:d2:88"
)
host
Info[ ]: An array of Info objects providing network host information. Each object can have the following entries:errors
Error[ ]: An array of error messages associated with the network hostparams
Param[ ]: An array of Param objects representing parameters associated with the network host
bsn
Info[ ]: An array of Info objects providing information about BSN communication.other
Info[ ]: An array of Info objects providing information miscellaneous network information.
caCertificate
string: The contents of a CA certificate file in text form (i.e. a "pem" file).clientCertificate
bool: A flag indicating whether the player is using a client certificateclientIdentifier
string: The DHCP client identifier for the network interfacednsServerList
string[ ]: An IP address list of the DNS serversdomain
string: The domain name for the network interfaceeapTlsOptions
string: A string containing EAP-specific optionsenabledProtocolList
string[ ]: An array of enabled IP protocols. Currently supported values are"IPv4"
and "IPv6"
.identity
string: The RADIUS identityipAddressList
string[ ]: The IP addresses assigned to the playerinboundShaperRate
int: The bandwidth limit for inbound traffic in bits per second. A value of -1 specifies the default bandwidth limit, and a value of 0 specifies no bandwidth limit (these two settings are functionally the same).metric
int: The routing metric for the default gateway on the interface. Routes with lower metrics are preferred over routes with higher metrics.mtu
int: The maximum transmission unit (MTU) for the network interface in bytesprivateKey
string: The private key for authenticationvlanIdList
int[ ]: An array of VLAN IDs that are supported on the parent network interfacesecurityMode
string: Security mode for authenticationsecurityMode
string
GET /diagnostics/network-neighborhood/
Retrieves information about the current network neighborhood of the player
Request Example
GET /rest/v1/diagnostics/network-neighborhood/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1
Host: ws.bsn.cloud
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/vnd.bsn.error+json