You can use the APIs locally with the DWS (to use the bsn.Control Cloud APIs for interacting with a player, see Remote+DWS). There are two ways to access these APIs:
...
The URL prefix is always http://player_ip/api
Advanced Usage
If you choose to set the registry "bbhf" directly instead of through the BrightAuthor:connected UI (described in step 2, above), note that:
...
All POST and PUT API calls have response and request bodies of type JSON.
API Definitions
The listed APIs are prefixed with the version /v1. To preserve backwards compatibility, BrightSign will create a /v2 version for any API changes and attempt to retain the semantics and behavior of /v1 but this may not be possible. We can not guarantee that this document will be current in every case./packet-capture/
Downloading a File From Player Storage
To directly download a file from player storage, add ?contents&stream
to the end of the URL. Here is a sample workflow (assuming a base URL of http://192.168.0.12/api/v1):
Create a snapshot on the SD card under the remote_snapshots using POST /v1/snapshot
The response will be the name of the snapshot (for example, img-2021-12-29-10-49-27.jpg).
To directly download the snapshot created on the player: GET http://192.168.0.12/api/v1/files/sd/remote_snapshots/img-2021-12-29-10-49-27.jpg?contents&stream
If you enter only
?contents
, you get the file in the base64 encoding.
Using HTTPS with the Local DWS
You can use either a valid certificate or a self-signed certificate.
Generating a Self-Signed Certificate and Key
To do this, choose one of the following two methods:
Run this code:
Code Block openssl req -nodes -new -x509 -keyout dws.key -out dws.crt
OR run the following code and use the 'dws.key' and 'dws.crt' files. The other files can be deleted later.
Code Block openssl req -newkey rsa:4096 -keyform PEM -keyout ca.key -x509 -days 3650 -outform PEM -out ca.cer openssl genrsa -out dws.key 4096 openssl req -new -key dws.key -out client.req openssl x509 -req -in client.req -CA ca.cer -CAkey ca.key -set_serial 101 -extensions client -days 365 -outform PEM -out dws.crt
Making the Certificate and Key Files Accessible
The operating system will look for files with known names at the root of the default storage. To make the certificate and key files you generated findable, either:
...