Create a new value to a credential attribute
- Dernière mise à jour2021/01/12
Create a new value to a credential attribute
Send a POST request to assign a new value to an attribute for a specific credential.
Prerequisites
- JSON Web Token (JWT)
- All Control Room APIs require a JSON Web Token (JWT) to access the APIs. Generate an authentication token using the Enterprise 11 Authentication API.
- Credential and attribute id
- Retrieve the credential and attribute ids from the credential that you created in Create a new credential. Use the ids to access and assign a value to the attribute.
Note:
- Use the Swagger definition files installed with your Control Room to test the APIs. View the available Swagger
APIs at
http://<your_control_room_url>/swagger/
. - You can also use a REST client to complete this task.
Procedure
You can also run REST requests from a command terminal. Here is a Curl example of
the request. This example is formatted for readability. Replace text inside the angle
brackets with the appropriate
values.
curl -X POST "<your_control_room_url>/v2/credentialvault/credentials"
-H "accept: application/json" -H "X-Authorization: <authentication_token>"
-H "Content-Type: application/json" -d
{
"name": "name",
"description": "<credential_description>",
"attributes": [
{
"name": "<attribute_name>",
"userProvided": "<true_or_false>",
"masked": "<true_or_false>",
"passwordFlag": "<true_or_false>"
}
]
}