Returns all registered users
POST
https://api.bws.ninja/v1/call
Use this operation to retrieve the registered end users of your account.
Request body
Example responses
[
{
"user_id": 25,
"user_identifier": "iuwd7q8dbtqd",
"user_first_name": "John",
"user_last_name": "Smith",
"user_role": "user",
"user_email": "john.smith@xyz.com",
"user_groups": [
{
"group_id": 1,
"group": "bankers"
},
{
"group_id": 2,
"group": "investors"
}
]
},
{
"user_id": 26,
"user_identifier": "76387bdt6qt",
"user_first_name": "Mary",
"user_last_name": "Smith",
"user_role": "user",
"user_email": "mary.smith@xyz.com",
"user_groups": [
{
"group_id": 1,
"group": "bankers"
}
]
}
]
{
"message": "No users are registered."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "getUsers",
"parameters": {
"user_identifier": "9c809eb86ee6",
"decryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y="
}
}
Creates and updates the information of a user
POST
https://api.bws.ninja/v1/call
Use this operation to create users stored in ESG.Credits. Is also used to alter already existing user data.
Request body
Example responses
{
"message": "User successfully added."
}
{
"message": "User identifier is missing."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addUser",
"parameters": {
"user_identifier": "9c809eb86ee6",
"user_first_name": "John",
"user_last_name": "Smith",
"user_email": "john.smith@xyz.com",
"user_role": "user",
"encryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y="
}
}
Removes a user
POST
https://api.bws.ninja/v1/call
Use this operation to remove users from the ESG.Credits data repository.
Request body
Example responses
{
"message": "User was successfully removed."
}
{
"message": "No such user."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "removeUser",
"parameters": {
"user_identifier": "9c809eb86ee6"
}
}
Returns all groups
POST
https://api.bws.ninja/v1/call
Use this operation to list available groups for when you are to connect users to groups to control access to certain functionality in your solution.
Request body
Example responses
[
{
"id": 1,
"group": "bankers"
},
{
"id": 2,
"group": "investors"
},
{
"id": 3,
"group": "capitalists"
},
{
"id": 4,
"group": "issuers"
},
{
"id": 5,
"group": "agents"
},
{
"id": 6,
"group": "exchanges"
},
{
"id": 7,
"group": "regulators"
}
]
{
"message": "Please submit client identifier."
}
{
"message": "Not authorized."
}
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "getGroups",
}
Adds a group to a user
POST
https://api.bws.ninja/v1/call
Use this operation to connect users to groups to control access to certain functionality in your solution.
Request body
Example responses
{
"message": "Group was succesfully added."
}
{
"message": "Group is already connected to user."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addGroupToUser",
"parameters": {
"user_identifier": "9c809eb86ee6",
"group": "bankers"
}
}
Removes a group from a user
POST
https://api.bws.ninja/v1/call
Use this operation to remove connections between groups and users.
Request body
Example responses
{
"message": "Group was succesfully removed."
}
{
"message": "No such user."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "removeGroupFromUser",
"parameters": {
"user_identifier": "9c809eb86ee6",
"group": "bankers"
}
}
Returns all investors that a user has access to
POST
https://api.bws.ninja/v1/call
Use this operation to retrieve which investors' information a certain user has the right to access.
Request body
Example responses
[
{
"user_id": 25,
"user_identifier": "john.smith@xzy.com",
"investors": [
{
"investor_id": 19,
"investor_identifier": "3a65rvgwv856",
"investor_name": "Ben Watson"
},
{
"investor_id": 19,
"investor_identifier": "3b6f3waf09886",
"investor_name": "Bill Jones"
}
]
},
{
"user_id": 26,
"user_identifier": "mary.smith@xzy.com",
"investors": [
{
"investor_id": 19,
"investor_identifier": "3b6f3waf09886",
"investor_name": "Bill Jones"
}
]
}
]
{
"message": "No users are registered."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "getInvestorsOfUser",
"parameters": {
"user_identifier": "9c809eb86ee6",
"decryption_key": "64dh_WtAnyMK-f3dtb5-ESweLX80P__a3FjXsgg3Y="
}
}
Adds an investor to a user
POST
https://api.bws.ninja/v1/call
Use this operation to connect investors to users in order to control users´ access to investor specific information.
Request body
Example responses
{
"message": "Investor was succesfully added."
}
{
"message": "Investor is already connected to user."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addInvestorToUser",
"parameters": {
"investor_identifier": "650126-1234",
"user_identifier": "9c809eb86ee6"
}
}
Removes an investor from a user
POST
https://api.bws.ninja/v1/call
Use this operation to remove connections between investors and users.
Request body
Example responses
{
"message": "Investor was succesfully removed."
}
{
"message": "No such investor."
}
{
"message": "Not authorized."
}
Operation parameters
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "removeInvestorFromUser",
"parameters": {
"investor_identifier": "650126-1234",
"user_identifier": "9c809eb86ee6"
}
}