Expand | |||||
---|---|---|---|---|---|
| |||||
|
GET /diagnostics/
Run network diagnostics on the player.
Response Body
ethernet
stringdiagnosis
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
stringdiagnosis
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
stringdiagnosis
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
stringdiagnosis
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.
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.
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
Note |
---|
NoteThe |
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.
URL Parameters
resolveAddress
bool: A Boolean value specifying whether the IP/DNS address should be resolved or not
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 extensive information about network-interface settings on the player. Interface names include eth0
, wlan0
, and modem
.
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 I nterface objects representing network interfaces:name
string: The interface name (e.g."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 Info 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.
Response Body
success
bool: A flag that indicates if the operation succeededresponse
object[ ]:chassis-descr
stringchassis-id
stringchassis-name
stringmgmt-ip
stringport-descr
stringport-id
stringvlan-pvid
string
If the diagnostic could not be performed, the response body may instead be an error message.
GET /diagnostics/packet-capture/
Gets the current status of packet capture operation. Packet capture operation requires the legacy DWS to be working.
Response Body
statusCode
int: The success or error code (200 is success)is_running
bool: Flag indicating if the packet capture operation is running
POST /diagnostics/packet-capture/
Starts a packet capture operation. The body parameters are:
filename
string: The name of the packet capture file. If you don't pass this string, 'capture.pcap' is the default.interface
string: The name of the interface for which we are performing packet capture. 'eth0' is the default.duration
int: The duration for which the packet capture runs in seconds. The default is 300 seconds (5 minutes).maxpackets
int: The maximum number of packets to capture before concluding the process. 0 is the default value.snaplen
int: The maximum size of each packet. Specifying 0 will instruct the function to capture the entire packet no matter the size.filter
string: A field for conditional filtering of packets. This operation uses standard pcap syntax. This string is empty by default.
DELETE /diagnostics/packet-capture/
Stops a packet capture operation.
GET /diagnostics/telnet
Returns information about whether or not Telnet is enabled on the player, and the port number on which it is enabled if it is. This is only available in BOS 9.0.110 and above.
A successful response is a 200 and this response body:
Code Block |
---|
{ "enabled": true, "portNumber": 23 } |
PUT /diagnostics/telnet
This is only available in BOS 9.0.110 and above.
Request Body
enabled
boolean: Enable or disable Telnet on the playerportNumber
integer: The port number on which to enable Telnet
Response
Code Block |
---|
{ "success": true, "reboot": true // Indicates whether the player will reboot } |
GET /diagnostics/ssh
Returns information about whether or not SSH is enabled on the player, and the port number on which it is enabled if it is. This is only available in BOS 9.0.110 and above.
A successful response is a 200 and this response body:
Code Block |
---|
{ "enabled": true, "portNumber": 22, "password": true // Indicates that a value is set } |
PUT /diagnostics/ssh
This is only available in BOS 9.0.110 and above.
Request Body
enabled
boolean: Enable or disable SSH on the playerportNumber
integer: The port number on which to enable SSHpassword
string: The SSH password
Response
Code Block |
---|
{ "success": true, "reboot": true // Indicates whether the player will reboot } |
POST /snapshot/
Takes a screenshot of the current screen contents and saves it to storage. See Remote DWS APIs#RequestMessageFormat for the Query String Parameters.
Request Example
Code Block | ||
---|---|---|
| ||
curl 'https://ws.bsn.cloud/rest/v1/snapshot?destinationType=player&destinationName=X4K4AF000452' \ -X 'POST' \ -H 'Authorization: Bearer <omitted>' |
Response Body
remoteSnapshotThumbnail
string: A snapshot image thumbnail in Base64 formatfilename
string: The name and path of the snapshot image file. CallGET /file/{:path
} to retrieve the full-resolution image.timestamp
string: The date and time the snapshot was taken. The date/time is formatted as "yyyy-mm-dd hh:mm:ss <timezone>"
.
GET /health/
Retrieves the current status of the player. Currently, this endpoint is only used to determine if a player can respond to a WebSockets request; it cannot determine the error state of a player.
Response Body
status
string: The player status. The only possible value is "active".statusTime
string: The date and time the player responded to the status request. The date/time is formatted as "yyyy-mm-dd hh:mm:ss <timezone>
".
PUT /custom/
Sends custom data to the player. The player in turn sends the data as a message (in JSON string format) on UDP port 5000, which can then be captured by the autorun.brs or JavaScript application on the player.
Request Body
command
string: The custom data to sendreturnImmediately
bool: A flag specifying whether the server should respond to the PUT request immediately (true
) or wait on a response to the UDP message from the BrightScript/JavaScript application (false
).
Response Body
If the returnImmediately
property is true
, the server will return a success or error message. If the property is false
, the server will wait for a response from UDP port 5000 on the player and send it as the response to the PUT request.
GET /download-firmware/
Instructs the player to download and apply a firmware update.
URL parameter
url
string: The public URL for downloading the firmware-update file.
Response Body
success
bool: A flag indicating whether the download was successfulreboot
bool: A flag indicating whether the player will reboot when applying a firmware update
GET /registry/
Gets the whole registry dump of the player.
Response Body
success
bool: If the operation is successfulvalue
object: The keys are the names of the registry sections. These are some examples:brightscript
string: The BrightScript key-value pairsnetworking
string: The networking key-value pairs
GET /registry/recovery_url/
Retrieves the recovery URL stored in the player registry.
Response Body
success
bool: A flag indicating whether the request was successfully readvalue
string: The recovery URL
PUT /registry/recovery_url/
Writes a new recovery URL to the player registry.
Request Body
url
string: The new recovery URL
Request Example
Code Block | ||
---|---|---|
| ||
{"data": {"url": "https://test.com"}} |
Response Body
success
bool: A flag indicating whether the write was successful
GET /remoteview/config/
Get the remote view configuration.
PUT /remoteview/config/
Pass body parameter “accessURL" to configure the remote view server URL.
Request Example
Code Block | ||
---|---|---|
| ||
{"data": {“accessURL”: “http://test-server-url/”}} |
GET /remoteview/{:source}/view/
Get a list of all the active remote view session IDs.
POST /remoteview/{:source}/view/
Starts remote view session and returns a sessionID.
GET /remoteview/{:source}/view/:id/
Get information about a particular session using its sessionID (passed in as :id in route). The current {:source} value is always desktop. These are the parameters of the response:
Response Body
id
string: This is the session idmediaSource
string: The value is always "desktop"available
bool: This value is always true when the session is active.viewing
bool: This indicates that the session is active. The value will always be true.
DELETE /remoteview/{:source}/view/:id/
Delete a particular session using its sessionID.