Question

Unable to update credential in credential vault using API

  • 10 July 2023
  • 5 replies
  • 90 views

Badge +1

Hi,

I am trying to update credentials in credential vault using API. 

I am using PUT method with the URL -

“<control room url>/v2/credentialvault/credentials/<CREDENTIAL ID>/attributevalues/<CREDENTIAL ATTRIBUTE ID>”

JSON :

{

      “value” : “New_Password”

      “version” : “2”

}

 

Authorization method and token is fine.

I still get the error as : 

{

   "code":"json.deserialization.exception",

   "details":null,

   "message":"Invalid request parameters"

}

 

What am I doing wrong? Please help.

 

Thanks a lot

 


5 replies

Userlevel 3
Badge +6

You are missing a “,”

 

{

      “value” : “New_Password”,

      “version” : “2”

}

Userlevel 3
Badge +6

You are not using double quote character and also each field should be separated by comma:
 

{
"value": "New_Password",
"version": "2"
}

 

Badge +1

Hi @rishav.pandey ,

Comma is missing in your input format. Please use below:

{

      “value” : “New_Password”,

      “version” : “2”

}

 

Example :

{

  "value": "UpdatedUser2@automationanywhere.com",

  "version": "1"// - version number should be the version of the existing attribute you're replacing

}

Badge +1

You are not using double quote character and also each field should be separated by comma:
 

{
"value": "New_Password",
"version": "2"
}

 

Hi Sumit, 

I am using commas as you suggested. It was a typo while I was posting the question. Even with comma I am receiving the same error

Badge +3

@rishav.pandey Use this package, this will make this easier: https://botstore.automationanywhere.com/bot/credential-utilities

 

Reply