POST Credentials/Retrieve

Returns a credential. Application objects use credentials to provision certificates.

Requirements

  • Permissions:  In order to retrieve credentials, the caller must be a Master Admin permission.
  • Token scope:  Security:Manage

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 name of the Credential object.

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:

  • Classname: The class name.

  • Contact:  An array of Identity Entry objects, if any.

  • Description: The credential description.

  • Expiration: The /Date( Universal Time)/ that shows when the credential expires and requires renewal or updates. For example, "/Date(1803949384135-0700)/".

  • FriendlyName: A special field, indicating the type of credential being created, updated, or retrieved. For more information, see What FriendlyName do I use for my CA?.

  • Result: The return value. For more information, see Credential result codes.

  • Values: An array of credential values from the Policy folder.

    • Name: The parameter name.
    • Type: The data type, for example string.
    • Value: The parameter value.

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: Show password credentials

Request

POST https://tpp.venafi.example/vedsdk/Credentials/Retrieve
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "CredentialPath":"\\VED\\Policy\\TPPfolder\\Admin"
}

Response

HTTP/1.1 200 OK
{
   "Classname":"CyberArk Username Password Credential",
   "Contact": [
       {
           "FullName": "\\VED\\Identity\\sample-cs-auditor",
           "Name": "sample-cs-auditor",
           "Prefix": "local",
           "PrefixedName": "local:sample-cs-auditor",
           "PrefixedUniversal": "local:{e59f7aa8-4acd-49ad-9329-185cfc639130}",
           "Type": 1,
           "Universal": "{e59f7aa8-4acd-49ad-9329-185cfc639130}"
       }
   ],
   "Expiration":"/Date(1804099086000-0700)/",
   "FriendlyName":"CyberArkCredential",
   "Result":1,
   "Values":[
      {
         "Name":"Username",
         "Type":"string",
         "Value":"Corpadmin"
      },
      {
         "Name":"Password",
         "Type":"string",
         "Value":"CorpPWD"
      },
      {
         "Name":"AppID",
         "Type":"string",
         "Value":"VenafiTPP"
      },
      {
         "Name":"Safe",
         "Type":"string",
         "Value":"SafeCorp"
      },
      {
         "Name":"Folder",
         "Type":"string",
         "Value":"Root\\local"
      },
      {
         "Name":"Account",
         "Type":"string",
         "Value":"rootpw"
      }
   ]
}