Self Endpoints (2020/10)

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

/Self/

GET

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

Response Body

Returns the Person Entity

POST

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

Parameters

  • [string] returnURL: This parameter is optional. If it 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

PUT

Updates a person's information.

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.

/Self/{login}/Password

GET

Initiate a password reset for a person

Parameters

  • [string] login:  The person's login information
  • [string] returnURL: This parameter is 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

  • [string] token:  A device registration token for a BSN.cloud network

Response Body

Returns the Token Info Entity

DELETE

Revokes a person access or refresh token

Parameters

  • [string] tokenA 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.

ON THIS PAGE


/Self/Networks/

GET

Returns the networks associated with a person

Response Body

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

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

  • [int] id:  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

  • [string] name:  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

  • [int] id:  The network identifier

Response Body

Returns the Network Settings Entity

PUT

Update the settings associated with a specified network

Parameters

  • [int] id:  The network identifier

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

  • [string] name:  The network name

Response Body

Returns the Network Settings Entity

PUT

Update the settings associated with a specified network

Parameters

  • [string] id:  The network name

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

  • [int] id:  The network identifier

Response Body

Returns the Network Subscription Entity

PUT

Update the current subscription information associated with a specified network

Parameters

  • [int] id:  The network identifier

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

  • [string] name:  The network name

Response Body

Returns the Network Subscription Entity

PUT

Updates the current subscription information associated with a specified network

Parameters

  • [string] name:  The network name

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

  • [int] id:  The network identifier

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

  • [string] name:  The network name

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/{userid:int}/

GET

Returns information about a specified user on a network

Parameters

  • [int] id:  The unique identifier for a user

Response Body

Returns the User Entity

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

GET

Returns information about a specified user role on a network

Parameters

  • [int] id:  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/{userid:int}/Profile/

GET

Returns the user profile settings

Parameters

  • [int] id:  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

POST

Creates the user profile property

Parameters

  • [int] id:  The unique identifier for a user

Request Body

  • [<string, string>] pair:  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/{userid:int}/Profile/{key}/

GET

Returns the value of a user profile key

Parameters

  • [int] id:  The unique identifier for the user
  • [string] key: The name of the profile property

Response Body

Returns the value of the requested user profile key 

PUT

Sets a property value in a user profile

Parameters

  • [int] id:  The unique identifier for the user
  • [string] key: The name of the profile property

Request Body

  • [string] value: 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.

DELETE

Removes a user profile property

Parameters

  • [int] id:  The unique identifier for the user
  • [string] key: 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

POST

Creates a profile property for the person

Request Body

  • [<string, string>] pair:  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

  • [string] key:  The name of the profile property

Response Body

Returns a profile property value

PUT

Sets a profile property value for a person

Parameters

  • [string] key: The name of the profile property

Request Body

  • [string] value: 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.

DELETE

Removes a profile property for a person

Parameters

  • [string] key: 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

  • [int] id: 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

  • [int] id: A unique identifier for a user

Response Body

Returns the Permission Entity for a given user role