GET /time/
Retrieves the date and time as configured on the player. The date/time value is formatted as "yyyy-mm-dd hh:mm:ss <timezone>"
. This call is identical to using the Node.js® time API.
Request Example
GET /rest/v1/time/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1 Host: ws.bsn.cloud Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json
Response Example
{ "route": "/v1/time", "method": "GET", "data": { "result": { "time": "2018-10-18 14:34:34 PDT", "timezone_mins": null, "timezone_name": "America/Los_Angeles", "timezone_abbr": "PDT", "year": 2018, "month": 10, "date": 18, "hour": 14, "minute": 34, "second": 34, "millisecond": 569 } } }
PUT /time/
Sets the date/time on the player
Request Body Parameters
time
string: The time to set on the player, formatted as"hh:mm:ss <timezone>"
date
string: The date to set on the player, formatted as"yyyy-mm-dd"
applyTimezone
bool: A flag specifying whether the date and time should be applied using the time zone configured on the player (true
) or the UTC time zone (false
)
Request Example
PUT /rest/v1/time/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1 Host: ws.bsn.cloud Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json Content-Type: application/json Content-Length: 117
This is the example request body:
{ "data": { "time": "22:00:00", "date": "2023-11-07", "applyTimezone": true } }
Response Example
A successful response would be a 200 status code with the following body:
{ "data": { "result": true } }
GET /health/
Retrieves the current status of the player. Currently, this endpoint is only used to determine if a player can respond to a WebSockets request; it cannot determine the error state of a player.
Request Example
GET /rest/v1/health/?destinationType=player&destinationName={{deviceSerial}} HTTP/1.1 Host: ws.bsn.cloud Authorization: Bearer {{UserAccessToken}} Accept: application/json, application/vnd.bsn.error+json
Response Body
status
string: The player status. The only possible value is "active".statusTime
string: The date and time the player responded to the status request. The date/time is formatted as"yyyy-mm-dd hh:mm:ss <timezone>"
.
Response Example
{ "route": "/v1/health", "method": "GET", "data": { "result": { "status": "active", "statusTime": "2024-01-30 07:38:05 PST" } } }