List vaults and items using 1Password SDKs
You can use 1Password SDKs to list vaults and items in a 1Password account. This is helpful if you need to get the unique identifier (ID) for an item or vault.
Before you begin, follow the steps to get started with a 1Password SDK.
See the examples folder in the 1Password Go, JavaScript, or Python SDK GitHub repository for example code you can quickly clone and test in your project.
List vaults
- Go
- JavaScript
- Python
The client.Vaults.List
function gets all vaults in an account.
The client.vaults.list
function gets all vaults in an account.
The client.vaults.list
function gets all vaults in an account.
List items
- Go
- JavaScript
- Python
The client.Items.List
function gets all items in a vault and can return each item's ID, title, category, state, and the ID of the vault where it's stored. It only returns active items by default. The example below returns item IDs.
To list items, specify a vault ID, or pass a vault ID from the output of an item or the output of client.Vaults.List
.
The client.items.list
function gets all items in a vault and can return each item's ID, title, category, state, and the ID of the vault where it's stored. It only returns active items by default. The example below returns item IDs.
To list items, specify a vault ID, or pass a vault ID from the output of an item or the output of client.vaults.list
.
The client.items.list
function gets all items in a vault and can return each item's ID, title, category, state, and the ID of the vault where it's stored. It only returns active items by default. The example below returns item IDs.
To list items, specify a vault ID, or pass a vault ID from the output of an item or the output of client.vaults.list
.
Filter listed items by state
You can filter listed items by their state: Active
or Archived
.
- Go
- JavaScript
- Python
To filter listed items so only archived items are returned:
To filter listed items so only archived items are returned:
To filter listed items so only archived items are returned: