Skip to main content

CLOUD SOLUTIONS

getAccountsList

This method lists the user accounts visible to the account which has generated the API key. It will return an empty list if there are no user accounts.

Note

When the accounts list is retrieved, the account which generated the API key will be omitted.

Parameters

Parameter

Type

Optional

Description

page

Number

Yes

The results page number. The default value is 1.

perPage

Number

Yes

The number of items displayed in a page. The upper limit is 100 items per page. Default value: 30 items per page.

Return value

This method returns an Object containing information regarding the user accounts. The returned object contains:

  • page - the current page displayed

  • pagesCount - the total number of available pages

  • perPage - the total number of returned items per page

  • items - the list of user accounts. Each entry in the list has the following fields:

    • id, the ID of the user account.

    • email, the email of the user account.

    • profile, the profile information of the user account containing: fullName, timezone and language.

    • role, the role assigned for the user account. Possible values: 1 - Company Administrator, 2 - Network Administrator, 3 - Reporter, 5 - Custom.

    • rights, object containing the rights of the user account with true or false values whether the right is allowed for user or not.

    • twoFactorAuthenticationStatus, the status of the Two Factor Authentication (2FA), set to True if enabled for the account.

    • companyName, the name of the company of the user account.

    • companyId, the ID of the company of the user account.

  • total - the total number of items

Example

Request :

  {
    "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
    "jsonrpc": "2.0",    "method": "getAccountsList",
    "params": {
            "perPage": 20,
            "page": 1
           
        }
   }  

Response:

 {
   "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
   "jsonrpc": "2.0",
   "result": {
       "total": 2,
       "page": 1,
       "perPage": 20,
       "pagesCount": 1,
       "items": [
           {
              "id": "585d3170aaed70b7048b4633",
              "email": "client@bitdefender.com",
              "profile": {
                   "fullName": "Bitdefender User",
                   "language": "en_US",
                   "timezone": "Europe/Bucharest"
              },
              "role": 5,
              "rights": {
                   "companyManager": false,
                   "manageCompanies": false,
                   "manageNetworks": true,
                   "manageReports": true,
                   "manageUsers": true
               },
              "companyName": "bitdefender",
              "companyId": "58541613aaed7090058b4567"
           },
           {
              "id": "585d3170aaed70b7048b4633",
              "email": "client2@bitdefender.com",
              "profile": {
                   "fullName": "Bitdefender User",
                   "language": "en_US",
                   "timezone": "Europe/Bucharest"
               },
               "role": 1,
               "rights": {
                   "companyManager": true,
                   "manageCompanies": false,
                   "manageNetworks": true,
                   "manageReports": true,
                   "manageUsers": true
               },
              "twoFactorAuthenticationStatus": true,
              "companyName": "bitdefender",
              "companyId": "58541613aaed7090058b4567"
           }
        ]
     }
  }