Importing or creating item with a predefined "id" with CLI

Does anyone know if it is possible to import/create items with a specific id? I am using the Bitwarden CLI, and if I include an “id” field in the JSON object, it is ignored and a new id is generated.

I also tried bw import bitwardenjson item.json and it is the same behaviour.

I was playing with the self-hosted Bitwarden and has hoping that an export operation followed by an import would keep the same ids.

Welcome, @vrvr!

The id field is valid in the model, but upon import/encryption, new ids are always generated as you experienced. There isn’t currently a way to specify an ID, as it is the ID for that item globally and must be 100% unique.

1 Like

Thanks @tgreer! That makes sense. As a workaround, I just realised that I can create a custom field and put my own id in there.

1 Like

Thanks for help, looking for same concern, Really appreciate.