Skip to main content
Question

Unable to update credential in CV using API and Encryption Key

  • 27 August 2024
  • 4 replies
  • 51 views

Hi, 

 

I’m trying to update a credential using the CV APIs

I’m following this workflow

1 - Authentication - {url}/v2/authentication - Done

2 - List credentials - {url}/v2/credentialvault/credentials/list - Done

3 - List credential attributes - {url}/v2/credentialvault/credentials/{id}/attributevalues - Done

4 - Get Public Key - {url}/v2/credentialvault/keys/transport/public - Done

 

at this point, I have the necessary to call the endpoint that update the attribute value

5 - Update Attribute Value - /v2/credentialvault/credentials/{id}/attributevalues/{attributeValueId}?encryptionKey={publickey}

 

When i request the put call the endpoint i receive the next message:

{"code":"cv.validation.secure.keys.transport.invalid","details":null,"message":"The encryption key is incorrect"}

 

the public key that i use in the Query Parameter is the string contained in the publicKey node of the step 4.

Can anyone face the same issue?

Any ideas to solve the problem?

 

What version of automation anywhere are you using?

I was under the impression that the encryption key is not required for the A360 control room API.

 

Here are some resources for each version: 

A360 - Control Room APIs (March 29, 2023)

Automation Anywhere Version 11.3 - Manage credentials attributes (automationanywhere.com)


I´m using Automation 360 build 23207.

Here is the link with the references I'm using: https://docs.automationanywhere.com/bundle/enterprise-v2019/page/cv-api-supported.html

Also, when I call the request, without specify the encryptionKey, the server return the next status:

Status: 500 Internal Server Error

{
  "code": "generic.server.exception",
  "details": null,
  "message": "An unexpected problem occurred"
}

 


The only thing that I can think of would be checking the base64 encoding.
Other than that, I’d suggest submitting a support ticket.
AA support ticket | Community (automationanywhere.com)

Edit: 

You can also try using different REST clients. 
If you’re using Postman, try using the Automation Anywhere REST Web Services package and setting the authentication mode to Control Room user token.


I will contact AA support team.

Later, I will update the thread with the solution.


Reply