Provisioning Endpoints (2020/10)
Â
The Provisioning resources allow users to setup players or change player setups.Â
Base URL for this endpoint:Â Â https://api.bsn.cloud/2020/10/REST/Provisioning
_________________________________________________________________________
POST /Setups/Tokens/
Issues a token which allows you to register players in the current network
Required Scope Token
bsn.api.main.devices.setups.token.create
______________________________________________________________
Request Body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
POST /2020/10/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
There is no request body since the required information is passed in the URL.
______________________________________________________________
Response
Success
200:Â A setup token has been issued for players on the specified network
Example
{
"token": {{token}},
"scope": "cert",
"validFrom": "2024-05-21T00:00:00Z",
"validTo": "2024-11-17T00:00:00Z"
}
Failure
300:Â The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
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Â
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
5XX:Â Any 500 code is an internal server error
Â
GET /Setups/Tokens/{token}/
Validates a player setup token on the current network and retrieves its metadata
Required Scope Token
bsn.api.main.devices.setups.token.validate
______________________________________________________________
Segment
token
string
An OAuth2 token for player registration in the current network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
token
is set to{{Token}}
GET /2020/10/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
______________________________________________________________
Response
Success
200:Â Returns a Token Info Entity (2020/10)
Example
Failure
300:Â The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
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Â
404: The server cannot find the requested resource (the token is expired or invalid)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
5XX:Â Any 500 code is an internal server error
Â
DELETE /Setups/Tokens/{token}/
Revokes a player setup token on the current network
Required Scope Token
bsn.api.main.devices.setups.token.revoke
______________________________________________________________
Segment
token
string
An OAuth2 token for player registration in the current network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
token
is set to{{Token}}
______________________________________________________________
Response
Success Response Body
204: The player setup token has been revoked
Failure
300:Â The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
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
404: The server cannot find the requested resource (the token is expired or invalid)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
500: Any 500 code is an internal server error