Update a resource
A Resource can be updated by sending a PUT
request to /resources/<resourceId>.json
:
The request body contains the new data to be updated. The request body schema is same than when creating a resource.
PUT /resources/<resourceId>.json
{
"name": "<string>",
"description": "<string>",
"secrets": [{
"user_id": "<userId-1>",
"data": "<encrypted_password_using_user_1_public_key>"
}, {
"user_id": "<userId-n>",
"data": "<encrypted_password_using_user_n_public_key>"
}]
}
If the password you are updating has been shared with 7 users, the “secrets” key will need to be an array of 7 objects:
You must encrypt and sign the new plaintext passwords using the recipient public key and the current user secret key.
You can then create a list which include one object per user: the data
key holds the encrypted plaintext password
and user_id
holds the user UUID.
Possible Responses
Code | Description |
---|---|
200 | OK The Resource was created. The response body will contain the newly created resource object. |
400 | Bad Request Some of the data validation failed. |
403 | Authentication Failure The user making the request is not authenticated |
Last updated
This article was last updated on April 23rd, 2019.You can also find the latest OpenAPI 2.0 specifications directly on the dedicated repository.
OpenAPI Specs repository