Get accounts

This method returns a list of all the accounts in the Vault.

The user who runs this web service requires List Accounts permissions in the Safe.

URL

 

Make sure there are no spaces in the URL.

The following characters are not supported in URL values: + & %

 

 

http://<IIS_Server_Ip>/PasswordVault/api/Accounts ?search={search}&searchType={searchType}&sort={sort}&offset={offset}&limit={limit}&filter={filter}

The following (optional) parameters can be used in the query string in the URL:

Parameter

Description

search

List of keywords to search for in accounts, separated by a space.

Usage: GET https://cyberark.com/PasswordVault/api/accounts?search=Windows admin

Type: string

searchType

Get accounts that either contain or start with the value specified in the Search parameter.

Valid values: contains (default) or startswith

Usage: GET https://cyberark.com/PasswordVault/api/accounts?searchtype=contains

Type: string

sort

Property or properties by which to sort returned accounts, followed by asc (default) or desc to control sort direction. Separate multiple properties with commas, up to a maximum of three properties.

Usage: GET https://cyberark.com/PasswordVault/api/accounts?sort=Windows asc

Type: string

offset

Offset of the first account that is returned in the collection of results.

The following example returns a collection of accounts that begins with the 10th account in the results:

GET https://cyberark.com/PasswordVault/api/accounts?offset=10

Default value: 0

Type: number

limit

Maximum number of returned accounts. If not specified, the default value is 50. The maximum number that can be specified is 1000.

When used together with the Offset parameter, this value determines the number of accounts to return, starting from the first account that is returned.

Usage: GET https://cyberark.com/PasswordVault/api/accounts?offset=10&limit=25

Type: number

filter

Search for accounts filtered by:

  • safeName
    Description: Get accounts from a specific safe, using the safe name.
    UsageGET https://cyberark.com/PasswordVault/api/accounts?filter=safeName eq mySafe
    Type: string

  • modificationTime
    Description: Get accounts that were modified after a given time.
    UsageGET https://cyberark.com/PasswordVault/api/accounts?filter=ModificationTime gte 0
    Type: string

Note: To use more than one filter, you can use the AND operator. For example: https://cyberark.com/PasswordVault/api/accounts?filter=safename eq mySafe AND ModificationTime gte 0

Resource information

HTTP method

GET

Content type

application/json

Header parameter

Parameter

Authorization

Type

String

Description

The token that identifies the session

Valid values

A session token that was returned from the “Logon” method.

Body parameters

None

Result

 
{
  "id": "string",
  "name": "string",
  "address": "string",
  "userName": "string",
  "platformId": "string",
  "safeName": "string",
  "secretType": "key",
  "platformAccountProperties": {},
  "secretManagement": {
    "automaticManagementEnabled": true,
    "manualManagementReason": "string",
    "status": "inProcess",
    "lastModifiedTime": 0,
    "lastReconciledTime": 0,
    "lastVerifiedTime": 0
  },
  "remoteMachinesAccess": {
    "remoteMachines": "string",
    "accessRestrictedToRemoteMachines": true
  },
  "createdTime": 0
  "categoryModificationTime": 111111111111111111111
}

 

Parameter

id

Type

string

Description

The ID of the account.

Valid values

Valid account ID

Parameter

safeName

Type

string

Description

The Safe where the account is located

Valid values

Safe name

Parameter

platformId

Type

string

Description

The platform assigned to this account.

Valid values

Valid platform IDs, example: WinServerLocal

Parameter

address

Type

string

Description

The name or address of the machine where the account is used.

Valid values

vDNS/IP/URL where the account is managed

Parameter

name

Type

string

Description

The name of the account.

Valid values

Account name

Parameter

secretType

Type

string

Description

The type of password.

Valid values

password, key

Parameter

userName

Type

string

Description

Account user's name.

Valid values

User name

Parameter

platformAccountProperties

Type

string

Description

Object containing key-value pairs to associate with the account, as defined by the account platform. Optional properties that do not exist on the account will not be returned here. Internal properties are not returned.

Valid values

example: {"Location": "IT", "OwnerName": "MSSPAdmin"}

secretManagement

Parameter

automaticManagementEnabled

Type

Boolean

Description

Whether the account secret is automatically managed by the CPM.

Default

true

Valid values

true, false

Parameter

manualManagementReason

Type

string

Description

Reason for disabling automatic secret management.

Valid values

Reason.

Parameter

status

Type

string

Description

Account management status.

Valid values

inProcess, succeeded, failed, partiallySucceeded

Parameter

lastModifiedDateTime

Type

string

Description

Last modified date of the account.

Valid values

date-time

Parameter

lastReconciledDateTime

Type

string

Description

Last reconciled date of the account.

Valid values

date-time

Parameter

lastVerifiedDateTime

Type

string

Description

Last verified date of the account.

Valid values

date-time

remoteMachinesAccess

Parameter

remoteMachines

Type

string

Description

List of remote machines, separated by semicolons.
Example: server1.cyberark.com;server2.cyberark.com

Valid values

List of machines.

Parameter

accessRestrictedToRemoteMachines

Type

Boolean

Description

Whether or not to restrict access only to specified remote machines

Valid values

true, false

Parameter

createdTime

Type

string

Description

Date and time account was created.

Valid values

date-time

Parameter

categoryModificationTime

Type

string

Description

The last time when the account or one its file categories was created or changed.

Valid values

date-time

Return codes

For a complete list of return codes, see Return Codes.