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

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

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

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

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

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

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

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

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

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

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

Last updated