Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 127 Next »

These endpoints allow users to manage their settings in the current network. 

Base URL for these endpoints:  https://api.bsn.cloud/2020/10/REST/

_________________________________________________________________________

Self/GET

Returns the information associated with the person (the requestor).

Response Body

Returns the Person Entity

Self/POST

Registers the person and returns your person credentials (except the password if it was provided in your request). 

Parameters

returnURL string 

If this parameter is not specified, the parameters value from BSN configuration file will be used.

______________________________________________________________

Request Body

The Person 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.

______________________________________________________________

Response Body

Returns the Person Entity

Self/PUT

Updates a person's information. Any customer can edit their own password, first name, and last name regardless of network membership, but cannot edit someone else's name or password.

The login property, whose values are email addresses, is a key and not editable. To give another customer access to that property or handle an email address change, a user with sufficient privileges need to create a new person, add it to the same network, assign them to the same role, and copy the custom user permissions (if any) from an existing user. This can be done in the Users Endpoints (2020/10)#POST API call.

Request Body

The Person Entity

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

{login}/Password/GET

Initiate a password reset for a person

Parameters

login string 

The person's login information 


returnURL string optional

The location header will be set to this Url, if specified.

______________________________________________________________

Response Body

On success, this method returns a status code 200 and triggers an email to your login which contains a reference to the returnURL that you specified. On failure it returns a status code of 5XX. 

Self/Tokens/{token}/GET

Gets the status of the specified OAuth2 person access or refresh token

Parameters

token string 

 A device registration token for a BSN.cloud network

______________________________________________________________

Response Body

Returns the Token Info Entity

Self/Tokens/{token}/DELETE

Revokes a person access or refresh token

Parameters

token string 

 A device registration token for a BSN.cloud network

______________________________________________________________

Response Body

On success, this method returns a status code 2XX, on failure it returns a status code of 5XX.

Endpoints:


Self/Networks/GET

Returns the networks associated with a person

Response Body

Returns a complete list of Network Entity instances associated with a person.

Self/Networks/POST

Creates a network for the person.

Request Body

The Network Entity

______________________________________________________________

Response Body

Returns a 201 status code and 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 Entity).

Self/Networks/{id:int}/GET

Get a list of networks associated with a specified id.

Parameters

id int

The unique identifier for a network

______________________________________________________________

Response Body

Returns the Network Entity


Self/Networks/{name}/GET

Get a list of networks associated with a specified name.

Parameters

name string

The name of a network

______________________________________________________________

Response Body

Returns the Network Entity


Self/Networks/{id:int}/Settings/GET

Returns the settings associated with a specified network.

Parameters

id int

The unique identifier for a network

______________________________________________________________

Response Body

Returns the Network Settings Entity

Self/Networks/{id:int}/Settings/PUT

Update the settings associated with a specified network

Parameters

id int

The unique identifier for a network

______________________________________________________________

Request Body

The Network Settings Entity

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

Self/Networks/{name}/Settings/GET

Get the settings associated with a specified network.

Parameters

name string

The name of a network

______________________________________________________________

Response Body

Returns the Network Settings Entity

Self/Networks/{name}/Settings/PUT

Update the settings associated with a specified network

Parameters

name string

The name of a network

______________________________________________________________

Request Body

The Network Settings Entity

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

Self/Networks/{id:int}/Subscription/GET

Returns the current subscription Information associated with a specified network.

Parameters

id int

The unique identifier for a network

______________________________________________________________

Response Body

Returns the Network Subscription Entity

Self/Networks/{id:int}/Subscription/PUT

Update the current subscription information associated with a specified network

Parameters

id int

The unique identifier for a network

______________________________________________________________

Request Body

The Network Subscription Entity

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

Self/Networks/{name}/Subscription/GET

Returns the current subscription information associated with a specified network.

Parameters

name string

The name of a network

______________________________________________________________

Response Body

Returns the Network Subscription Entity

Self/Networks/{name}/Subscription/PUT

Updates the current subscription information associated with a specified network

Parameters

name string

The name of a network

______________________________________________________________

Request Body

The Network Subscription Entity

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

Self/Networks/{id:int}/Subscriptions/GET

Returns all of the network subscriptions associated with a specified network.

Parameters

id int

The unique identifier for a network

______________________________________________________________

Response Body

Returns all Network Subscription entities on a network

Self/Networks/{name}/Subscriptions/GET

Returns all of the network subscriptions associated with a specified network.

Parameters

name string

The name of a network

______________________________________________________________

Response Body

Returns all Network Subscription entities on a network

Self/Users/GET

Returns all user entities that the customer is associated with over all networks where the person has a user record

Response Body

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.

Self/Users/{id:int}/GET

Returns information about a specified user on a network

Parameters

id int

The unique identifier for a user

______________________________________________________________

Response Body

Returns the User Entity

Self/Users/{id:int}/Role/GET

Returns information about a specified user role on a network

Parameters

id int

The unique identifier for a user

______________________________________________________________

Response Body

If the user is not assigned to a role, then the expected response status is 204 (No content). Otherwise this returns the User Entity.

Self/Users/{id:int}/Profile/GET

Returns the user profile settings

Parameters

id int

The unique identifier for a user

______________________________________________________________

Response Body

The return type is object, where property names are profile keys and the profile values are those property values

Self/Users/{id:int}/Profile/POST

Creates the user profile property

Parameters

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. 

______________________________________________________________

Response Body

Returns a 201 status code, the key value pair, and a link to the GET method to retrieve it. 

Self/Users/{id:int}/Profile/{key}/GET

Returns the value of a user profile key

Parameters

id int

The unique identifier for a user


key string 

The name of the profile property

______________________________________________________________

Response Body

Returns the value of the requested user profile key 

Self/Users/{id:int}/Profile/{key}/PUT

Sets a property value in a user profile

Parameters

id int

The unique identifier for a user


key string 

The name of the profile property

______________________________________________________________

Request Body

value string: The profile property value to update

______________________________________________________________

Response Body

Returns HTTP status code 201 if the property value is defined for first time, or status code 204 if the property already exists and has been updated.

Self/Users/{id:int}/Profile/{key}/DELETE

Removes a user profile property

Parameters

id int

The unique identifier for a user


key string 

The name of the profile property

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

Self/Profile/GET

Returns a complete person profile

Response Body

The return type is object, where property names are profile keys and the profile values are those property values

Self/Profile/POST

Creates a profile property for the person

Request Body

pair <string, string> 

A key value pair of the person and profile property

______________________________________________________________

Response Body

Returns a 201 status code and 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.

Self/Profile/{key}/GET

Returns a profile property value for a person

Parameters

key string 

The name of the profile property

______________________________________________________________

Response Body

Returns a profile property value

Self/Profile/{key}/PUT

Sets a profile property value for a person

Parameters

key string 

The name of the profile property

______________________________________________________________

Request Body

value string 

The profile property value to update

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

Self/Profile/{key}/DELETE

Removes a profile property for a person

Parameters

key string 

The name of the profile property

______________________________________________________________

Response Body

On success this method returns a status code 2XX, on failure it returns a status code of 5XX.

Self/Users/{userid:int}/Permissions/GET

Returns permissions for a given user

Parameters

id int 

A unique identifier for a user

______________________________________________________________

Response Body

Returns an array of Permission Entity entities

Self/Users/{userid:int}/Role/Permissions/GET

Returns permissions for a given user role.

Parameters

id int 

A unique identifier for a user

______________________________________________________________

Response Body

Returns the Permission Entity for a given user role






  • No labels