Create a new Item
POST
/vaults/{vaultUuid}/items
Items
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://localhost:8080/v1/vaults//items' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "string",
"title": "string",
"favorite": false,
"version": 0,
"category": "LOGIN",
"tags": [
"string"
],
"vault": {
"id": "string"
},
"urls": [
{
"primary": true,
"href": "https://example.com"
},
{
"href": "https://example.org"
}
],
"fields": [
{
"recipe": {
"length": 32,
"excludeCharacters": "abc1",
"characterSets": [
"LETTERS"
]
},
"id": "string",
"label": "string",
"value": "string",
"generate": false,
"type": "STRING",
"purpose": "",
"section": {
"id": "string"
}
}
],
"files": [
{
"id": "6r65pjq33banznomn7q22sj44e",
"name": "foo.txt",
"size": 35,
"content_path": "v1/vaults/ionaiwtdvgclrixbt6ztpqcxnq/items/p7eflcy7f5mk7vg6zrzf5rjjyu/files/6r65pjq33banznomn7q22sj44e/content",
"content": "VGhlIGZ1dHVyZSBiZWxvbmdzIHRvIHRoZSBjdXJpb3VzLgo="
}
],
"sections": [
{
"id": "string",
"label": "string"
}
]
}'
响应示例响应示例
200 - 示例 1
{
"id": "string",
"title": "string",
"favorite": false,
"version": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"lastEditedBy": "string",
"category": "LOGIN",
"tags": [
"string"
],
"state": "ARCHIVED",
"vault": {
"id": "string"
},
"urls": [
{
"primary": true,
"href": "https://example.com"
},
{
"href": "https://example.org"
}
],
"fields": [
{
"recipe": {
"length": 32,
"excludeCharacters": "abc1",
"characterSets": [
"LETTERS"
]
},
"id": "string",
"label": "string",
"value": "string",
"generate": false,
"entropy": 0,
"type": "STRING",
"purpose": "",
"section": {
"id": "string"
}
}
],
"files": [
{
"id": "6r65pjq33banznomn7q22sj44e",
"name": "foo.txt",
"size": 35,
"content_path": "v1/vaults/ionaiwtdvgclrixbt6ztpqcxnq/items/p7eflcy7f5mk7vg6zrzf5rjjyu/files/6r65pjq33banznomn7q22sj44e/content",
"content": "VGhlIGZ1dHVyZSBiZWxvbmdzIHRvIHRoZSBjdXJpb3VzLgo="
}
],
"sections": [
{
"id": "string",
"label": "string"
}
]
}
请求参数
Path 参数
vaultUuid
string
必需
正则匹配:
^[\da-z]{26}$
Body 参数application/json
返回响应
修改于 2024-11-22 03:30:27