POST /
Creates a user instance on a network
Required Scope Token
bsn.api.main.users.create
______________________________________________________________
Request Body
The User Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
Code Block |
---|
POST /2022/06/REST/Users/ 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 Content-Type: application/json Content-Length: 468 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
{ "id": 0, "person": { "id": 0, "login": "JohnDoe@host.com", "password": null, "firstName": "John", "lastName": "Doe", "creationDate": "0001-01-01T00:00:00", "lastModifiedDate": "0001-01-01T00:00:00", "activationDate": null }, "description": "Supervisor", "creationDate": "0001-01-01T00:00:00", "lastLoginDate": null, "isLockedOut": false, "lastLockoutDate": null, "roleName": "Viewers", "permissions": [] } |
______________________________________________________________
Response
Success Response Body
201: Returns the User Entity created and referenced by the Uri (given by the Location header field) in the response.
Example
Code Block | ||
---|---|---|
| ||
{ "id": 12345, "person": { "id": 12345, "login": "JohnDoe@host.com", "password": "7t#Sqg7*", "firstName": "John", "lastName": "Doe", "creationDate": "2024-01-03T19:05:26.5480648Z", "lastModifiedDate": "2024-01-03T19:05:26.5480648Z", "activationDate": "2024-01-03T19:05:26.5480648Z" }, "description": "Supervisor", "creationDate": "2024-01-03T19:05:26.6198305Z", "lastModifiedDate": "2024-01-03T19:05:26.9953066Z", "lastLoginDate": null, "isLockedOut": false, "lastLockoutDate": null, "roleName": "Viewers", "permissions": [ { "entityId": 30912, "operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e", "principal": { "login": "JohnDoe@host.com", "type": "User", "id": 12345 }, "isFixed": true, "isInherited": false, "isAllowed": true, "creationDate": "2024-01-03T19:05:26.9953066Z" } ] } |
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
GET /{login}/
Returns information for a specified user on a network
Required Scope Token
bsn.api.main.users.retrieve
______________________________________________________________
Segment
login
string
The login information of the user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJaneDoe@brightsign.biz
Code Block |
---|
GET /2022/06/REST/Users/JaneDoe%40brightsign.biz/ 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 Response with Body
200: Returns the User Entity
Example
This is an example of a successful 200 level response:
Code Block | ||
---|---|---|
| ||
{ "id": 123456, "person": { "id": 12345, "login": "JaneDoe@brightsign.biz", "password": null, "firstName": "Jane", "lastName": "Doe", "creationDate": "2020-07-09T19:05:20.247Z", "lastModifiedDate": "2023-11-29T17:40:54.403Z", "activationDate": "2020-07-09T19:05:38.723Z" }, "description": "Network Administrator", "creationDate": "2020-07-09T19:09:04.98Z", "lastModifiedDate": "2020-08-17T20:49:48.377Z", "lastLoginDate": "2024-01-03T19:05:23.98Z", "isLockedOut": false, "lastLockoutDate": null, "roleName": "Administrators", "permissions": [ { "entityId": 123456, "operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e", "principal": { "login": "JaneDoe@brightsign.biz", "type": "User", "id": 12345 }, "isFixed": true, "isInherited": false, "isAllowed": true, "creationDate": "2020-08-17T20:49:48.353Z" } ] } |
Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
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 path does not exist)
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
PUT /{login}/
Updates information for a specified user on a network
Required Scope Token
bsn.api.main.users.update
______________________________________________________________
Segment
login
string
The login information of the user
______________________________________________________________
Request Body
The User Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJaneDoe@brightsign.biz
Code Block |
---|
PUT /2022/06/REST/Users/JaneDoe%40brightsign.biz/ 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 Content-Type: application/json Content-Length: 1440 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
{ "id": 123456, "person": { "id": 12345, "login": "JaneDoe@brightsign.biz", "password": null, "firstName": "Jane", "lastName": "Doe", "creationDate": "2020-07-09T19:05:20.247Z", "lastModifiedDate": "2023-11-29T17:40:54.403Z", "activationDate": "2020-07-09T19:05:38.723Z" }, "description": "Network Administrator", "creationDate": "2020-07-09T19:09:04.98Z", "lastModifiedDate": "2020-08-17T20:49:48.377Z", "lastLoginDate": "2024-01-03T19:05:23.98Z", "isLockedOut": false, "lastLockoutDate": null, "roleName": "Administrators", "permissions": [ { "entityId": 123456, "operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e", "principal": { "login": "JaneDoe@brightsign.biz", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "2020-08-17T20:49:48.377Z" } ] } |
______________________________________________________________
Response
Success
204: The user information has been updated
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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 path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{login}/
Deletes the specified user on a network
Required Scope Token
bsn.api.main.users.delete
______________________________________________________________
Segment
login
string
The login information of the user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJohnDoe@host.com
Code Block |
---|
DELETE /2022/06/REST/Users/JohnDoe%40host.com/ 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
204: The specified user information was successfully deleted
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, or it is rejected in accordance with the business rules
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 path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
5XX: Any 500 code is an internal server error
GET /{id:int}/
Returns information for a specified user on a network.
Required Scope Token
bsn.api.main.users.retrieve
______________________________________________________________
Segment
id
int
A unique identifier for a user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
Code Block |
---|
GET /2022/06/REST/Users/12345/ 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 Response with Body
200: Returns the User Entity
Example
This is an example of a 200 level response:
Code Block | ||
---|---|---|
| ||
{ "id": 12345, "person": { "id": 12345, "login": "JaneDoe@brightsign.biz", "password": null, "firstName": "Jane", "lastName": "Doe", "creationDate": "2020-07-09T19:05:20.247Z", "lastModifiedDate": "2023-11-29T17:40:54.403Z", "activationDate": "2020-07-09T19:05:38.723Z" }, "description": "Network Administrator", "creationDate": "2020-07-09T19:09:04.98Z", "lastModifiedDate": "2020-08-17T20:49:48.377Z", "lastLoginDate": "2024-01-03T19:05:23.98Z", "isLockedOut": false, "lastLockoutDate": null, "roleName": "Administrators", "permissions": [ { "entityId": 123456, "operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e", "principal": { "login": "JaneDoe@brightsign.biz", "type": "User", "id": 12345 }, "isFixed": true, "isInherited": false, "isAllowed": true, "creationDate": "2020-08-17T20:49:48.353Z" } ] } |
Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
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 path does not exist)
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
PUT /{id:int}/
Update the given user instance
Required Scope Token
bsn.api.main.users.update
______________________________________________________________
Segment
id
int
A unique identifier for a user
______________________________________________________________
Request Body
The User Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
Code Block |
---|
PUT /2022/06/REST/Users/12345/ 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 Content-Type: application/json Content-Length: 1440 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
{ "id": 12345, "person": { "id": 12345, "login": "JaneDoe@brightsign.biz", "password": null, "firstName": "Jane", "lastName": "Doe", "creationDate": "2020-07-09T19:05:20.247Z", "lastModifiedDate": "2023-11-29T17:40:54.403Z", "activationDate": "2020-07-09T19:05:38.723Z" }, "description": "Network Administrator", "creationDate": "2020-07-09T19:09:04.98Z", "lastModifiedDate": "2020-08-17T20:49:48.377Z", "lastLoginDate": "2024-01-03T19:05:23.98Z", "isLockedOut": false, "lastLockoutDate": null, "roleName": "Administrators", "permissions": [ { "entityId": 123456, "operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e", "principal": { "login": "JaneDoe@brightsign.biz", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "2020-08-17T20:49:48.353Z" } ] } |
______________________________________________________________
Response
Success
204: The user information has been updated
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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 path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{id:int}/
Deletes the specified user on a network
Required Scope Token
bsn.api.main.users.delete
______________________________________________________________
Segment
id
int
A unique identifier for a user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
Code Block |
---|
DELETE /2022/06/REST/Users/12345/ 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
204: The specified user information was successfully deleted
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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 path does not exist)
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource changed since the time specified in the “If-Unmodified-Since” header value)
5XX: Any 500 code is an internal server error
GET /Operations/
Returns the operational permissions granted to roles for specific business operations
Required Scope Token
bsn.api.main.operations.retrieve
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
Code Block |
---|
GET /2022/06/REST/Users/Operations/ 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 Response Body
200: Returns theBusiness Operations Entity
Example
Expand | |||||
---|---|---|---|---|---|
| |||||
|
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
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 /{id:int}/Permissions/
Includes object permissions for a given user instance.
Required Scope Token
bsn.api.main.users.retrieve
______________________________________________________________
Segment
id
int
A unique identifier for a user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
Code Block |
---|
GET /2022/06/REST/Users/12345/Permissions/ 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 Response Body
200: Returns an array of Permission entities
Example
Code Block | ||
---|---|---|
| ||
[ { "entityId": 54321, "operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e", "principal": { "login": "JaneDoe@brightsign.biz", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "2020-08-17T20:49:48.353Z" } ] |
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 path does not exist)
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
POST /{id:int}/Permissions/
Adds permissions for a specified user on a network
Required Scope Token
bsn.api.main.users.update
______________________________________________________________
Segment
id
int
A unique identifier for a user
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12435
Code Block |
---|
POST /2022/06/REST/Users/12345/Permissions/ 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 Content-Type: application/json Content-Length: 245 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
[ { "entityId": 54321, "operationUID": "c978aa8d-c7ac-410f-aec3-22e136d0ba58", "principal": { "login": "JaneDoe@brightsign.biZ", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "0001-01-01T00:00:00" } ] |
______________________________________________________________
Response
Success
204: The permissions were successfully added to the specified user instance
Failure
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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 path does not exist)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{id:int}/Permissions/
Removes permissions for a specified user on a network
Required Scope Token
bsn.api.main.users.update
______________________________________________________________
Segment
id
int
A unique identifier for a user
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
Code Block |
---|
DELETE /2022/06/REST/Users/12345/Permissions/ 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 Content-Type: application/json Content-Length: 245 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
[ { "entityId": 54321, "operationUID": "39e69897-8d9a-f634-95cf-7419a3e93c23", "principal": { "login": "JaneDoe@brightsign.biZ", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "0001-01-01T00:00:00" } ] |
______________________________________________________________
Response
Success
204: The specified user permissions were successfully deleted
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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 path does not exist)
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 /{login}/Permissions/
Includes object permissions for a given user instance.
Required Scope Token
bsn.api.main.users.retrieve
______________________________________________________________
Segment
login
string
The login information of the user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJohnDoe@brightsign.biz
Code Block |
---|
GET /2022/06/REST/Users/JohnDoe%40brightsign.biz/Permissions/ 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 Response Body
200: Returns an array of Permission entities
Example
Code Block | ||
---|---|---|
| ||
[ { "entityId": 54321, "operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e", "principal": { "login": "JohnDoe@brightsign.biz", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "2020-08-17T20:49:48.353Z" } ] |
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 path does not exist)
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
POST /{login}/Permissions/
Adds permissions for a specified user on a network
Required Scope Token
bsn.api.main.users.update
______________________________________________________________
Segment
login
string
The login information of the user
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJohnDoe@brightsign.biz
Code Block |
---|
POST /2022/06/REST/Users/JohnDoe%40brightsign.biz/Permissions/ 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 Content-Type: application/json Content-Length: 322 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
[ { "entityId": 54321, "operationUID": "c978aa8d-c7ac-410f-aec3-22e136d0ba58", "principal": { "login": "JohnDoe@brightsign.biZ", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "0001-01-01T00:00:00" } ] |
______________________________________________________________
Response
Success
204: The permissions were successfully added to the specified user instance
Failure
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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 path does not exist)
415: The server cannot accept the data representation that you sent (as specified in the "Content-Type" header)
5XX: Any 500 code is an internal server error
DELETE /{login}/Permissions/
Removes permissions for a specified user on a network
Required Scope Token
bsn.api.main.users.update
______________________________________________________________
Segment
login
string
The login information of the user
______________________________________________________________
Request Body
An array of Permission entities
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJohnDoe@brightsign.biz
Code Block |
---|
DELETE /2022/06/REST/Users/JohnDoe%40brightsign.biz/Permissions/ 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 Content-Type: application/json Content-Length: 232 |
This is the example request body:
Code Block | ||
---|---|---|
| ||
[ { "entityId": 54321, "operationUID": "39e69897-8d9a-f634-95cf-7419a3e93c23", "principal": { "login": "JohnDoe@brightsign.biZ", "type": "User", "id": 12345 }, "isFixed": false, "isInherited": false, "isAllowed": true, "creationDate": "0001-01-01T00:00:00" } ] |
______________________________________________________________
Response
Success
204: The specified user permissions were successfully deleted
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
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 path does not exist)
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 /{id:int}/Tokens/{token}/
Validates the user access or refresh token granted to a specified user
Required Scope Token
bsn.api.main.users.token.validate
______________________________________________________________
Segments
id
int
A unique identifier for a user
token
string
A user access or refresh token for a BSN.cloud network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
token
is set to{{UserAccessToken}}
Code Block |
---|
GET /2022/06/REST/Users/12345/Tokens/{{UserAccessToken}}/ 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 Response Body
200: Returns theToken Info Entity
Example
Code Block | ||
---|---|---|
| ||
{ "token": "{{UserAccessToken}}", "scope": "add_device_setup bsn.api.main bsn.api.self bsn.api.upload bsn.ui.main player", "validFrom": "2024-01-03T22:57:10Z", "validTo": "2024-01-03T23:12:10Z" } |
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 path does not exist)
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 /{id:int}/Tokens/{token}/
Revokes user access or refresh tokens for the specified user
Required Scope Token
bsn.api.main.users.token.revoke
______________________________________________________________
Segments
id
int
A unique identifier for a user
token
string
The user access or refresh token to use with this endpoint call
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
id
is set to12345
token
is set to{{UserAccessToken}}
Code Block |
---|
DELETE /2022/06/REST/Users/12345/Tokens/{{UserAccessToken}}/ 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
204: The user access or refresh token has been successfully revoked from the specified user
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
401: The access token is invalid or not specified
403: The supplied access token, though valid, doesn't provide access to this method
404: Either the specified token is invalid, expired, or revoked, or it is issued for another user
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 /{login}/Tokens/{token}/
Validates the user access or refresh token granted to the specified user
Required Scope Token
bsn.api.main.users.token.validate
______________________________________________________________
Segments
login
string
The login for a user
token
string
A user access or refresh token for a BSN.cloud network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJohnDoe@brightsign.biz
token
is set to{{UserAccessToken}}
Code Block |
---|
GET /2022/06/REST/Users/JohnDoe%40brightsign.biz/Tokens/{{UserAccessToken}}/ 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 Response Body
200: Returns theToken Info Entity
Example
Code Block | ||
---|---|---|
| ||
{ "token": "{{UserAccessToken}}", "scope": "add_device_setup bsn.api.main bsn.api.self bsn.api.upload bsn.ui.main player", "validFrom": "2024-01-03T22:57:10Z", "validTo": "2024-01-03T23:12:10Z" } |
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 path does not exist)
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 /{login}/Tokens/{token}/
Revokes the user access or refresh token granted to the specified user
Required Scope Token
bsn.api.main.users.token.revoke
______________________________________________________________
Segments
login
string
The login for a user
token
string
A user access or refresh token for a BSN.cloud network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
login
is set toJohnDoe@brightsign.biz
token
is set to{{UserAccessToken}}
Code Block |
---|
DELETE /2022/06/REST/Users/JohnDoe%40brightsign.biz/Tokens/{{UserAccessToken}}/ 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
204: The user access or refresh token has been successfully revoked from the specified user
Failure
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: The request or request body is malformed and therefore invalid, or it is rejected in accordance with the business rules
401: The access token is invalid or not specified
403: The supplied access token, though valid, doesn't provide access to this method
404: Either the specified token is invalid, expired, or revoked, or it is issued for another user
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