CipherStash
CipherStash Documentation

Delete records with Stash CLI

You can delete multiple records from a collection in your workspace using the stash delete-record command.

Synopsis

stash delete-record <collection name> <comma separated ids> [--profile <profile>]

Arguments

The delete-record command requires both the name of the collection to be deleted, as well as a comma separated list of record UUIDs to be deleted.

Examples

Delete a record from the movies collection with the ID 18a73303-6311-47b2-8cec-16c46bd14002:

$ stash delete-record movies 18a73303-6311-47b2-8cec-16c46bd14002
Deleting 1 record.

Deleting record "18a73303-6311-47b2-8cec-16c46bd14002".

Successfully deleted 1 record.

Delete multiple records from the movies collection with the IDs 18a73303-6311-47b2-8cec-16c46bd14002 and aafa99c2-9511-42c5-8395-8b3b3a504be3:

$ stash delete-record \
    movies 18a73303-6311-47b2-8cec-16c46bd14002,aafa99c2-9511-42c5-8395-8b3b3a504be3
Deleting 2 records.

Deleting record "18a73303-6311-47b2-8cec-16c46bd14002".

Deleting record "aafa99c2-9511-42c5-8395-8b3b3a504be3".

Successfully deleted 2 records.

Exit Status

If all of the records in the collection were deleted successfully the command will return exit code 0.

If any of the records failed to delete or returned an error, the command will continue to delete records listed but will exit with exit code 1.