Patching Credential using API in Ansible Automation Platform only updates parameters but not sub-elements of input parameter individually.
Issue
-
API call for
Credential PATCH
using curl will only update the sub-element of the parameterinputs
mentioned in the command removing other data. -
Following API call will PATCH the existing credential with new host "https://test2.com" but will remove related parameters like
username and password
.curl -kv --user admin:redhat https://controller.example.com/api/v2/credentials/11/ -H "Content-Type: application/json" -X PATCH -d '{"inputs": {"host": "https://test2.com"}}'
Environment
- Red Hat® Ansible Automation Platform 2.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.