Skip to main content
Question

Unable to update credential in credential vault using API

  • July 10, 2023
  • 5 replies
  • 209 views

Forum|alt.badge.img+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

Forum|alt.badge.img+6
  • Navigator | Tier 3
  • July 11, 2023

You are missing a “,”

 

{

      “value” : “New_Password”,

      “version” : “2”

}


Forum|alt.badge.img+6
  • Navigator | Tier 3
  • July 11, 2023

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

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

 


Narendra 5601
Forum|alt.badge.img+4
  • Navigator | Tier 3
  • July 11, 2023

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

}


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • July 11, 2023

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


Forum|alt.badge.img+3
  • Navigator | Tier 3
  • October 18, 2023

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