Cloud APIs
Postman Collections
9 min
this is a collection of sample endpoint calls to introduce users to our infrastructure it is not a comprehensive document of our available endpoints please see the docid\ goemci9nmvgakttr5qcjs , docid\ kku9e7f7chc5lwofxs9e0 , and docid\ wccw4tqerzpxv7kjq a3p endpoint documentation for a complete list of those endpoints and their usage prerequisites a postman account if necessary, go to https //www postman com/downloads/ to download postman and create a free account a brightsign player with an active internet connection a bsn cloud account with at least one network access to the https //adminpanel bsn cloud the two files below create client credentials before you can use the apis, you need to create an application in the bsn cloud https //adminpanel bsn cloud/en/auth/signin to get a client id and client secret see docid 1nn8bxjbolvudos yfr3d for instructions client secrets expire every 180 days set a reminder to rotate them before expiry import the collection & environment import the environment open postman and select import at the top left drag and drop (or browse to) the bsn cloud production postman environment json file select import to confirm import the collection select import again drag and drop (or browse to) the bsn cloud api 2022 06 postman collection json file select import to confirm activate the environment select bsn cloud production from the environment dropdown in the top right corner (it may say "no environment"), as shown in image 1 the environment is now active — all {{variable}} references in the collection will resolve using these values configure environment variables click the eye icon next to the environment dropdown to view and edit your environment variables you need to set a few values before making any requests required variables variable what to enter example clientid your client id from the admin panel a1b2c3d4 e5f6 7890 abcd ef1234567890 clientsecret your client secret from the admin panel abcdefghijklmnopqrstuvwx networkname the name of the network you want to work with mycompanynetwork optional variables (set as needed) variable purpose networkid numeric network id (alternative to networkname) playerserial serial number of a player (for dws and device requests) playermodel player model string (for b deploy) devicename name for a device (for b deploy) setupname b deploy setup package name partnerlogin your bsn cloud login email (for b deploy requests) applicationid application id for secret rotation (not the client id) auto populated variables token set by "get access token" setupid set by "post /setup/" deviceid set by "post /device/" deviceregtoken , deviceregtokenscope , deviceregtokenvalidfrom , deviceregtokenvalidto set by "get device registration token" enter values in the current value column (not the initial value column) to keep your credentials local and prevent them from being synced to postman's cloud authentication workflow the bsn cloud api uses a two step authentication process you must complete both steps before making any other api calls step 1 get an access token in the collection sidebar, expand the authentication folder select get access token click send this sends a post request to the brightsign auth server using the oauth2 client credentials flow the request uses http basic authentication with your client id and client secret (handled automatically by postman's auth tab) on success, the test script automatically saves the access token to the {{token}} environment variable step 2 set the network select set network (by name) (or set network (by id) if you prefer) select send this tells the bsn cloud api which network you want to work with in this session the request uses the token obtained in step 1 an http 204 no content empty body response is normal and means success after both steps complete successfully, all other requests in the collection will work using the {{token}} variable that was automatically set every time you get a new access token, you must set the network again the token expires after 5 minutes 30 seconds , but the network session lasts 24 hours troubleshooting could not get any response" or connection timeout verify you have internet connectivity check that the urls in your environment are correct (click the eye icon to verify) ensure your corporate firewall/proxy allows connections to bsn cloud 204 no content on set network (but subsequent calls fail) the network name may be misspelled names are case sensitive verify the network exists and your account has access to it try set network (by id) instead of the numeric network id 400 bad request on set network the specified network does not exist or you don't have access to it double check the networkname or networkid in your environment 401 unauthorized on get access token double check your clientid and clientsecret values in the environment (look for extra spaces or missing characters) verify your client secret hasn't expired (180 day limit) if it has run get access token again run set network again retry your original request make sure you're entering values in the current value column 401 unauthorized on other requests your access token has expired (it has a five minute 30 second lifetime) you must run get access token and set network again make sure the environment dropdown (top right) is set to bsn cloud production 403 forbidden your application doesn't have the required scope for this api call go to the admin panel, edit your application, and add the necessary features then get a new access token (scope changes don't take effect on existing tokens) 404 not found check that the url path is correct