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

A

______________________________________________________________

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

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