Self Endpoints (2022/06)
These endpoints allow users to manage their settings in the current network.
Base URL for these endpoints: https://api.bsn.cloud/2022/06/REST
_________________________________________________________________________
GET /Self/
Returns your Person EntityPerson Entity (2022/06) information
Required Scope Token
bsn.api.self.info.retrieve
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- The optional If-Modified-Since header value equals the Last-Modified header value retrieved from the GET /Self/ response.
GET /2022/06/REST/Self/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
If-Modified-Since: Wed, 29 Nov 2023 17:40:51 GMT____________________________________________________________
Success Response with Body
200: Returns the Person EntityPerson Entity
Example
This is an example of a 200 level response:
{
"id": 12345,
"login": "[email protected]",
"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"
}Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure Response
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
POST /Self/
Registers the person and returns your person credentials (except the password if it was provided in your request).
Required Scope Token
None
______________________________________________________________
Request Body
- The Person EntityPerson Entity. If you specify a password that matches our security policy, the server will apply the password you specify and will not return a password. If you do not specify a password, the server will generate a password and return it to you.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
POST /2022/06/REST/Self/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 309This is the example request body:
{
"id": 0,
"login": "[email protected]",
"password": null,
"firstName": "Jane",
"lastName": "Doe",
"creationDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00",
"activationDate": "0001-01-01T00:00:00"
}______________________________________________________________
Success Response Body
200: Returns the Person EntityPerson Entity
Example
{
"id": 12345,
"login": "[email protected]",
"password": "7t#Sqg7*",
"firstName": "Jane",
"lastName": "Doe",
"creationDate": "2023-12-01T16:47:03.3893279Z",
"lastModifiedDate": "2023-12-01T16:47:03.3893279Z",
"activationDate": null
}Failure Response
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 Any 500 code is an internal server error
GET /Self/Profile/
Returns a complete person profile
Required Scope Token
bsn.api.self.profile.retrieve
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
GET /2022/06/REST/Self/Profile/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: The return type is object, where property names are profile keys and the profile values are those property values
Example
{
"personAccessTokenLifetime": "00:15:00",
"personRefreshTokenLifetime": "1.00:00:00"
}Failure Response
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
5XX: Any 500 code is an internal server error
POST /Self/Profile/
Creates a new profile property for a person
Required Scope Token
bsn.api.self.profile.update
______________________________________________________________
Request Body
- pair <string, string>: A key value pair of the person profile property
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
POST /2022/06/REST/Self/Profile/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 44This is the example request body:
{
"key": "NewProperty1",
"value": "111"
}______________________________________________________________
Success Response Body
201: Returns the new resource created and referenced by the Uri (given by the Location header field) in the response. Returns an object where property names correspond to profile keys and property values correspond to profile names.
Example
{
"key": "NewProperty1",
"value": "111"
}Failure Response
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: Either the request is malformed and therefore invalid, or the specified profile property key is reserved or longer than 62 characters
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)
409: The person profile property with the specified key already exists
413: The length of the specified person property profile value exceeds the 64KB limit
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 /Self/Profile/{key}/
Returns a profile property value for a person
Required Scope Token
bsn.api.self.profile.retrieve
______________________________________________________________
Segment
- key string: The name of the profile property
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- key is set to PersonAccessTokenLifetime
GET /2022/06/REST/Self/Profile/PersonAccessTokenLifetime/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns a profile property value
Example
This is an example of a 200 level response:
"00:15:00"Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure Response
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 /Self/Profile/{key}/
Creates or updates a person profile property value
Required Scope Token
bsn.api.self.profile.update
______________________________________________________________
Segment
- key string: The name of the profile property
______________________________________________________________
Request Body
- string: The profile property value to update
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- key is set to PersonRefreshTokenLifetime
PUT /2022/06/REST/Self/Profile/PersonRefreshTokenLifetime/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 12This is the example request body:
"1.00:00:00"______________________________________________________________
Success Response
201: Returns this status code if the person property value is defined for first time
204: Returns this status code if the person property value already exists and has been updated
Failure Response
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)
413: The length of the specified user profile property exceeds the 64KB limit
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 /Self/Profile/{key}/
Removes a profile property for a person
Required Scope Token
bsn.api.self.profile.update
______________________________________________________________
Segment
- key string: The name of the profile property
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- key is set to NewProperty1
DELETE /2022/06/REST/Self/Profile/NewProperty1/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response
204: The profile property has been removed
Failure Response
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 /Self/Session/
Retrieves the complete set of attributes defined in the context of the current person session.
Request Example
The example request parameters and headers are set as follows:
- The optional If-Modified-Since header value equals the Last-Modified header value retrieved from the previous GET /Self/Session/ response.
GET /2022/06/REST/Self/Session/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{AccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
If-Modified-Since: Wed, 29 Nov 2023 17:40:51 GMT______________________________________________________________
Success Response with Body
200: Returns the Session Context Structure
Example
{
"network": {
"id": 12345,
"name": "JohnDoe"
},
"authorizationScope": "bsn.api.main bsn.api.self bsn.api.upload bsn.ui.main player",
"lastModifiedDate": "2024-08-08T16:10:13.673Z"
}304: The provided If-Modified-Since HTTP header value matches the timestamp of the current attribute value assignment
Failure Response
400: The request is malformed and therefore invalid
401: The provided person access token is invalid and the session id cannot be retrieved
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
410: The provided person access token is valid but the session with resolved id has been invalidated
5XX: Any 500 code is an internal server error
GET /Self/Session/Network/
Retrieves the identifiers of the network that the current user is signed into.
Request Example
The example request parameters and headers are set as follows:
GET /2022/06/REST/Self/Session/Network/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{AccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: Returns the requested attribute value, which is either the Network Info EntityNetwork Info Entity (2022/06) or null if the current person is not signed into any network.
Example
{
"id": 12345,
"name": "JohnDoe"
}204: The request is executed successfully, but there is no content to return (the network is not set in the context of the current session).
Failure Response
400: The request is malformed and therefore invalid
401: The provided person access token is invalid and the session id cannot be retrieved
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
410: The provided person access token is valid but the session with the resolved id has been invalidated
5XX: Any 500 code is an internal server error
PUT /Self/Session/Network/
Allows a person to set or change a network the person is signed into in scope of the current session
Request Example
The example request parameters and headers are set as follows:
PUT /2022/06/REST/Self/Session/Network/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{AccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 40This is the example request body:
{
"id": 12345,
"name": "JaneDoe"
}______________________________________________________________
Success Response with Body
204: The person is successfully signed into the specified network
Failure Response
400: Invalid request and any of the following business rules violations:
- The provided Network Info EntityNetwork Info Entity (2022/06) has an invalid format
- Neither network id not network name is specified in the request
- A network with the specified id or name does not exist
- A network with the specified id or name is suspended
- The person who owns the provided access token is not a member of the network with the specified id or name
- The person in the network with the specified id or name is disabled
401: The provided person access token is invalid and the session id cannot be retrieved
410: The provided person access token is valid but the session with the resolved id has been invalidated
5XX: Any 500 code is an internal server error
GET /Self/Session/AuthorizationScope/
Retrieves the scope of actions the current user is authorized to do with the provided access token.
Request Example
The example request parameters and headers are set as follows:
GET /2022/06/REST/Self/Session/AuthorizationScope/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{AccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: Returns the space-separated list of tokens which represent the available resources
Example
"bsn.api.main bsn.api.self bsn.api.upload bsn.ui.main player"Failure Response
400: The request is malformed and therefore invalid
401: The provided person access token is invalid and the session id cannot be retrieved
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
410: The provided person access token is valid but the session with the resolved id has been invalidated
5XX: Any 500 code is an internal server error
PUT /Self/Session/AuthorizationScope/
Allows a person to change the list of resources he is authorized to access with the provided access token.
Request Example
The example request parameters and headers are set as follows:
PUT /2022/06/REST/Self/Session/AuthorizationScope/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{AccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 40This is the example request body:
"bsn.api.main bsn.api.self bsn.api.upload bsn.ui.main player"______________________________________________________________
Success Response
204: The authorization scope has been successfully updated.
Failure Response
400: Invalid request and any of the following business rules violations:
- The provided authorization scope has an invalid format
- One or more specified scope tokens are not available with the provided token
401: The provided person access token is invalid and the session id cannot be retrieved
410: The provided person access token is valid but the session with the resolved id has been invalidated
5XX: Any 500 code is an internal server error
GET /Self/Tokens/{token}/
Gets the status of the specified OAuth2 person access or refresh token
Required Scope Token
bsn.api.self.token.validate
______________________________________________________________
Segment
- token string: A person access or refresh token
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- token is set to {{Token}}
GET /2022/06/REST/Self/Tokens/{{Token}}/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns the Token Info Entity
Example
{
"token": {{Token}},
"scope": "bsn.api.self",
"validFrom": "2023-11-29T17:43:55Z",
"validTo": "2023-11-29T17:58:55Z"
}Failure Response
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 specified person or access refresh token is expired, revoked, 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 /Self/Tokens/{token}/
Revokes a person access or refresh token
Required Scope Token
bsn.api.self.token.revoke
______________________________________________________________
Segment
- token string: A person access or refresh token
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- token is set to {{Token}}
DELETE /2022/06/REST/Self/Tokens/{{Token}}/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response
204: The person access or refresh token has been deleted
Failure Response
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 specified person or access refresh token is expired, revoked, 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
GET /Self/Networks/
Returns the networks associated with a person
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
GET /2022/06/REST/Self/Networks/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns an array of Network Entity instances in which the current person is a member
Example
[
{
"id": 12345,
"name": "ControlCloud_Network1",
"creationDate": "2020-07-14T18:40:58.087Z",
"lastModifiedDate": "2020-07-14T18:40:58.087Z",
"lockoutDate": null,
"isLockedOut": false,
"lastLockoutDate": null,
"settings": {
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "1.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "2020-07-14T18:41:00.613Z"
},
"subscription": {
"id": 12345,
"level": "Control",
"creationDate": "2020-07-14T18:40:58.783Z",
"lastModifiedDate": "2020-07-14T18:40:58.783Z",
"expireDate": null
}
}
]Failure Response
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
POST /Self/Networks/
Creates a network for the person.
Required Scope Token
bsn.api.self.networks.create
______________________________________________________________
Request Body
- The Network EntityNetwork Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
POST /2022/06/REST/Self/Networks/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 581This is the example request body:
{
"id": 0,
"name": "TestDisplay",
"creationDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00",
"lockoutDate": null,
"isLockedOut": false,
"lastLockoutDate": null,
"settings": {
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "1.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "0001-01-01T00:00:00"
},
"subscription": null
}______________________________________________________________
Success Response Body
201: Returns the new resource created and referenced by the Uri (given by the Location header field) in the response. The response includes the network entity (see Network EntityNetwork Entity).
Example
{
"id": 12345,
"name": "TestDisplay",
"creationDate": "2023-12-07T18:29:58.5041056Z",
"lastModifiedDate": "2023-12-07T18:29:58.5041056Z",
"lockoutDate": null,
"isLockedOut": false,
"lastLockoutDate": null,
"settings": {
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "1.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "2023-12-07T18:29:58.5041056Z"
},
"subscription": {
"id": 12345,
"level": "Control",
"creationDate": "2023-12-07T18:29:58.5142438Z",
"lastModifiedDate": "2023-12-07T18:29:58.5142438Z",
"expireDate": null
}
}Failure Response
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 /Self/Networks/{id}/
Get a network associated with a specified id
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- id int: The unique identifier for a network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Networks/12345/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: Returns the Network EntityNetwork Entity
Example
This is an example of a 200 level response:
{
"id": 12345,
"name": "JaneDoeTesting",
"creationDate": "2020-07-09T19:09:04.937Z",
"lastModifiedDate": "2020-07-09T19:09:04.937Z",
"lockoutDate": null,
"isLockedOut": false,
"lastLockoutDate": null,
"settings": {
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "1.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "2020-07-09T19:09:06.77Z"
},
"subscription": {
"id": 12345,
"level": "Content",
"creationDate": "2020-08-17T20:49:45.633Z",
"lastModifiedDate": "2020-08-17T20:49:45.633Z",
"expireDate": "2030-08-16T00:00:00Z"
}
}Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure Response
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
PATCH /Self/Networks/{networkId}/
Applies changes to a network associated with a specified id
Required Scope Token
bsn.api.self.networks.update
______________________________________________________________
Segment
- networkId int: The unique identifier for a network
______________________________________________________________
Request Body
These properties are entries in an array. Every entry must have all three of these properties:
- op string: The type of operation - in this case it is always "replace"
- path string: A Uri path that references the location within the target document where the update will be performed
- value object The replacement value(s) for the parameters that must be updated. This can be an array.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- networkId is set to 12345
PATCH /2022/06/REST/Self/Networks/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-patch+json
Content-Length: 94This is the example request body:
[
{
"op": "replace",
"path": "/subscription/level/",
"value": "Trial"
}
]______________________________________________________________
Success Response
204: The parameters have been successfully replaced
Failure Response
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)
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
GET /Self/Networks/{name}/
Returns a network associated with a specified name.
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- name string: The name of a network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- name is set to JaneDoeTesting
GET /2022/06/REST/Self/Networks/JaneDoeTesting/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns the Network EntityNetwork Entity
Example
This is an example of a 200 level response:
{
"id": 12345,
"name": "JaneDoeTesting",
"creationDate": "2020-07-09T19:09:04.937Z",
"lastModifiedDate": "2020-07-09T19:09:04.937Z",
"lockoutDate": null,
"isLockedOut": false,
"lastLockoutDate": null,
"settings": {
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "30.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "2023-12-07T21:41:44.01Z"
},
"subscription": {
"id": 12345,
"level": "Content",
"creationDate": "2020-08-17T20:49:45.633Z",
"lastModifiedDate": "2020-08-17T20:49:45.633Z",
"expireDate": "2030-08-16T00:00:00Z"
}
}Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure Response
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
PATCH /Self/Networks/{networkName}/
Applies changes to a network associated with a specified id
Required Scope Token
bsn.api.self.networks.update
______________________________________________________________
Segment
- networkName string: The name of the network
______________________________________________________________
Request Body
These properties are entries in an array. Every entry must have all three of these properties:
- op string: The type of operation - in this case it is always "replace"
- path string: A Uri path that references the location within the target document where the update will be performed
- value object: The replacement value(s) for the parameters that must be updated. This can be an array.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- networkName is set to JaneDoeTesting
PATCH /2022/06/REST/Self/Networks/JaneDoeTesting/ 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-patch+json
Content-Length: 94This is the example request body:
[
{
"op": "replace",
"path": "/subscription/level/",
"value": "Trial"
}
]______________________________________________________________
Success Response
204: The parameters have been successfully replaced
Failure Response
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)
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
GET /Self/Networks/{id}/Settings/
Returns the settings associated with a specified network.
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- id int: The unique identifier for a network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Networks/12345/Settings/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: Returns the Network Settings EntityNetwork Settings Entity
Example
This is an example of a 200 level response:
{
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "1.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "2020-07-09T19:09:06.77Z"
}Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure Response
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 /Self/Networks/{id}/Settings/
Update the settings associated with a specified network
Required Scope Token
bsn.api.self.networks.update
______________________________________________________________
Segment
- id int: The unique identifier for a network
______________________________________________________________
Request Body
- The Network Settings EntityNetwork Settings Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
PUT /2022/06/REST/Self/Networks/12345/Settings/ 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: 335This is the example request body:
{
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "30.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "0001-01-01T00:00:00"
}______________________________________________________________
Success Response
204: The specified settings have been updated on the network
Failure Response
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)
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 /Self/Networks/{name}/Settings/
Get the settings associated with a specified network.
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- name string: The network name
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to JaneDoeTesting
GET /2022/06/REST/Self/Networks/JaneDoeTesting/Settings/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns the Network Settings EntityNetwork Settings Entity
Example
{
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "1.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "2020-07-09T19:09:06.77Z"
}Failure Response
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 /Self/Networks/{name}/Settings/
Update the settings associated with a specified network
Required Scope Token
bsn.api.self.networks.update
______________________________________________________________
Segment
- name string: The network name
______________________________________________________________
Request Body
- The Network Settings EntityNetwork Settings Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- name is set to JaneDoeTesting
PUT /2022/06/REST/Self/Networks/JaneDoeTesting/Settings/ 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: 335This is the example request body:
{
"userAccessTokenLifetime": "00:15:00",
"userRefreshTokenLifetime": "30.00:00:00",
"deviceAccessTokenLifetime": "00:15:00",
"deviceRefreshTokenLifetime": "730.00:00:00",
"deviceRegistrationTokenLifetime": "730.00:00:00",
"automaticTaggedPlaylistApprovalEnabled": false,
"lastModifiedDate": "0001-01-01T00:00:00"
}______________________________________________________________
Success Response
204: The network settings have been updated
Failure Response
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)
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 /Self/Networks/{id}/Subscription/
Returns the current subscription information associated with a specified network.
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- id int: The unique identifier for a network
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Networks/12345/Subscription/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: Returns the Network Subscription EntityNetwork Subscription Entity
Example
This is an example of a 200 level response:
{
"id": 12345,
"level": "Content",
"creationDate": "2020-08-17T20:49:45.633Z",
"lastModifiedDate": "2020-08-17T20:49:45.633Z",
"expireDate": "2030-08-16T00:00:00Z"
}Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure Response
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 /Self/Networks/{id}/Subscription/
Updates the current subscription information associated with a specified network. A regular user can only use this to enable a trial period of the Content Cloud (if it was not previously enabled).
Required Scope Token
bsn.api.self.networks.update
______________________________________________________________
Segment
- id int: The unique identifier for a network
______________________________________________________________
Request Body
- The Network Subscription EntityNetwork Subscription Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
PUT /2022/06/REST/Self/Networks/12345/Subscription/ 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: 114This is the example request body:
{
"id": 0,
"level": "Trial",
"creationDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00",
"expireDate": null
}______________________________________________________________
Success Response
204: The subscription information was updated
Failure Response
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
GET /Self/Networks/{name}/Subscription/
Returns the current subscription information associated with a specified network.
Required Scope
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- name string: The network name
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- name is set to JaneDoeTesting
GET /2022/06/REST/Self/Networks/JaneDoeTesting/Subscription/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns the Network Subscription EntityNetwork Subscription Entity
Example
{
"id": 12345,
"level": "Trial",
"creationDate": "2020-08-17T20:49:45.633Z",
"lastModifiedDate": "2020-08-17T20:49:45.633Z",
"expireDate": "2030-08-16T00:00:00Z"
}Failure Response
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 /Self/Networks/{name}/Subscription/
Updates the current subscription information associated with a specified network. A regular user can only use this to enable a trial period of the Content Cloud (if it was not previously enabled).
Required Scope Token
bsn.api.self.networks.update
______________________________________________________________
Segment
- name string: The network name
______________________________________________________________
Request Body
- The Network Subscription EntityNetwork Subscription Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- name is set to JaneDoeTesting
PUT /2022/06/REST/Self/Networks/JaneDoeTesting/Subscription/ 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: 114This is the example request body:
{
"id": 0,
"level": "Trial",
"creationDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00",
"expireDate": null
}______________________________________________________________
Success Response
204: Updated the subscription information associated with the network
Failure Response
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)
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 /Self/Networks/{id}/Subscriptions/
Returns the current subscription, and all previously expired subscriptions, associated with a specified network
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- id int: The network identifier
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Networks/12345/Subscriptions/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns an array of Network SubscriptionNetwork Subscription entities
Example
[
{
"id": 12347,
"level": "Content",
"creationDate": "2020-08-17T20:49:45.633Z",
"lastModifiedDate": "2020-08-17T20:49:45.633Z",
"expireDate": "2030-08-16T00:00:00Z"
},
{
"id": 12346,
"level": "Trial",
"creationDate": "2020-07-24T23:05:45.517Z",
"lastModifiedDate": "2020-07-24T23:05:45.517Z",
"expireDate": "2020-08-17T20:49:45.633Z"
},
{
"id": 12345,
"level": "Control",
"creationDate": "2020-07-09T19:09:05.853Z",
"lastModifiedDate": "2020-07-09T19:09:05.853Z",
"expireDate": "2020-07-24T23:05:45.517Z"
}
]Failure Response
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
GET /Self/Networks/{name}/Subscriptions/
Returns the current subscription, and all previously expired subscriptions, associated with a specified network
Required Scope Token
bsn.api.self.networks.retrieve
______________________________________________________________
Segment
- name string: The network name
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- name is set to JaneDoeTesting
GET /2022/06/REST/Self/Networks/JaneDoeTesting/Subscriptions/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns an array of Network SubscriptionNetwork Subscription entities
Example
[
{
"id": 12347,
"level": "Content",
"creationDate": "2020-08-17T20:49:45.633Z",
"lastModifiedDate": "2020-08-17T20:49:45.633Z",
"expireDate": "2030-08-16T00:00:00Z"
},
{
"id": 12346,
"level": "Trial",
"creationDate": "2020-07-24T23:05:45.517Z",
"lastModifiedDate": "2020-07-24T23:05:45.517Z",
"expireDate": "2020-08-17T20:49:45.633Z"
},
{
"id": 12345,
"level": "Control",
"creationDate": "2020-07-09T19:09:05.853Z",
"lastModifiedDate": "2020-07-09T19:09:05.853Z",
"expireDate": "2020-07-24T23:05:45.517Z"
}
]Failure Response
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
GET /Self/Users/
Returns all user entities that the customer is associated with over all networks where the person has a user record
Required Scope Token
bsn.api.self.users.retrieve
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
GET /2022/06/REST/Self/Users/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: Returns an array of user entities (see User Entity) if the user is a member of multiple networks, or to a single User Entity if the user is only a member of one network, or nothing if the user is not a member of any network.
Example
[
{
"id": 12345,
"person": {
"id": 1234,
"login": "[email protected]",
"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"
},
"network": {
"id": 1234,
"name": "JaneDoeTesting"
},
"description": "Network Administrator",
"creationDate": "2020-07-09T19:09:04.98Z",
"lastModifiedDate": "2020-08-17T20:49:48.377Z",
"lastLoginDate": "2023-12-07T22:11:53.24Z",
"isLockedOut": false,
"lastLockoutDate": null,
"roleName": "Administrators",
"permissions": [
{
"entityId": 54321,
"operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e",
"principal": {
"login": "[email protected]",
"type": "User",
"id": 12345
},
"isFixed": true,
"isInherited": false,
"isAllowed": true,
"creationDate": "2020-08-17T20:49:48.353Z"
}
]
}
]Failure Response
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 /Self/Users/{id}/
Returns information about your membership in a network
Required Scope Token
bsn.api.self.users.retrieve
______________________________________________________________
Segment
- id int: The unique identifier for a user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Users/12345/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: Returns the User Entity
Example
This is an example of a 200 level response:
{
"id": 12345,
"person": {
"id": 1234,
"login": "[email protected]",
"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"
},
"network": {
"id": 1234,
"name": "JaneDoeTesting"
},
"description": "Network Administrator",
"creationDate": "2020-07-09T19:09:04.98Z",
"lastModifiedDate": "2020-08-17T20:49:48.377Z",
"lastLoginDate": "2023-12-07T22:11:53.24Z",
"isLockedOut": false,
"lastLockoutDate": null,
"roleName": "Administrators",
"permissions": [
{
"entityId": 54321,
"operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e",
"principal": {
"login": "[email protected]",
"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 Response
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
GET /Self/Users/{id}/Role/
Returns information about the role you have in a network
Required Scope Token
bsn.api.self.roles.retrieve
______________________________________________________________
Segment
- id int: The unique identifier for a user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Users/12345/Role/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response with Body
200: This returns the User Entity
Example
This is an example of a 200 level response:
{
"id": 12345,
"isCustom": true,
"name": "CustomRole",
"description": "",
"creationDate": "2023-07-10T14:16:58.433Z",
"userCount": 1,
"users": null,
"permissions": [
{
"entityId": null,
"operationUID": "b41ac545-d505-7014-edde-51bc4c0d21a0",
"principal": {
"name": "CustomRole",
"isCustom": true,
"type": "Role",
"id": 12345
},
"isFixed": false,
"isInherited": false,
"isAllowed": true,
"creationDate": "2023-08-17T20:49:45.793Z"
}
]
}Success Response
204: No content (the user is not assigned to a role)
Failure Response
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
GET /Self/Users/{id}/Profile/
Returns the user profile settings
Required Scope Token
bsn.api.self.users.profile.retrieve
______________________________________________________________
Segment
- id int: The unique identifier for a user
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Users/12345/Profile/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{PersonAccessToken}}
Accept: application/json, application/vnd.bsn.error+json
Accept-Encoding: gzip,deflate______________________________________________________________
Success Response Body
200: The return type is object, where property names are profile keys and the profile values are those property values
Example
{
"enableCustomRolesManagement": "true",
"showAdvancedSecuritySettings": "False"
}Failure Response
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 /Self/Users/{id}/Profile/
Creates a new user profile property (it does not replace an existing user profile property)
Required Scope Token
bsn.api.self.users.profile.update
______________________________________________________________
Segment
- id int: The unique identifier for a user
______________________________________________________________
Request Body
- pair <string, string>: A key value pair. There should be not more than 100 properties per user, and each property value should be not more than 64KB.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
POST /2022/06/REST/Self/Users/12345/Profile/ 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: 45This is the example request body:
{
"key": "New Key 1",
"value": "My Value"
}______________________________________________________________
Success Response Body
201: Returns the key value pair and a link to the GET method to retrieve it.
Example
{
"key": "New Key 1",
"value": "My Value"
}Failure Response
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)
409: The profile property with the specified key already exists or is reserved
413: The specified profile property value size exceeds the 64KB limit
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 /Self/Users/{id}/Profile/{key}/
Returns the value of a user profile property
Required Scope Token
bsn.api.self.users.profile.retrieve
______________________________________________________________
Segment
- id int: The unique identifier for a user
- key string: The name of the profile property
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
- key is set to New Key 1
GET /2022/06/REST/Self/Users/12345/Profile/New%20Key%201 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______________________________________________________________
Success Response with Body
200: Returns the value of the requested user profile key
Example
This is an example of a status 200 response:
"My Value"Success Response
304: The resource was not modified since the time specified in the “If-Modified-Since” header
Failure Response
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 /Self/Users/{id}/Profile/{key}/
Creates or updates the value of a user profile property
Required Scope Token
bsn.api.self.users.profile.update
______________________________________________________________
Segments
- id int: The unique identifier for a user
- key string: The name of the profile property
______________________________________________________________
Request Body
- string: The profile property value to update
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
- key is set to userStartupPage
- string is set to "Admin"
PUT /2022/06/REST/Self/Users/12345/Profile/userStartupPage 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: 7This is the example request body:
"Admin"______________________________________________________________
Success Response
201: Returns this status code if the property value is defined for first time
204: Returns this status code if the property already exists and has been updated
Failure Response
300: The requested representation could not be returned because it is ambiguous (there are multiple requested representations)
400: Either the request is malformed and therefore invalid, or the specified user profile property key is reserved or longer than 62 characters
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)
413: The length of the specified user profile property exceeds the 64KB limit
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 /Self/Users/{id}/Profile/{key}/
Removes a specified property from a user profile
Required Scope Token
bsn.api.self.users.profile.update
______________________________________________________________
Segments
- id int: The unique identifier for a user
- key string: The name of the profile property
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
- key is set to New Key 1
DELETE /2022/06/REST/Self/Users/12345/Profile/New%20Key%201 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______________________________________________________________
Success Response
204: The specified property has been removed from the user profile
Failure Response
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 /Self/Users/{id}/Permissions/
Returns the permissions granted to a given user
Required Scope Token
bsn.api.self.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 to 12345
GET /2022/06/REST/Self/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______________________________________________________________
Success Response Body
200: Returns the paged list of PermissionPermission entities granted to a specific user
Example
[
{
"entityId": 12345,
"operationUID": "67b9b0ab-fb5f-36c4-d598-a71aa8998e4e",
"principal": {
"login": "[email protected]",
"type": "User",
"id": 12345
},
"isFixed": true,
"isInherited": false,
"isAllowed": true,
"creationDate": "2020-08-17T20:49:48.353Z"
}
]Failure Response
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
GET /Self/Users/{id}/Role/Permissions/
Returns permissions granted to a given user
Required Scope Token
bsn.api.self.roles.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 to 12345
GET /2022/06/REST/Self/Users/12345/Role/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______________________________________________________________
Success Response Body
200: Returns the array of PermissionPermission entities granted to a specific role
Example
[
{
"entityId": null,
"operationUID": "b41ac545-d505-7014-edde-51bc4c0d21a0",
"principal": {
"name": "CustomRole",
"isCustom": true,
"type": "Role",
"id": 12345
},
"isFixed": false,
"isInherited": false,
"isAllowed": true,
"creationDate": "2020-08-17T20:49:45.793Z"
}
]Failure Response
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
GET /Self/Users/{id}/Notifications/
Returns the user notification settings
Required Scope Token
bsn.api.self.users.notifications.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 to 12345
GET /2022/06/REST/Self/Users/12345/Notifications/ 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______________________________________________________________
Success Response Body
200: Returns information about whether each setting in User Notification Settings Entity is enabled or disabled
Example
{
"networkSuspendingNotificationEnabled": false,
"networkSuspendingNotificationTemplate": null,
"networkSuspendedNotificationEnabled": true,
"networkSuspendedNotificationTemplate": null,
"networkSubscriptionUpgradedNotificationEnabled": true,
"networkSubscriptionUpgradedNotificationTemplate": null,
"networkTrialPeriodStartedNotificationEnabled": true,
"networkTrialPeriodStartedNotificationTemplate": null,
"networkTrialPeriodExpiringNotificationEnabled": true,
"networkTrialPeriodExpiringNotificationTemplate": null,
"networkTrialPeriodExpiredNotificationEnabled": true,
"networkTrialPeriodExpiredNotificationTemplate": null,
"deviceFailureNotificationEnabled": false,
"deviceFailureNotificationTemplate": null,
"devicesFailureNotificationEnabled": false,
"devicesFailureNotificationTemplate": null,
"deviceDisconnectedNotificationEnabled": false,
"deviceDisconnectedNotificationTemplate": null,
"devicesDisconnectedNotificationEnabled": false,
"devicesDisconnectedNotificationTemplate": null,
"subscriptionCreatedNotificationEnabled": false,
"subscriptionCreatedNotificationTemplate": null,
"subscriptionsCreatedNotificationEnabled": false,
"subscriptionsCreatedNotificationTemplate": null,
"subscriptionQueuedNotificationEnabled": false,
"subscriptionQueuedNotificationTemplate": null,
"subscriptionsQueuedNotificationEnabled": false,
"subscriptionsQueuedNotificationTemplate": null,
"graceSubscriptionExpiringNotificationEnabled": false,
"graceSubscriptionExpiringNotificationTemplate": null,
"graceSubscriptionsExpiringNotificationEnabled": false,
"graceSubscriptionsExpiringNotificationTemplate": null,
"demoSubscriptionExpiringNotificationEnabled": false,
"demoSubscriptionExpiringNotificationTemplate": null,
"demoSubscriptionsExpiringNotificationEnabled": false,
"demoSubscriptionsExpiringNotificationTemplate": null,
"subscriptionExpiringNotificationEnabled": false,
"subscriptionExpiringNotificationTemplate": null,
"subscriptionsExpiringNotificationEnabled": false,
"subscriptionsExpiringNotificationTemplate": null,
"subscriptionExpiredNotificationEnabled": false,
"subscriptionExpiredNotificationTemplate": null,
"subscriptionsExpiredNotificationEnabled": false,
"subscriptionsExpiredNotificationTemplate": null,
"subscriptionSuspendingNotificationEnabled": false,
"subscriptionSuspendingNotificationTemplate": null,
"subscriptionsSuspendingNotificationEnabled": false,
"subscriptionsSuspendingNotificationTemplate": null,
"subscriptionSuspendedNotificationEnabled": true,
"subscriptionSuspendedNotificationTemplate": null,
"subscriptionsSuspendedNotificationEnabled": true,
"subscriptionsSuspendedNotificationTemplate": null
}Failure Response
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 /Self/Users/{id}/Notifications/
Updates the user notification settings
Required Scope Token
bsn.api.self.users.notifications.update
______________________________________________________________
Segment
- id int: A unique identifier for a user
______________________________________________________________
Request Body
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
PUT /2022/06/REST/Self/Users/12345/Notifications/ 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: 2799This is the example request body:
{
"networkSuspendingNotificationEnabled": false,
"networkSuspendingNotificationTemplate": null,
"networkSuspendedNotificationEnabled": true,
"networkSuspendedNotificationTemplate": null,
"networkSubscriptionUpgradedNotificationEnabled": true,
"networkSubscriptionUpgradedNotificationTemplate": null,
"networkTrialPeriodStartedNotificationEnabled": true,
"networkTrialPeriodStartedNotificationTemplate": null,
"networkTrialPeriodExpiringNotificationEnabled": true,
"networkTrialPeriodExpiringNotificationTemplate": null,
"networkTrialPeriodExpiredNotificationEnabled": true,
"networkTrialPeriodExpiredNotificationTemplate": null,
"deviceFailureNotificationEnabled": false,
"deviceFailureNotificationTemplate": null,
"devicesFailureNotificationEnabled": false,
"devicesFailureNotificationTemplate": null,
"deviceDisconnectedNotificationEnabled": false,
"deviceDisconnectedNotificationTemplate": null,
"devicesDisconnectedNotificationEnabled": false,
"devicesDisconnectedNotificationTemplate": null,
"subscriptionCreatedNotificationEnabled": false,
"subscriptionCreatedNotificationTemplate": null,
"subscriptionsCreatedNotificationEnabled": false,
"subscriptionsCreatedNotificationTemplate": null,
"subscriptionQueuedNotificationEnabled": false,
"subscriptionQueuedNotificationTemplate": null,
"subscriptionsQueuedNotificationEnabled": false,
"subscriptionsQueuedNotificationTemplate": null,
"graceSubscriptionExpiringNotificationEnabled": false,
"graceSubscriptionExpiringNotificationTemplate": null,
"graceSubscriptionsExpiringNotificationEnabled": false,
"graceSubscriptionsExpiringNotificationTemplate": null,
"demoSubscriptionExpiringNotificationEnabled": false,
"demoSubscriptionExpiringNotificationTemplate": null,
"demoSubscriptionsExpiringNotificationEnabled": false,
"demoSubscriptionsExpiringNotificationTemplate": null,
"subscriptionExpiringNotificationEnabled": false,
"subscriptionExpiringNotificationTemplate": null,
"subscriptionsExpiringNotificationEnabled": false,
"subscriptionsExpiringNotificationTemplate": null,
"subscriptionExpiredNotificationEnabled": false,
"subscriptionExpiredNotificationTemplate": null,
"subscriptionsExpiredNotificationEnabled": false,
"subscriptionsExpiredNotificationTemplate": null,
"subscriptionSuspendingNotificationEnabled": false,
"subscriptionSuspendingNotificationTemplate": null,
"subscriptionsSuspendingNotificationEnabled": false,
"subscriptionsSuspendingNotificationTemplate": null,
"subscriptionSuspendedNotificationEnabled": true,
"subscriptionSuspendedNotificationTemplate": null,
"subscriptionsSuspendedNotificationEnabled": true,
"subscriptionsSuspendedNotificationTemplate": null
}______________________________________________________________
Success Response
204: The specified user notification settings have been updated on the network
Failure Response
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)
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 /Self/Applications/
Returns pages of applications registered by an authenticated person, based on the filtering specified, in order of the specified sort query.
Required Scope Token
bsn.api.self.applications.retrieve
______________________________________________________________
Query String Parameters
- filter string optional: An expression for filtering search results. The default value is null.
- sort string optional: An expression for sorting the search results. The default value is null. The sort expression specifies the entry used for sorting and the ascending/descending (ASC/DESC) sorting order (e.g. "[Application].[Name] ASC").
- marker string optional: A value specifying which page to retrieve. This value is useful if the isTruncated entry in the response body of the previous GET call indicates that the number of application instances exceeds the pageSize. This parameter is only required if you need more elements in the paged list than the pageSize (100).
- pageSize int optional: The maximum number of application instances that can be contained in the response body. This defaults to the maximum allowed page size (100).
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- marker value is set to the [PagedList].[NextMarker] property value from the previous BSN.cloud API response.
- pageSize is set to 1
- filter is set to [ClientId] IS '3fde8d97-2e40-4b0b-a76f-445804824799'
- sort is set to [LastModifiedDate] ASC
GET https://api.bsn.cloud/2022/06/REST/Self/Applications/?filter=%5BClientId%5D%20IS%20%273fde8d97-2e40-4b0b-a76f-445804824799%27&sort=%5BLastModifiedDate%5D%20ASC&pageSize=1 HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br____________________________________________________________
Success Response with Body
200: Returns a paged list of Application Entity
Example
This is an example of a 200 level response:
{
"items": [
{
"id": 12345,
"owner": {
"id": 54321,
"login": "[email protected]"
},
"clientId": "3fde8d97-2e40-4b0b-a76f-445804824799",
"clientSecret": null,
"scope": "self.info main.content upload",
"name": "My Application",
"description": "Sample Application",
"creationDate": "2025-02-10T22:32:59.830Z",
"lastModifiedDate": "2025-02-10T22:32:59.830Z"
}
],
"totalItemCount": 3,
"matchingItemCount": 1,
"pageSize": 1,
"prevMarker": "MjAyNS0wMi0xMFQyMjozMjo1OS44MzBaLDM5LHByZXY=",
"nextMarker": "MjAyNS0wMi0xMFQyMjozMjo1OS44MzBaLDM5LG5leHQ=",
"isTruncated": false,
"sortExpression": "[LastModifiedDate] ASC",
"filterExpression": "[ClientId] IS '3fde8d97-2e40-4b0b-a76f-445804824799'"
}Failure Response
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 /Self/Applications/Scopes/
Retrieves the list of available scope tokens which can be granted to a new or existing application.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
GET /2022/06/REST/Self/Applications/Scopes/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br______________________________________________________________
Success Response Body
200: Returns the list of available OAuth2 scope tokens
Example
[
"self.applications",
"self.applications.create",
"self.applications.delete",
"self.applications.retrieve",
"self.applications.update",
"self.info",
"self.info.retrieve",
"self.info.update",
"self.networks",
"self.networks.create",
"self.networks.retrieve",
"self.networks.update",
"self.profile",
"self.profile.retrieve",
"self.profile.update",
"self.roles",
"self.roles.retrieve",
"self.token",
"self.token.revoke",
"self.token.validate",
"self.users",
"self.users.notifications.retrieve",
"self.users.notifications.update",
"self.users.profile.retrieve",
"self.users.profile.update",
"self.users.retrieve"
]Failure Response
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
POST /Self/Applications/
Registers a new application to obtain OAuth2 client credentials
Required Scope Token
bsn.api.self.applications.create
______________________________________________________________
Request Body
- The Application Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
POST /2022/06/REST/Self/Applications/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Content-Type: application/json
Content-Length: 269
Accept: application/json, application/problem+json
Accept-Encoding: gzip,brThis is the example request body:
{
"id": 0,
"name": "My Application",
"description": "Sample Application",
"owner": null,
"scope": "self.info main.content upload",
"clientId": "",
"clientSecret": null,
"creationDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00"
}______________________________________________________________
Success Response Body
201: Returns the Application Entity
Failure Response
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.
DELETE /Self/Applications/
Unregisters the existing unused "Application" instances which are registered by an authenticated “Person” and satisfy the specified filter criteria, and revokes the related OAuth2 Client Credentials.
Required Scope Token
bsn.api.self.applications.delete
______________________________________________________________
Query String Parameters
- filter string required: An expression for filtering search results. The default value is null.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- filter is set to [CreationDate] IS BEFORE '2025-01-01'
DELETE /2022/06/REST/Self/Applications/?filter=%5BCreationDate%5D%20IS%20BEFORE%20%272025-01-01%27 HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br______________________________________________________________
Success Response Body
200: The number of removed entities is returned.
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 /Self/Applications/Count/
Returns the number of application instances which are registered to an authenticated person and satisfy the specified filter criteria.
Required Scope Token
bsn.api.main.applications.retrieve
______________________________________________________________
Query String Parameters
- filter string optional: An expression for filtering search results. The default value is null.
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- filter is set to [CreationDate] IS BEFORE '2025-01-01'
GET /2022/06/REST/Self/Applications/Count/?filter=%5BCreationDate%5D%20IS%20BEFORE%20%272025-01-01%27 HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br______________________________________________________________
Success Response Body
200: The applications count is returned as an integer value.
Failure Response
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 /Self/Applications/{id}/
Returns information about an “Application” registered by an authenticated “Person” and having the specified “Id”.
Required Scope Token
bsn.api.self.applications.retrieve
______________________________________________________________
Segment
- id string: The unique identifier of the application
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
GET /2022/06/REST/Self/Applications/12345/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br
If-Modified-Since: Thu, 06 Jun 2024 17:32:38 GMT______________________________________________________________
Success Response with Body
200: Returns the Application Entity
This is an example of a 200 level response:
{
"id": 12345,
"owner": {
"id": 54321,
"login": "[email protected]"
},
"clientId": "3fde8d97-2e40-4b0b-a76f-445804824799",
"clientSecret": null,
"scope": "self.info main.content upload",
"name": "My Application",
"description": "Sample Application",
"creationDate": "2025-02-10T22:32:59.828Z",
"lastModifiedDate": "2025-02-10T22:32:59.828Z"
}304: The resource was not modified since the time specified in the “If-Modified-Since” header
______________________________________________________________
Failure Response
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 /Self/Applications/{id}/
Edits information about an application which has a specified id
Required Scope Token
bsn.api.main.applications.update
______________________________________________________________
Segment
- id int: A unique identifier for an application
______________________________________________________________
Request Body
- The Application Entity
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is 12345
PUT /2022/06/REST/Self/Applications/12345/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Content-Type: application/json
Content-Length: 269
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br
If-Unmodified-Since: Thu, 06 Jun 2024 17:32:38 GMTThis is the example request body:
{
"id": 0,
"name": "My Application",
"description": "Sample Application",
"owner": null,
"scope": "self.info main.content upload",
"clientId": "",
"clientSecret": null,
"creationDate": "0001-01-01T00:00:00",
"lastModifiedDate": "0001-01-01T00:00:00"
}______________________________________________________________
Success Response
204: The specified application has been updated on the network
Failure Response
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
406: The server cannot return the data representation that you requested (as specified in the "Accept" header)
412: Precondition failed (the resource/application 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 /Self/Applications/{id}/
Unregisters the existing unused “Application” instance registered by an authenticated “Person” and having the specified “Id”, and revokes the related OAuth2 Client Credentials.
Required Scope Token
bsn.api.self.applications.delete
______________________________________________________________
Segment
- id string: The unique identifier of the application
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
DELETE /2022/06/REST/Self/Applications/12345/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br
If-Unmodified-Since: Thu, 06 Jun 2024 17:32:38 GMT______________________________________________________________
Success Response
204: The specified application has been removed
Failure Response
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. For example, application service users may exist for this application and must be removed before it can be deleted.
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
POST /Self/Applications/{id}/Secret/
Rotates the OAuth2 Client Secret of an existing “Application” instance registered by an authenticated “Person” and having the specified “Id”. See this page.
Required Scope Token
bsn.api.self.applications.update
______________________________________________________________
Request Example
The example request parameters and headers are set as follows:
- id is set to 12345
POST /2022/06/REST/Self/Applications/12345/Secret/ HTTP/1.1
Host: api.bsn.cloud
Connection: Keep-Alive
Authorization: Bearer {{UserAccessToken}}
Accept: application/json, application/problem+json
Accept-Encoding: gzip,br
If-Unmodified-Since: Thu, 06 Jun 2024 17:32:38 GMT______________________________________________________________
Success Response Body
200: Invalidates the current OAuth2 client secret and issues a new one for a given application
Example
"jqVhz360hRnyMsu45Yx25N8TvNgwxZCB"Failure Response
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 referenced application cannot be found.
406: The server cannot return the data representation that you requested (as specified in the "Accept" header).
412: Precondition failed (the resource/group changed since the time specified in the “If-Unmodified-Since” header value)
5XX: Any 500 code is an internal server error.