Cloud APIs
...
B-Deploy/Provisioning APIs
Version 2.0 B-Deploy Endpoints
B-Deploy Device Endpoints (v2)
20 min
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 collection of provision records which belong to your network in b deploy url parameters query\[networkname] string string required required the bsn cloud/bsn com network name sort\[serial] byte byte optional optional a flag which defines whether the returned list should be sorted by player serial page\[pagenum] number number optional optional an index of a page in the paged list to retrieve page\[pagesize] number number optional optional the maximum number of provision records on a page in the paged list request example query\[networkname] is set to janedoenetwork sort\[serial] is set to 1 page\[pagenum] is set to 1 page\[pagesize] is set to 20 get /rest device/v2/device/?query%5bnetworkname%5d%3djanedoenetwork%26sort%5bserial%5d%3d1%26page%5bpagenum%5d%3d1%26page%5bpagesize%5d%3d20 http/1 1 host provision bsn cloud connection keep alive authorization {{bearer token}} accept application/json accept encoding gzip,deflate success response body 200 200 returns a paged list of provision record entity (v2) docid\ os9y0az6jykvqybb9vujv response example { "error" null, "result" { "total" 1, "matched" 1, "players" \[ { " id" "1a2b3c4d5e6f7a8b9c0d1e2f", "client" "baconnected", "networkname" "janedoenetwork", "username" "janedoe\@brightsign biz", "serial" "123456789012", "name" "my player", "model" "xc4055", "desc" "brand new player", "setupname" "my setup package", "createdat" "2024 08 25t13 38 00 042z", "updatedat" "2024 08 25t13 38 00 042z", " v" 0 } ], "priv" "user" } } failure response 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 5xx 5xx any 500 code is an internal server error get /? id={string} retrieves a provision record from b deploy which has the specified id query string parameter id string string required required the unique identifier of the provision record to retrieve if this parameter is not included in the url, the get request will return all provision records associated with the account request example id is set to 1a2b3c4d5e6f7a8b9c0d1e2f get /rest device/v2/device/? id=1a2b3c4d5e6f7a8b9c0d1e2f http/1 1 host provision bsn cloud connection keep alive authorization {{bearer token}} accept application/json accept encoding gzip,deflate success response body 200 200 returns the specified provision record entity (v2) docid\ os9y0az6jykvqybb9vujv response example { "error" null, "result" { " id" "1a2b3c4d5e6f7a8b9c0d1e2f", "client" "baconnected", "networkname" "janedoenetwork", "username" "janedoe\@brightsign biz", "serial" "abcd00000001", "name" "provisiontest", "model" "xc4055", "desc" "brand new player", "setupname" "my setup package", "createdat" "2024 08 25t13 38 00 042z", "updatedat" "2024 08 25t13 38 00 042z", " v" 0 } } failure response 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the server cannot find the requested resource (the path does not exist) 5xx 5xx any 500 code is an internal server error get /?serial={string} retrieves a provision record from b deploy created for a player having the specified serial query string parameter serial string string required required the serial of a player which is specified by a provision record if this parameter is not included in the url, the get request will return all provision records associated with the account request example serial is set to abcd00000001 get /rest device/v2/device/?serial=abcd00000001 http/1 1 host provision bsn cloud connection keep alive authorization {{bearer token}} accept application/json accept encoding gzip,deflate success response body 200 200 returns the specified provision record entity (v2) docid\ os9y0az6jykvqybb9vujv response example { "error" null, "result" { "total" 1, "matched" 1, "players" \[ { " id" "1a2b3c4d5e6f7a8b9c0d1e2f", "client" "baconnected", "networkname" "janedoenetwork", "username" "janedoe\@brightsign biz", "serial" "abcd00000001", "name" "provisiontest", "model" "xc4055", "desc" "brand new player", "setupname" "my setup package", "createdat" "2024 08 25t13 38 00 042z", "updatedat" "2024 08 25t13 38 00 042z", " v" 0 } ], "priv" "user" } } failure response 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 5xx 5xx any 500 code is an internal server error post creates a provision record for a specific player and refers to either a setup package stored in b deploy or provided by an external service request body username string string required required the login of the person who owns the record note that the person may or may not be registered in bsn cloud serial string string required required the serial number of the player represented by the provision record name string string optional optional the name that the target player will get as a result of provisioning when specified, it overrides the values specified in the referenced setup package networkname string string required required the name of the network to which the specified player should be provisioned model string string optional optional the model of the player which has the specified serial desc string string optional optional the description that the target player will get in result of provisioning when specified, it overrides the values specified in the referenced setup package setupid string string optional optional the unique identifier of the setup package stored in b deploy and managed using the pss api documented in b deploy setup endpoints (v2) docid\ xgmcfqzr1pdbve tqeqxb setupname string string optional optional the descriptive name of a setup package stored in b deploy and managed using the pss api documented in b deploy setup endpoints (v2) docid\ xgmcfqzr1pdbve tqeqxb url string string optional optional the url from which the player will download its presentation as part of the final provisioning step userdata string string optional optional allows you to allows you to provide additional attributes to a custom setup package request example 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 this is an example request body with a setupid and setupname { "username" "janedoe\@brightsign biz", "serial" "abcd00000001", "name" "provisiontest", "networkname" "test", "model" "xc4055", "desc" "jane's player", "setupid" "f2e1d0c9b8a7f6e5d4c3b2a1", "setupname" "my setup package", "userdata" "" } this is an example request body with a url { "username" "janedoe\@brightsign biz", "serial" "abcd00000001", "name" null, "networkname" "test", "model" "xc4055", "desc" "jane's player", "userdata" "key=value", "url" "https //provisiondemo brightsignnetwork com/autorun zip" } success response 201 201 returns the unique identifier of a provision record created in b deploy and added to your network failure response 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 415 415 the server cannot accept the data representation that you sent (as specified in the header) 5xx 5xx any 500 code is an internal server error put /? id={string} modifies a provision record of a specified player in b deploy request body id string string required required the unique identifier (a 24 digits long hexadecimal number) of the device object username string string required required the login of the person who owns the record note that the person may or may not be registered in bsn cloud serial string string required required the serial number of the player represented by the provision record name string string optional optional the name that the target player will get as a result of provisioning when specified, it overrides the values specified in the referenced setup package networkname string string required required the name of the network to which the specified player should be provisioned model string string optional optional the model of the player which has the specified serial desc string string optional optional the description that the target player will get as a result of provisioning when specified, it overrides the values specified in the referenced setup package setupid string string optional optional the unique identifier of the setup package stored in b deploy and managed using the pss api documented on b deploy setup endpoints (v2) docid\ xgmcfqzr1pdbve tqeqxb setupname string string optional optional the descriptive name of a setup package stored in b deploy and managed using the pss api documented on b deploy setup endpoints (v2) docid\ xgmcfqzr1pdbve tqeqxb url string string optional optional refers to the setup package or handler provided by external services, like partner applications userdata string string optional optional an optional property which allows you to provide additional attributes to a custom setup package request example this method requires an url property value with an absolute url value format or a pair of setupid and setupname property values put /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 283 this is the url example request body { " id" "1a2b3c4d5e6f7a8b9c0d1e2f", "username" "janedoe\@brightsign biz", "serial" "abcd00000001", "name" "provisiontest", "networkname" "test", "model" "xc4055", "desc" "jane's player", "url" "https //www janeplayers com/setups/autorun zip", "userdata" "key=value" } this is the setupid and setupname example request body { " id" "1a2b3c4d5e6f7a8b9c0d1e2f", "username" "janedoe\@brightsign biz", "serial" "abcd00000001", "name" "provisiontest", "networkname" "test", "model" "xc4055", "desc" "jane's player", "setupid" "f2e1d0c9b8a7f6e5d4c3b2a1", "setupname" "my setup package", "userdata" "" } success response 200 200 the existing provision record properties have been updated failure response 400 400 either the request or request body is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 415 415 the server cannot accept the data representation that you sent (as specified in the header) 5xx 5xx any 500 code is an internal server error delete /? id={string} removes a provision record having the specified id in b deploy query string parameter id string string required required the player database record identifier request example id is set to 1a2b3c4d5e6f7a8b9c0d1e2f delete /rest device/v2/device/? id=1a2b3c4d5e6f7a8b9c0d1e2f http/1 1 host provision bsn cloud content type application/json authorization {{bearer token}} accept application/json accept encoding gzip,deflate success response 200 200 the specified provision record has been removed failure response 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 a provision record with the specified id does not exist 5xx 5xx any 500 code is an internal server error delete /?serial={string} removes a provision record related to a player having the specified serial number in b deploy query string parameter serial string string required required the player serial request example serial is set to abcd00000001 delete /rest device/v2/device/?serial=abcd00000001 http/1 1 host provision bsn cloud content type application/json authorization {{bearer token}} accept application/json accept encoding gzip,deflate success response 200 200 the specified provision record has been removed failure response 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 a provision record with the specified serial number does not exist 5xx 5xx any 500 code is an internal server error delete /ids/{array} removes a collection of provision records having the specified identifiers in b deploy segment array string\[] string\[] an array of provision record identifiers request example array is set to \["1a2b3c4d5e6f7a8b9c0d1e2f"] delete /rest device/v2/device/ids/\["1a2b3c4d5e6f7a8b9c0d1e2f"] http/1 1 host provision bsn cloud connection keep alive authorization {{bearer token}} accept application/json accept encoding gzip,deflate success response 200 200 the request is executed successfully and the indication of which records have been removed is in the response payload response example { "error" null, "result" { "deletedcount" 1, "deletedids" \["1a2b3c4d5e6f7a8b9c0d1e2f"], "failedids" \[], "message" "all players were deleted successfully" } } failure response 400 400 the request is malformed and therefore invalid 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 5xx 5xx any 500 code is an internal server error