Update a subset of Item attributes
PATCH/vaults/{vaultUuid}/items/{itemUuid}
Applies a modified RFC6902 JSON Patch document to an Item or ItemField. This endpoint only supports add
, remove
and replace
operations.
When modifying a specific ItemField, the ItemField’s ID in the path
attribute of the operation object: /fields/{fieldId}
Authorizations
- ConnectToken
Parameters
Path Parameters
The UUID of the Vault the item is in
The UUID of the Item to update
Request Body
object
An RFC6901 JSON Pointer pointing to the Item document, an Item Attribute, and Item Field by Field ID, or an Item Field Attribute
/fields/06gnn2b95example10q91512p5/label
object
Examples
Update specific Item attributes
[
{
"op": "replace",
"path": "/favorite",
"value": true
},
{
"op": "remove",
"path": "/tags/1"
}
]
Add a new ItemField to the Item
[
{
"op": "add",
"path": "/fields",
"value": {
"label": "New Field",
"type": "string",
"value": "hunter2"
}
}
]
Modify a specific ItemField attribute.
[
{
"op": "add",
"path": "/fields/s2ju540zlna8bdj4uro7sj64rk/label",
"value": "New field name"
},
{
"op": "remove",
"path": "/fields/s2ju540zlna8bdj4uro7sj64rk/value"
}
]
Modify or remove an ItemField.
[
{
"op": "replace",
"path": "/fields/r9qxq7xnhfhukoxsc8ymqr0y11",
"value": {
"label": "Replacement Title",
"type": "string",
"value": "new value"
}
},
{
"op": "remove",
"path": "/fields/h2nl155dshi043yse7wa3u1hs7"
}
]
Replace an entire Item with new fields. Equivalent to a PUT request.
[
{
"op": "replace",
"path": "/",
"value": {
"...": "Any attr from FullItem schema",
"favorite": true,
"tags": [
"tag1",
"tag2"
],
"title": "New Title"
}
}
]
Responses
200
OK - Item updated. If no Patch operations were provided, Item is unmodified.
object
object
[
{
"href": "https://example.com",
"primary": true
},
{
"href": "https://example.org"
}
]
object
object
For fields with a purpose of PASSWORD
this is the entropy of the value
If value is not present then a new value should be generated for this field
Some item types, Login and Password, have fields used for autofill. This property indicates that purpose and is required for some item types.
The recipe is used in conjunction with the “generate” property to set the character set used to generate a new secure value
object
List of all characters that should be excluded from generated passwords.
abc1
Length of the generated value
object
object
Base64-encoded contents of the file. Only set if size <= OP_MAX_INLINE_FILE_SIZE_KB kb and inline_files
is set to true
.
Path of the Connect API that can be used to download the contents of this file.
ID of the file
Name of the file
For files that are in a section, this field describes the section.
object
Size in bytes of the file
{
"content": "VGhlIGZ1dHVyZSBiZWxvbmdzIHRvIHRoZSBjdXJpb3VzLgo=",
"content_path": "v1/vaults/ionaiwtdvgclrixbt6ztpqcxnq/items/p7eflcy7f5mk7vg6zrzf5rjjyu/files/6r65pjq33banznomn7q22sj44e/content",
"id": "6r65pjq33banznomn7q22sj44e",
"name": "foo.txt",
"size": 35
}
object
401
Invalid or missing token
object
A message detailing the error
HTTP Status Code
Example
{
"message": "Invalid token signature",
"status": 401
}
403
Unauthorized access
object
A message detailing the error
HTTP Status Code
Example
{
"message": "vault {vaultUuid} is not in scope",
"status": 403
}
404
Item not found
object
A message detailing the error
HTTP Status Code
Examples
Item not found
{
"message": "item {itemUuid} not found",
"status": 404
}
Vault not found
{
"message": "vault {vaultUuid} not found",
"status": 404
}