Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
crumpstar
2 years agoNew Contributor
Unable to create new item with empty password with cli
I'm using cli 2.28.0
op item get "item-uuid" --format=json | op item create --vault=runtime-testing --tags=test
is returning "unable to process line 1: Validation: (validateVaultItem failed to ...
legojoey17
8 months agoNew Contributor
I believe I figured out what's happened here. I just ran into this today with an item created using the latest version of the MacOS desktop client (1Password for Mac 8.10.56 (81056028)). I create a Password-type item, pasted some text into the password, saved it, and subsequently removed the password value - I intended to store a multi-value secret where there was no one "password" but a few distinct fields.
I found this post and figured I'd inspect the actual JSON and it became obvious once I did op item get --format=json ...
. The password
field has no value, but is present and shows the previous value in the history. I suspect the CLI validation is simply inconsistent with how the 1Password apps validate/format this, and it also looks like it's probably for UX such as for retaining history.
Here's what the JSON looked like (just those CONCEALED
extra fields removed and things stripped out for ...
.
```
{
"id": "...",
"title": "...",
"version": "...",
"vault": {
"id": "...",
"name": "..."
},
"category": "PASSWORD",
"last_edited_by": "...",
"created_at": "2025-01-18T08:36:08Z",
"updated_at": "2025-01-18T20:04:58Z",
"additional_information": "2025-01-18 12:36 AM",
"sections": [
{
"id": "add more"
}
],
"fields": [
{
"id": "password",
"type": "CONCEALED",
"purpose": "PASSWORD",
"label": "password",
"reference": "op://.../.../password",
"password_details": {
"history": ["... some previous value"]
}
},
{
"id": "notesPlain",
"type": "STRING",
"purpose": "NOTES",
"label": "notesPlain",
"value": "...",
"reference": "op://.../.../notesPlain"
}
// additional fields ...
]
}
```