B-Deploy Device Endpoints (v2)
Â
These endpoints allow users to automatically provision BrightSign players over the internet. This endpoint handles everything regarding individual players if you add your serial number to BrightSign’s cloud storage with an associated player name, provisioning package name, and the URL where the provisioning package is hosted. The URL is optional - it can be left blank if using a setup package.
Base URL for these endpoints:Â Â https://provision.bsn.cloud/rest-device/v2/device/
GETÂ
Retrieves a device object associated with the B-Deploy account.
URL Parameters
_id
string: The unique identifier of the device object to retrieve. If this parameter is not included in the URL, the GET request will return all device objects associated with the account
___________________________________________________
Request Example
_id
is set toabcd123456789
GET /rest-device/v2/device/?_id=abcd123456789 HTTP/1.1
Host: provision.bsn.cloud
Content-Type: application/json
Authorization: {{Bearer Token}}
___________________________________________________
Success Response Body
200: Contains a single device object if the _id
 is specified in the URL; otherwise, this property contains the following:
total
int: The total number of device objects that belong to the B-Deploy accountmatched
int: The number of device objects contained in the responsePlayers
 device[ ]: An array of device objects. Each device object can contain the following properties:_id
string: The unique identifier of the device objectÂsetupId
 string: The id of the device setup object associated with the device object. The player will use the associated device setup to provision itself.serial
 string: The serial number of the player represented by the device objectcreatedAt
string:Â A UTC timestamp indicating when the device setup object was created. The date/time is formatted asÂyyyy-mm-ddThh:mm:ss.sssZ
updatedAt
 string: A UTC timestamp indicating when the device setup object was last modified. The date/time is formatted asÂyyyy-mm-ddThh:mm:ss.sssZ
url
string: An optional value of the Partner Application URL specified for a device to use when finding the application to download.client
 string__v
 string
Failure Response
400:Â The request is malformed and therefore invalid
401:Â The access token is invalid or not specified
403: The supplied access token, though valid, doesn't provide access to this method.
5XX:Â Any 500 code is an internal server error
POSTÂ
Adds a device object to the B-Deploy account. You must either pass an application package url
or a setupId
:
If you want to use
setupId
, you must add a setup record and then run POST /setup/ to get the id.If you want to directly download an application package to your device without worrying about setup, use
url
Request example bodies for both request types are below.
Request Body
username
string: The BSN.Cloud usernameserial
 string: The serial number of the player represented by the device objectname
string: The name of the setup fileNetworkName
 string: The name of the networkmodel
string optional: The player modeldesc
string: The player descriptionuserdata
string optional: Allows you to send additional header information with your setup or application package.url
 string optional: The URL from which the player will download its presentation as part of the final provisioning stepsetupId
 string optional: The id of the device setup object associated with the device object. The player will use the associated device setup to provision itself.
Request Example
POST /rest-device/v2/device HTTP/1.1
Host: provision.bsn.cloud
Content-Type: application/json
Authorization: {{Bearer Token}}
Content-Length: 252
This is an example request body with a url
:
{
"username": "JaneDoe@brightsign.biz",
"serial": "ABCD00000001",
"name": null,
"NetworkName": "Test",
"model": "",
"desc": "Jane's player",
"userdata": "",
"url": "https://provisiondemo.brightsignnetwork.com/autorun.zip"
}
This is an example request body with a setupId
:
___________________________________________________
Success Response
201: The unique identifier of the device object
Failure Response
400: The request is malformed and therefore invalid
401:Â The access token is invalid or not specified
403: The supplied access token, though valid, doesn't provide access to this methodÂ
415: The server cannot accept the data representation that you sent (as specified in the header)
5XX:Â Any 500 code is an internal server error
PUTÂ
Modifies a device object associated with the B-Deploy account.
Request Body
_id
string: The unique identifier of the device object to retrieveusername
string: The BSN.Cloud usernameserial
 string: The serial number of the player represented by the device objectname
string: The name of the setup fileNetworkName
 string: The name of the networkmodel
string optional: The player modeldesc
string: The player descriptionsetupId
 string: The id of the device setup object associated with the device object.userdata
string optional: Allows you to send additional header information with your setup or application package.
___________________________________________________
Request Example
_id
is set to123456789
This is the example request body:
___________________________________________________
Success Response
200: The existing device setup has been updated
Failure Response
400: Either the request or request body is malformed and therefore invalid
401:Â The access token is invalid or not specified
403: The supplied access token, though valid, doesn't provide access to this methodÂ
415: The server cannot accept the data representation that you sent (as specified in the header)
5XX:Â Any 500 code is an internal server error
DELETEÂ
Removes a device object from the B-Deploy account.
URL Parameters
You can pass either the id or the serial number of the player:
_id
string optional: The player database record identifierserial
string optional: The unique identifier of the player
___________________________________________________
Request Example
___________________________________________________
Success Response
200: The specified device object has been removed
Failure Response
400:Â The request is malformed and therefore invalid
401:Â The access token is invalid or not specified
403: The supplied access token, though valid, doesn't provide access to this methodÂ
5XX:Â Any 500 code is an internal server error
Â
Â
Â