POST Credentials/Enumerate

Returns existing credentials.

Requirements

  • Permissions:  The caller must have View permission to the Credential objects. Otherwise, credential information may be missing in the result.
  • Token scope:  Security

Headers

  • Content type: Content-Type:application/json.

  • Token: The bearer access token that you received. For example, Authorization:Bearer 4MyGeneratedBearerTknz==. For more information, see Passing a bearer token in your API calls.

Parameters

Input parameters

Name

Description

CredentialPath

The Distinguished Name (DN) of a policy folder.

Pattern (Optional)

The pattern that filters results by FullName. To list credentials with similar names, use an asterisk (*) For example, Amazon*.

Recursive (Optional)

The setting to manage search from CredentialPath.

  • true: Recursively search the CredentialPath and subfolders.
  • false: Only search the CredentialPath.

Returns

Response description

Name

Description

HTTP 200

For valid requests, this call returns a HTTP 200 message and the following data in the message body:

CredentialInfos: An array containing basic information about zero or more credentials.

  • Classname: The parent credential class name.
  • FullName: The credential name.
  • Result: Indicates the reason for success or failure. For more information, see Credential result codes.

HTTP 400

For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:

  • error: The reason for the error.
  • error_description: If available, additional information about how to retry the request.

Example: Filter Credentials by Full Name

Request

POST https://tpp.venafi.example/vedsdk/Credentials/Enumerate
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "CredentialPath":"\\VED\\Policy",
   "Pattern":"*Cred*",
   "Recursive":true
}

Response

HTTP/1.1 200 OK
{
   "CredentialInfos":[
      {
         "ClassName":"Amazon Credential",
         "FullName":"AmazonCred"
      },
      {
         "ClassName":"Amazon Credential",
         "FullName":"AmazonCred2"
      },
      {
         "ClassName":"Private Key Credential",
         "FullName":"SSHCred"
      },
      {
         "ClassName":"Username Password Credential",
         "FullName":"MyUsernameCred"
      }
   ],
   "Result":1
}