Skip to main content

getAccountsList

You can use this method to display all the user accounts that belong to a company.

Only accounts visible to the account which has generated the API key are returned. An empty list is returned if there are no user accounts that match the request parameters.

Note

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

Parameters

Parameter

Type

Optional

Description

companyId

String

Yes

The ID of company for which you want to display the accounts for.

Default value: the company the API key used to make the request belongs to.

page

Number

Yes

The results page number.

Default value: 1.

perPage

Number

Yes

The number of items displayed in a page.

Possible values: 1 - 100.

Default value: 30.

Return value

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

Attribute

Type

Description

page

Integer

The page currently displayed.

pagesCount

Integer

The total number of pages available.

perPage

Integer

The number of items displayed per page.

items

Object

A list of user accounts.

  count

String

The ID of the user account.

  email

String

The email address associated to the user account.

  profile

Object

A list of attributes containing user account information

    fullName

String

The name associated with the user account.

    timezone

String

The timezone associated with the user account.

    language

String

The language associated with the user account.

    landingPage

String

The page where the user is directed after logging in to GravityZone.

  profile

Integer

Indicates the role assigned to the user account.

Possible values:

  • 1 - Company Administrator

  • 2 - Network Administrator

  • 3 - Reporter

  • 5 - Custom

  rights

Object

A list of attributes indicating what rights are assigned to the user.

Possible values for each attribute:

  • false - The user does not have this right enabled.

  • true - The user has this right enabled.

Note

You can find a list of rights and what access each one provides under createAccount.

  passwordLifetime

Integer

Indicates the password expiration policy assigned to the user account.

Possible value:

  • 0 - the password will never expire.

  • 90 - the password will expire every 90 days.

    Tip

    When a password expires the owner will no longer be able to use it to log into GravityZone and will be prompted to create a new one.

Default value: 0.

accountLockdown

Boolean

If true, indicates that the user account is set to lock down after after 5 unsuccessful attempts.

  twoFactorAuthenticationStatus

Boolean

if true, indicates that Two Factor Authentication (2FA) is activated for the user account.

  companyName

String

The name of the company the user account belongs to.

  companyId

String

The ID of the company the user account belongs to.

total

Integer

The number of items returned by the request.

Example

Request :

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

Response :

{
   "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
   "jsonrpc": "2.0",
   "result": {
       "total": 2,
       "page": 1,
       "perPage": 20,
       "pagesCount": 1,
       "items": [
           {
              "id": "585d3170aaed70b7048b4633",
              "email": "[email protected]",
              "profile": {
                   "fullName": "Bitdefender User",
                   "language": "en_US",
                   "timezone": "Europe/Bucharest",
                   "landingPage": "dashboardV2"
              },
              "role": 5,
             "rights": {
                   "companyManager": false,
                   "manageCompanies": false,
                   "manageNetworks": true,
                   "manageInventory ": true,
                   "managePoliciesRead": true,
                   "managePoliciesWrite": true,
                   "manageReports": true,
                   "manageUsers": true,
                   "manageRemoteShell":true
               },
              "companyName": "bitdefender",
              "companyId": "58541613aaed7090058b4567"
           },
           {
              "id": "585d3170aaed70b7048b4633",
              "email": "[email protected]",
              "profile": {
                   "fullName": "Bitdefender User",
                   "language": "en_US",
                   "timezone": "Europe/Bucharest"
               },
               "role": 1,
               "rights": {
                   "companyManager": true,
                   "manageCompanies": false,
                   "manageNetworks": true,
                   "manageInventory ": true,
                   "managePoliciesRead": true,
                   "managePoliciesWrite": true,
                   "manageReports": true,
                   "manageUsers": true,
                   "manageRemoteShell":true
               },
              "passwordLifetime": 0,
              "accountLockdown": false,
              "twoFactorAuthenticationStatus": true,
              "companyName": "bitdefender",
              "companyId": "58541613aaed7090058b4567"
           }
        ]
     }
  }