Users

This section has operations to manage end users, groups, and user's investor access

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getUsers

parameters

JSON

check Operation parameters

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"
            }
        ]
    }
]

Operation parameters

Parameter
Type/Format
Required
Description

user_identifier

string

no

decryption_key

string

no

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

addUser

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "User successfully added."
}

Operation parameters

Parameter
Type/Format
Required
Description

user_identifier

string

yes

user_first_name

string

no

user_last_name

string

no

user_email

string

no

user_role

string

no

user or admin

encryption_key

string

no

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

removeUser

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "User was successfully removed."
}

Operation parameters

Parameter
Type/Format
Required
Description

user_identifier

string

yes

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getGroups

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"
    }
]

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

addGroupToUser

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "Group was succesfully added."
}

Operation parameters

Parameter
Type/Format
Required
Description

user_identifier

string

yes

group

string

yes

Group that the user should belong to

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

removeGroupFromUser

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "Group was succesfully removed."
}

Operation parameters

Parameter
Type/Format
Required
Description

user_identifier

string

yes

group

string

yes

Group that the user no longer should belong to

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

getInvestorsOfUser

parameters

JSON

check Operation parameters

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"
            }
        ]
    }
]

Operation parameters

Parameter
Type/Format
Required
Description

user_identifier

string

no

decryption_key

string

no

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

addInvestorToUser

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "Investor was succesfully added."
}

Operation parameters

Parameter
Type/Format
Required
Description

investor_identifier

string

yes

Investor the user should have access to

user_identifier

string

yes

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

removeInvestorFromUser

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "Investor was succesfully removed."
}

Operation parameters

Parameter
Type/Format
Required
Description

investor_identifier

string

yes

Investor the user should no longer have acces to

user_identifier

string

yes

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"
        }
    }

Last updated