POST Credentials/Update

Updates the fields of an existing credential. If you are working with CyberArk credentials, call POST Credentials/CyberArk/Update.

Requirements

  • Permissions: The caller must have Write permission to the credential object.
    • If the Friendlyname is a Certificate or PrivateKey, the caller must also have Private Key Write permission.
    • If the Source is an AWS EC2AsssignedRole, the role must already be assigned in EC2. The caller must either be a Master admin or its identity must be present or part of a group that is listed in the AWS EC2 Role Authorized Identities tab in the Platforms tree.

      EC2 Identities in Platform tree

  • 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

Contact

(Optional) An array of Identity Entry objects.

CredentialPath

Path of the new object (usually a DN, unless a non-standard credential storage system is installed).

Description

(Optional) Description of the credential.

EncryptionKey

(Optional) The key to use to protect the credential data.

Expiration

(Optional) Date/time the credential expires and is to be renewed/updated. Expressed in milliseconds since January 1, 1970 with a timezone offset suffix when using the JSON Date function.

FriendlyName

The type of credential. For more information, see What FriendlyName do I use for my CA?.

Shared

(Optional) Set to true to indicate that the credential is meant to be shared between multiple objects.

Values

Case sensitive. An array of Name/Type/Value triplets that describe a credential or key credential. The values depend on What FriendlyName do I use for my CA?.

  • Name: An attribute that is required by a CA or another entity.
  • Type: The data type that describes the Value. For example, string .
  • Value: A value that corresponds to the Name.

Returns

Response description

Name

Description

HTTP 200

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

Request

POST https://tpp.venafi.example/vedsdk/Credentials/Update
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "Description": "test description",
   "Shared": false,
   "FriendlyName":"Password",
   "Values":[
      {
         "Name": "Password",
         "Type": "string",
         "Value": "updated password"
      }
   ],
   "CredentialPath":"\\VED\\Policy\\Test Password Credential"
}

Response

HTTP/1.1 200 OK
{ 
   "Result": 1 
}