### Example GET Request for Setup Package Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v3 This snippet shows an example of how to make a GET request to retrieve a specific Setup package using its ID. Ensure the Host and Authorization headers are correctly set. ```none GET /rest-setup/v3/setup/1a2b3c4d5e6f7a8b9c0d1e2f/ HTTP/1.1 Host: provision.bsn.cloud Authorization: {{Bearer Token}} Accept: application/json ``` -------------------------------- ### GET /rest-setup/v3/setup/ Request Example Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v3 Example of a GET request to retrieve setup records, specifying network name, username, and package name. ```none GET /rest-setup/v3/setup/?username=JaneDoe%40brightsign.biz&NetworkName=JaneDoeNetwork&packageName=My%20Setup%20Package HTTP/1.1 Host: provision.bsn.cloud Authorization: {{Bearer Token}} Accept: application/json ``` -------------------------------- ### GET /rest-setup/v3/setup/ Success Response Example Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v3 Example of a successful JSON response body for the GET /rest-setup/v3/setup/ endpoint, containing setup package information. ```json { "error": null, "result": [ { "_id": "1a2b3c4d5e6f7a8b9c0d1e2f", "username": "JaneDoe@brightsign.biz", "client": "bacon", "packageName": "My Setup Package", "setupType": "bsn", "networkName": "JaneDoeNetwork", "deviceName": "My Player", "deviceDescription": "", "bsnGroupName": "Default", "setupJson": "{\"version\":\"3.0.0\",\"_id\":\"1a2b3c4d5e6f7a8b9c0d1e2f\",\"bDeploy\":{\"username\":\"JaneDoe@brightsign.biz\",\"networkName\":\"JaneDoeNetwork\",\"client\":\"bacon\",\"packageName\":\"NewTimezone\"},\"firmwareUpdatesByFamily\":{\"Impala\":{\"firmwareUpdateSource\":null,\"firmwareUpdateSourceFilePath\":\"\",\"firmwareUpdateSourceUrl\":\"\",\"firmwareUpdateStandardTargetFileName\":\"impala-update.bsfw\",\"firmwareUpdateDifferentTargetFileName\":\"impala-update_different.bsfw\",\"firmwareUpdateNewerTargetFileName\":\"impala-update_newer.bsfw\",\"firmwareUpdateSaveTargetFileName\":\"impala-update_save.bsfw\",\"firmwareUpdateVersion\":\"\",\"productionReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/impala-8.5.47-update.bsfw\",\"betaReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/impala-8.5.47-update.bsfw\",\"compatibleReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/impala-8.0.146-update.bsfw\",\"productionVersion\":\"8.5.47\",\"betaVersion\":\"8.5.47\",\"compatibleVersion\":\"8.0.146\",\"productionVersionNumber\":525615,\"betaVersionNumber\":525615,\"compatibleVersionNumber\":524434,\"productionReleaseSHA1\":\"4dcf3e2dae41d05e49f3bc6a8ed49925d1cbb75a\",\"betaReleaseSHA1\":\"4dcf3e2dae41d05e49f3bc6a8ed49925d1cbb75a\",\"compatibleReleaseSHA1\":\"789cf557fbb0a5f70ecc103e5d071186b57eb38f\",\"productionReleaseFileLength\":144788480,\"betaReleaseFileLength\":144788480,\"compatibleReleaseFileLength\":137811964,\"existingFWContentID\":\"\"},\"Pantera\":{\"firmwareUpdateSource\":null,\"firmwareUpdateSourceFilePath\":\"\",\"firmwareUpdateSourceUrl\":\"\",\"firmwareUpdateStandardTargetFileName\":\"pantera-update.bsfw\",\"firmwareUpdateDifferentTargetFileName\":\"pantera-update_different.bsfw\",\"firmwareUpdateNewerTargetFileName\":\"pantera-update_newer.bsfw\",\"firmwareUpdateSaveTargetFileName\":\"pantera-update_save.bsfw\",\"firmwareUpdateVersion\":\"\",\"productionReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/pantera-8.5.47-update.bsfw\",\"betaReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/pantera-8.5.47-update.bsfw\",\"compatibleReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/pantera-8.0.146-update.bsfw\",\"productionVersion\":\"8.5.47\",\"betaVersion\":\"8.5.47\",\"compatibleVersion\":\"8.0.146\",\"productionVersionNumber\":525615,\"betaVersionNumber\":525615,\"compatibleVersionNumber\":524434,\"productionReleaseSHA1\":\"ee9ef5265c5ff85c77e4a87f264f8cf1112225ed\",\"betaReleaseSHA1\":\"ee9ef5265c5ff85c77e4a87f264f8cf1112225ed\",\"compatibleReleaseSHA1\":\"58196ad8707b6e62185f1aba6d124ed1adfa7f67\",\"productionReleaseFileLength\":144337538,\"betaReleaseFileLength\":144337538,\"compatibleReleaseFileLength\":137509058,\"existingFWContentID\":\"\"},\"Tiger\":{\"firmwareUpdateSource\":null,\"firmwareUpdateSourceFilePath\":\"\",\"firmwareUpdateSourceUrl\":\"\",\"firmwareUpdateStandardTargetFileName\":\"tiger-update.bsfw\",\"firmwareUpdateDifferentTargetFileName\":\"tiger-update_different.bsfw\",\"firmwareUpdateNewerTargetFileName\":\"tiger-update_newer.bsfw\",\"firmwareUpdateSaveTargetFileName\":\"tiger-update_save.bsfw\",\"firmwareUpdateVersion\":\"\",\"productionReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/tiger-update.bsfw\",\"betaReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/tiger-update.bsfw\",\"compatibleReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/tiger-8.0.146-update.bsfw\",\"productionVersion\":\"8.5.47\",\"betaVersion\":\"8.5.47\",\"compatibleVersion\":\"8.0.146\",\"productionVersionNumber\":525615,\"betaVersionNumber\":525615,\"compatibleVersionNumber\":524434,\"productionReleaseSHA1\":\"2123123123123123123123123123123123123123\",\"betaReleaseSHA1\":\"2123123123123123123123123123123123123123\",\"compatibleReleaseSHA1\":\"1231231231231231231231231231231231231231\",\"productionReleaseFileLength\":144788480,\"betaReleaseFileLength\":144788480,\"compatibleReleaseFileLength\":137811964,\"existingFWContentID\":\"\"}}} ``` -------------------------------- ### GET /Setups/Tokens/{token}/ Success Response Example Source: https://docs.brightsign.biz/developers/provisioning-endpoints-202206 This is an example of a successful response when validating a setup token. It returns the token's metadata, including its scope and validity. ```json { "token": {{token}}, "scope": "cert", "validFrom": "2024-05-16T16:36:04.000Z", "validTo": "2026-05-16T16:36:04.000Z" } ``` -------------------------------- ### Success Response Example for GET Setup Packages Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v2 A successful response returns a 200 status code and a list of Setup Package Info Entities (v2). The 'result' array contains details about each setup package. ```json { "error": null, "result": [ { "_id": "1a2b3c4d5e6f7a8b9c0d1e2f", "username": "JaneDoe@brightsign.biz", "client": "bacon", "packageName": "My Setup Package", "setupType": "bsn", "networkName": "JaneDoeNetwork", "deviceName": "My Player", "deviceDescription": "", "bsnGroupName": "Default", "setupJson": "{\"version\":\"2.0.0\",\"_id\":\"1a2b3c4d5e6f7a8b9c0d1e2f\",\"bDeploy\":{\"username\":\"JaneDoe@brightsign.biz\",\"networkName\":\"JaneDoeNetwork\",\"client\":\"bacon\",\"packageName\":\"NewTimezone\"},\"firmwareUpdatesByFamily\":{\"Impala\":{\"firmwareUpdateSource\":null,\"firmwareUpdateSourceFilePath\":\"\",\"firmwareUpdateSourceUrl\":\"\",\"firmwareUpdateStandardTargetFileName\":\"impala-update.bsfw\",\"firmwareUpdateDifferentTargetFileName\":\"impala-update_different.bsfw\",\"firmwareUpdateNewerTargetFileName\":\"impala-update_newer.bsfw\",\"firmwareUpdateSaveTargetFileName\":\"impala-update_save.bsfw\",\"firmwareUpdateVersion\":\"\",\"productionReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/impala-8.5.47-update.bsfw\",\"betaReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/impala-8.5.47-update.bsfw\",\"compatibleReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/impala-8.0.146-update.bsfw\",\"productionVersion\":\"8.5.47\",\"betaVersion\":\"8.5.47\",\"compatibleVersion\":\"8.0.146\",\"productionVersionNumber\":525615,\"betaVersionNumber\":525615,\"compatibleVersionNumber\":524434,\"productionReleaseSHA1\":\"4dcf3e2dae41d05e49f3bc6a8ed49925d1cbb75a\",\"betaReleaseSHA1\":\"4dcf3e2dae41d05e49f3bc6a8ed49925d1cbb75a\",\"compatibleReleaseSHA1\":\"789cf557fbb0a5f70ecc103e5d071186b57eb38f\",\"productionReleaseFileLength\":144788480,\"betaReleaseFileLength\":144788480,\"compatibleReleaseFileLength\":137811964,\"existingFWContentID\":\"\"},\"Pantera\":{\"firmwareUpdateSource\":null,\"firmwareUpdateSourceFilePath\":\"\",\"firmwareUpdateSourceUrl\":\"\",\"firmwareUpdateStandardTargetFileName\":\"pantera-update.bsfw\",\"firmwareUpdateDifferentTargetFileName\":\"pantera-update_different.bsfw\",\"firmwareUpdateNewerTargetFileName\":\"pantera-update_newer.bsfw\",\"firmwareUpdateSaveTargetFileName\":\"pantera-update_save.bsfw\",\"firmwareUpdateVersion\":\"\",\"productionReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/pantera-8.5.47-update.bsfw\",\"betaReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/pantera-8.5.47-update.bsfw\",\"compatibleReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/pantera-8.0.146-update.bsfw\",\"productionVersion\":\"8.5.47\",\"betaVersion\":\"8.5.47\",\"compatibleVersion\":\"8.0.146\",\"productionVersionNumber\":525615,\"betaVersionNumber\":525615,\"compatibleVersionNumber\":524434,\"productionReleaseSHA1\":\"ee9ef5265c5ff85c77e4a87f264f8cf1112225ed\",\"betaReleaseSHA1\":\"ee9ef5265c5ff85c77e4a87f264f8cf1112225ed\",\"compatibleReleaseSHA1\":\"58196ad8707b6e62185f1aba6d124ed1adfa7f67\",\"productionReleaseFileLength\":144337538,\"betaReleaseFileLength\":144337538,\"compatibleReleaseFileLength\":137509058,\"existingFWContentID\":\"\"},\"Tiger\":{\"firmwareUpdateSource\":null,\"firmwareUpdateSourceFilePath\":\"\",\"firmwareUpdateSourceUrl\":\"\",\"firmwareUpdateStandardTargetFileName\":\"tiger-update.bsfw\",\"firmwareUpdateDifferentTargetFileName\":\"tiger-update_different.bsfw\",\"firmwareUpdateNewerTargetFileName\":\"tiger-update_newer.bsfw\",\"firmwareUpdateSaveTargetFileName\":\"tiger-update_save.bsfw\",\"firmwareUpdateVersion\":\"\",\"productionReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/tiger-8.5.47-update.bsfw\",\"betaReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/tiger-8.5.47-update.bsfw\",\"compatibleReleaseURL\":\"https://bsncloud.s3.amazonaws.com/public/tiger-8.0.146-update.bsfw\",\"productionVersion\":\"8.5.47\",\"betaVersion\":\"8.5.47\",\"compatibleVersion\":\"8.0.146\",\"productionVersio"} ] } ``` -------------------------------- ### Retrieve B-Deploy Setup Package Request Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v2 Example of an HTTP GET request to retrieve a specific B-Deploy setup package using its ID. ```text GET /rest-setup/v2/setup/1a2b3c4d5e6f7a8b9c0d1e2f/ HTTP/1.1 Host: provision.bsn.cloud Authorization: {{Bearer Token}} Accept: application/json ``` -------------------------------- ### GET /Setups/Tokens/{token}/ Request Example Source: https://docs.brightsign.biz/developers/provisioning-endpoints-202206 Use this snippet to validate a player setup token and retrieve its metadata. Replace {{Token}} with the actual token you want to validate. ```text GET /2022/06/REST/Provisioning/Setups/Tokens/{{Token}}/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### GET /time/ Request Example Source: https://docs.brightsign.biz/developers/rdws-information-endpoints Example of a GET request to retrieve the date and time configured on the player. ```text 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 ``` -------------------------------- ### Request Example for Content Upload, Start, and Complete Source: https://docs.brightsign.biz/developers/upload-api-endpoints-201903 This example shows the request headers for initiating a content upload, start, or complete operation. Ensure the Authorization header is correctly set with your UserAccessToken. ```http PUT /Upload/2019/03/REST/Sessions/None/Uploads/321e6fc1-553f-4bb0-8c7a-d5bf859be6b2/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} If-Unmodified-Since: Wed, 20 Dec 2024 21:32:34 GMT Accept: application/vnd.bsn.content.upload.status.201903+json, application/vnd.bsn.content.upload.negotiation.status.201903+json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### GET Video Output Information Request Example Source: https://docs.brightsign.biz/developers/ldws-video-endpoints This example shows how to construct a GET request to retrieve video output details. Ensure the Host and Authorization headers are correctly set. ```text GET /api/v1/video/hdmi/output/0/ HTTP/1.1 Host: {{playerIP}} Authorization: {{DigestAuth}} Accept: application/json ``` -------------------------------- ### Basic Audio Playback Setup Source: https://docs.brightsign.biz/developers/audio Demonstrates how to initialize an audio player, set the source, volume, and start playback. ```javascript const audio_class = require("@brightsign/audio"); let audio_player = new audio_class(); audio_player.src = "/storage/sd/file.mp4" audio_player.volume = .5; audio_player.load(); audio_player.play(); ``` -------------------------------- ### POST Request Example with Setup ID and Name Source: https://docs.brightsign.biz/developers/b-deploy-device-endpoints-v2 Use this snippet when provisioning a device using a pre-configured setup package stored in B-Deploy, identified by its ID and Name. ```http POST /rest-device/v2/device HTTP/1.1 Host: provision.bsn.cloud Content-Type: application/json Authorization: {{Bearer Token}} Accept: application/json Accept-Encoding: gzip,deflate Content-Type: application/json Content-Length: 252 ``` ```json { "username": "JaneDoe@brightsign.biz", "serial": "ABCD00000001", "name": "ProvisionTest", "NetworkName": "Test", "model": "XC4055", "desc": "Jane's player", "setupId": "f2e1d0c9b8a7f6e5d4c3b2a1", "setupName": "My Setup Package", "userdata": "" } ``` -------------------------------- ### Example Request Body for B-Deploy Setup (v3) Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v3 This is a comprehensive example of the JSON request body required to create a setup package. It includes various configuration options for device registration, firmware updates, logging, and network settings. ```json { "version": "3.0.0", "bDeploy": { "username": "JaneDoe@gmail.com", "networkName": "JaneDoeNetwork", "packageName": "FullSetup2" }, "setupType": "bsn", "bsnDeviceRegistrationTokenEntity": { "token": {{token}}, "scope": "certs", "validFrom": "2024-09-28T19:47:09.577Z", "validTo": "2026-09-28T19:47:09.577Z" }, "firmwareUpdateType": "standard", "enableSerialDebugging": true, "enableSystemLogDebugging": true, "dwsEnabled": true, "dwsPassword": "", "lwsEnabled": true, "lwsConfig": "status", "lwsUserName": "", "lwsPassword": "", "lwsEnableUpdateNotifications": true, "deviceName": "", "deviceDescription": "", "unitNamingMethod": "appendUnitIDToUnitName", "timeZone": "PST", "bsnGroupName": "Default", "timeBetweenNetConnects": 300, "timeBetweenHeartbeats": 900, "sfnWebFolderUrl": "", "sfnUserName": "", "sfnPassword": "", "sfnEnableBasicAuthentication": false, "playbackLoggingEnabled": false, "eventLoggingEnabled": false, "diagnosticLoggingEnabled": false, "stateLoggingEnabled": false, "variableLoggingEnabled": false, "uploadLogFilesAtBoot": false, "uploadLogFilesAtSpecificTime": false, "uploadLogFilesTime": 0, "logHandlerUrl": "", "enableRemoteSnapshot": false, "remoteSnapshotInterval": 69, "remoteSnapshotMaxImages": 69, "remoteSnapshotJpegQualityLevel": 100, "remoteSnapshotScreenOrientation": "Landscape", "remoteSnapshotHandlerUrl": "", "useWireless": false, "ssid": "", "passphrase": "", "timeServer": "http://time.brightsignnetwork.com", "idleScreenColor": { "r": 0, "g": 0, "b": 0, "a": 1 }, "contentDataTypeEnabledWired": true, "textFeedsDataTypeEnabledWired": true, "healthDataTypeEnabledWired": true, "mediaFeedsDataTypeEnabledWired": true, "logUploadsXfersEnabledWired": true, "contentDataTypeEnabledWireless": true, "textFeedsDataTypeEnabledWireless": true, "healthDataTypeEnabledWireless": true, "mediaFeedsDataTypeEnabledWireless": true, "logUploadsXfersEnabledWireless": true, "rateLimitModeOutsideWindow": "default", "rateLimitRateOutsideWindow": 0, "rateLimitModeInWindow": "unlimited", "rateLimitRateInWindow": 0, "rateLimitModeInitialDownloads": "unlimited", "rateLimitRateInitialDownloads": 0, "networkConnectionPriority": "wired", "networkDiagnosticsEnabled": false, "testEthernetEnabled": false, "testWirelessEnabled": false, "testInternetEnabled": false, "useCustomSplashScreen": false, "BrightWallName": "", "BrightWallScreenNumber": "", "specifyHostname": false, "hostname": "", "useProxy": false, "proxyAddress": "", "proxyPort": 0, "networkHosts": [], "contentDownloadsRestricted": false, "contentDownloadRangeStart": 0, "contentDownloadRangeEnd": 0, "heartbeatsRestricted": false, "heartbeatsRangeStart": 0, "heartbeatsRangeEnd": 0, "useDHCP": true, "staticIPAddress": "", "subnetMask": "", "gateway": "", "dns1": "", "dns2": "", "dns3": "", "useDHCP_2": true, "staticIPAddress_2": "", "subnetMask_2": "", "gateway_2": "", "dns1_2": "", "dns2_2": "", "dns3_2": "", "rateLimitModeOutsideWindow_2": "default", "rateLimitRateOutsideWindow_2": 0, "rateLimitModeInWindow_2": "unlimited", "rateLimitRateInWindow_2": 0, "rateLimitModeInitialDownloads_2": "unlimited", "rateLimitRateInitialDownloads_2": 0, "usbUpdatePassword": "", "remoteDwsEnabled": true } ``` -------------------------------- ### Create, Format, Mount, and Unmount a File System in JavaScript Source: https://docs.brightsign.biz/developers/filesysteminfile This example demonstrates the full lifecycle of a file system created within a file, including opening a backing file, writing to it, closing it, then formatting, mounting, and unmounting the `FileSystemInFile` instance. It uses the `fs` module for file operations and `@brightsign/filesysteminfile` for file system management. ```javascript const fs = require('fs'); const FileSystemInFile = require('@brightsign/filesysteminfile'); var fsif; var fd; open() .then(function(fileDescriptor) { fd = fileDescriptor; return write(fd); }) .then(function(bytes) { console.log(`${bytes} written to new file`); return close(fd); }) .then(function() { // Create FileSystemInFile using the backing file fsif = new FileSystemInFile('/storage/sd/usbstore'); return format(); }) .then(function() { return mount(); }) .then(function() { /* This is where you can actually do stuff with the mounted filesystem. */ // Unmount the mounted file after 10 seconds setTimeout(function() { return unmount(); }, 10000); }) .catch(function(error) { console.log(JSON.stringify(error)); }); // Create a writable file for the file system function open() { return new Promise(function(resolve, reject) { fs.open('/storage/sd/usbstore', 'w', function(error, fd) { if (error) reject(error); resolve(fd); }); }); }; // Write a buffer allocating 1GB of disk space for the file function write(fd) { return new Promise(function(resolve, reject) { fs.write(fd, Buffer.alloc(1), 0, 1, (1024*1024*1024) - 1, function(error, bytesWritten) { if (error) reject(error); resolve(bytesWritten); }); }); }; // Close the created file function close(fd) { return new Promise(function(resolve, reject) { fs.close(fd, function(error) { if (error) reject(error); resolve(); }); }); }; // Format the file system function format() { return new Promise(function(resolve, reject) { fsif.format("exfat") .then(function() { console.log('Filesystem formatted'); resolve(); }) .catch(function(error) { reject(error); }); }); }; // Mount the filesystem internally function mount() { return new Promise(function(resolve, reject) { fsif.mount() .then(function(mount_point) { console.log('Filesystem mounted' + mount_point); resolve(); }) .catch(function(error) { reject(error); }); }); }; // Unmount filesystem from internal mount point. Only can unmount a mounted file function unmount() { return new Promise(function(resolve, reject) { fsif.unmount() .then(function() { console.log('Filesystem unmounted'); resolve(); }) .catch(function(error) { reject(error); }); }); }; ``` -------------------------------- ### GET /health/ Request Example Source: https://docs.brightsign.biz/developers/rdws-information-endpoints Example of a GET request to retrieve the current status of the player. ```text GET /rest/v1/health/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1 Host: ws.bsn.cloud Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json ``` -------------------------------- ### Running BrightSign Asset Pool Example Source: https://docs.brightsign.biz/developers/brightsign-asset-pool Demonstrates how to execute the BrightSign Asset Pool example script using Node.js. This is the command-line interface for running the example. ```bash node bs-assetpool-example.js ``` -------------------------------- ### Set Up and Control Button LEDs Source: https://docs.brightsign.biz/developers/controlport Example script to set up a TouchBoard and make its LEDs twinkle by turning off each LED at a different point in the cycle. Requires importing the controlport class. ```javascript const control_port_class = require('@brightsign/legacy/controlport'); const led = new control_port_class("TouchBoard-0-LED"); const led_setup = new control_port_class("TouchBoard-0-LED-SETUP"); led_setup.SetPinValue(0, 0x000B00A0); led.SetPinValue(0, 0x07fe); led.SetPinValue(1, 0x07fd); led.SetPinValue(2, 0x07fb); led.SetPinValue(3, 0x07f7); led.SetPinValue(4, 0x07ef); led.SetPinValue(5, 0x07df); led.SetPinValue(6, 0x07bf); led.SetPinValue(7, 0x077f); led.SetPinValue(8, 0x06ff); led.SetPinValue(9, 0x05ff); led.SetPinValue(10, 0x03ff); ``` -------------------------------- ### GET /Operations Request Example Source: https://docs.brightsign.biz/developers/feedsmedia-endpoints-202206 Example of a GET request to the /Operations endpoint, including necessary headers. ```text GET /2022/06/REST/Feeds/Media/Operations/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### GET /setup/: _id/ Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v2 Retrieves the setup configuration for a specific device identified by its _id. ```json { "logHandlerUrl": "", "enableRemoteSnapshot": true, "remoteSnapshotInterval": 1, "remoteSnapshotMaxImages": 10, "remoteSnapshotJpegQualityLevel": 80, "remoteSnapshotScreenOrientation": "Landscape", "remoteSnapshotHandlerUrl": "", "idleScreenColor": { "r": 0, "g": 0, "b": 0, "a": 1 }, "networkDiagnosticsEnabled": false, "testEthernetEnabled": false, "testWirelessEnabled": false, "testInternetEnabled": false, "useCustomSplashScreen": false, "BrightWallName": "", "BrightWallScreenNumber": "", "contentDownloadsRestricted": false, "contentDownloadRangeStart": 0, "contentDownloadRangeEnd": 0, "heartbeatsRestricted": false, "heartbeatsRangeStart": 0, "heartbeatsRangeEnd": 0, "usbUpdatePassword": "", "inheritNetworkProperties": true, "internalCaArtifacts": [], "_id": "1a2b3c4d5e6f7a8b9c0d1e2f" } } ``` -------------------------------- ### POST /Setups/Tokens/ Success Response Example Source: https://docs.brightsign.biz/developers/provisioning-endpoints-202206 This is an example of a successful response when issuing a setup token. The response includes the token, its scope, and validity period. ```json { "token": {{token}}, "scope": "cert", "validFrom": "2024-05-21T00:00:00Z", "validTo": "2024-11-17T00:00:00Z" } ``` -------------------------------- ### GET /v1/time/ Request Example Source: https://docs.brightsign.biz/developers/ldws-info-endpoints Example of an HTTP GET request to retrieve the current date and time from the player. ```text GET /api/v1/time/ HTTP/1.1 Host: {{playerIP}} Authorization: {{DigestAuth}} ``` -------------------------------- ### Example of Enabling Console Source: https://docs.brightsign.biz/developers/brightsign-shell Illustrates the expected output and interaction when enabling the BrightSign Console from the boot loader prompt. ```text SECURE> console on *** command status = 0 SECURE> reboot ``` -------------------------------- ### GET / Endpoint Response Example Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v3 Example of a successful response from the GET / endpoint, showing updated timestamp and version. ```json { "updatedAt": "2025-05-08T18:42:18.692Z", "__v": 0 } ] ``` -------------------------------- ### GET /v1/video-mode/ Request Example Source: https://docs.brightsign.biz/developers/ldws-info-endpoints Example HTTP GET request to retrieve the current video mode configuration of the player. ```text GET /api/v1/video-mode/ HTTP/1.1 Host: {{playerIP}} Authorization: {{DigestAuth}} ``` -------------------------------- ### Create Audio Player Instance Source: https://docs.brightsign.biz/developers/audio Load the brightsign/audio module and create a new audio player instance. This is the initial setup required before using audio playback functionalities. ```javascript var audio_class = require("@brightsign/audio"); var audio_player = new audio_class(); ``` -------------------------------- ### GET /Operations/ Request Example Source: https://docs.brightsign.biz/developers/users-endpoints-202206 Example of how to make a GET request to the /Operations/ endpoint, including required headers and host information. ```text GET /2022/06/REST/Users/Operations/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### Request Body Example for B-Deploy Setup Package (v2) Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v2 This JSON object represents the full configuration for a new B-Deploy Setup package. It includes details for device registration, firmware updates, network settings, and logging. ```json { "version": "2.0.0", "bDeploy": { "username": "JaneDoe@gmail.com", "networkName": "JaneDoeNetwork", "packageName": "FullSetup2" }, "setupType": "bsn", "bsnDeviceRegistrationTokenEntity": { "token": {{token}}, "scope": "certs", "validFrom": "2024-09-28T19:47:09.577Z", "validTo": "2026-09-28T19:47:09.577Z" }, "firmwareUpdateType": "standard", "enableSerialDebugging": true, "enableSystemLogDebugging": true, "dwsEnabled": true, "dwsPassword": "", "lwsEnabled": true, "lwsConfig": "status", "lwsUserName": "", "lwsPassword": "", "lwsEnableUpdateNotifications": true, "deviceName": "", "deviceDescription": "", "unitNamingMethod": "appendUnitIDToUnitName", "timeZone": "PST", "bsnGroupName": "Default", "timeBetweenNetConnects": 300, "timeBetweenHeartbeats": 900, "sfnWebFolderUrl": "", "sfnUserName": "", "sfnPassword": "", "sfnEnableBasicAuthentication": false, "playbackLoggingEnabled": false, "eventLoggingEnabled": false, "diagnosticLoggingEnabled": false, "stateLoggingEnabled": false, "variableLoggingEnabled": false, "uploadLogFilesAtBoot": false, "uploadLogFilesAtSpecificTime": false, "uploadLogFilesTime": 0, "logHandlerUrl": "", "enableRemoteSnapshot": false, "remoteSnapshotInterval": 69, "remoteSnapshotMaxImages": 69, "remoteSnapshotJpegQualityLevel": 100, "remoteSnapshotScreenOrientation": "Landscape", "remoteSnapshotHandlerUrl": "", "useWireless": false, "ssid": "", "passphrase": "", "timeServer": "http://time.brightsignnetwork.com", "idleScreenColor": { "r": 0, "g": 0, "b": 0, "a": 1 }, "contentDataTypeEnabledWired": true, "textFeedsDataTypeEnabledWired": true, "healthDataTypeEnabledWired": true, "mediaFeedsDataTypeEnabledWired": true, "logUploadsXfersEnabledWired": true, "contentDataTypeEnabledWireless": true, "textFeedsDataTypeEnabledWireless": true, "healthDataTypeEnabledWireless": true, "mediaFeedsDataTypeEnabledWireless": true, "logUploadsXfersEnabledWireless": true, "rateLimitModeOutsideWindow": "default", "rateLimitRateOutsideWindow": 0, "rateLimitModeInWindow": "unlimited", "rateLimitRateInWindow": 0, "rateLimitModeInitialDownloads": "unlimited", "rateLimitRateInitialDownloads": 0, "networkConnectionPriority": "wired", "networkDiagnosticsEnabled": false, "testEthernetEnabled": false, "testWirelessEnabled": false, "testInternetEnabled": false, "useCustomSplashScreen": false, "BrightWallName": "", "BrightWallScreenNumber": "", "specifyHostname": false, "hostname": "", "useProxy": false, "proxyAddress": "", "proxyPort": 0, "networkHosts": [], "contentDownloadsRestricted": false, "contentDownloadRangeStart": 0, "contentDownloadRangeEnd": 0, "heartbeatsRestricted": false, "heartbeatsRangeStart": 0, "heartbeatsRangeEnd": 0, "useDHCP": true, "staticIPAddress": "", "subnetMask": "", "gateway": "", "dns1": "", "dns2": "", "dns3": "", "useDHCP_2": true, "staticIPAddress_2": "", "subnetMask_2": "", "gateway_2": "", "dns1_2": "", "dns2_2": "", "dns3_2": "", "rateLimitModeOutsideWindow_2": "default", "rateLimitRateOutsideWindow_2": 0, "rateLimitModeInWindow_2": "unlimited", "rateLimitRateInWindow_2": 0, "rateLimitModeInitialDownloads_2": "unlimited", "rateLimitRateInitialDownloads_2": 0, "usbUpdatePassword": "", "remoteDwsEnabled": true } ``` -------------------------------- ### GET /v1/download-firmware Request Example Source: https://docs.brightsign.biz/developers/ldws-general-endpoints Example HTTP request to download and initiate a firmware update on a BrightSign player, specifying the firmware URL. ```text GET /api/v1/download-firmware/?url=https://bsncloud.s3.amazonaws.com/public/cobra-9.0.110-update.bsfw HTTP/1.1 Host: {{playerIP}} Authorization: {{DigestAuth}} Accept: application/json ``` -------------------------------- ### GET User Request Example Source: https://docs.brightsign.biz/developers/users-endpoints-202206 Example of a GET request to retrieve user information. Includes Host, Authorization, and If-Modified-Since headers. ```text GET /2022/06/REST/Users/JaneDoe%40brightsign.biz/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} If-Modified-Since: Wed, 20 Dec 2023 21:32:34 GMT Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### GET Presentation by ID Request Example Source: https://docs.brightsign.biz/developers/presentations-endpoints-202206 Example of a GET request to retrieve a specific presentation by its ID. Includes required headers and parameters. ```text GET /2022/06/REST/Presentations/123456/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} If-Modified-Since: Wed, 20 Dec 2023 21:32:34 GMT Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### GET /health/ Response Example Source: https://docs.brightsign.biz/developers/rdws-information-endpoints Example JSON response for a GET request to the /health/ endpoint, showing player status and the time of the response. ```json { "route": "/v1/health", "method": "GET", "data": { "result": { "status": "active", "statusTime": "2024-01-30 07:38:05 PST" } } } ``` -------------------------------- ### GET /advanced/property-lock/ Request Example Source: https://docs.brightsign.biz/developers/rdws-advanced-endpoints Example of a GET request to retrieve the current property-lock settings. Ensure the Authorization header is correctly set. ```text GET /rest/v1/advanced/property-lock/ HTTP/1.1 Host: ws.bsn.cloud Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json ``` -------------------------------- ### Example POST Request Headers for B-Deploy Setup Source: https://docs.brightsign.biz/developers/b-deploy-setup-endpoints-v3 This snippet shows the necessary headers for making a POST request to create a setup package on the B-Deploy server. Ensure your token and content type are correctly set. ```none POST /rest-setup/v3/setup HTTP/1.1 Host: provision.bsn.cloud Authorization: {{Bearer Token}} Content-Type: application/json Content-Length: 10427 Accept: application/json ``` -------------------------------- ### GET /Root/{path} Request Example Source: https://docs.brightsign.biz/developers/operations-endpoint-202206 Example of a GET request to retrieve a subset of business operations. The 'path' parameter is set to 'User/UpdateUser'. ```text GET /2022/06/REST/Operations/Root/User%2FUpdateUser HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### POST /Setups/Tokens/ Request Example Source: https://docs.brightsign.biz/developers/provisioning-endpoints-202206 Use this snippet to issue a token for registering players in the current network. Ensure your Authorization header includes a valid UserAccessToken. ```text POST /2022/06/REST/Provisioning/Setups/Tokens/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### GET / Roles Request Example Source: https://docs.brightsign.biz/developers/roles-endpoints-202206 Example of a GET request to retrieve a paginated list of roles. It demonstrates setting the marker and pageSize query parameters. ```text GET /2022/06/REST/Roles/?marker=4kfak45jfk0915NVe&pageSize=1 HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ``` -------------------------------- ### GET /Operations Request Example Source: https://docs.brightsign.biz/developers/playlistsdynamic-endpoints-202206 Example of an HTTP GET request to retrieve operational permissions. Ensure the Authorization header includes a valid UserAccessToken. ```text GET /2022/06/REST/Playlists/Dynamic/Operations/ HTTP/1.1 Host: api.bsn.cloud Connection: Keep-Alive Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Accept-Encoding: gzip,deflate ```