turbot/onepassword
steampipe plugin install onepassword

Table: onepassword_item_api_credential - Query 1Password API Credentials using SQL

1Password API Credentials is a resource within 1Password that securely stores and manages credentials for API usage. It provides an organized and secure way to store API keys, tokens, and other credentials, ensuring that they are easily accessible but protected. 1Password API Credentials contributes to maintaining a secure and efficient API management process.

Table Usage Guide

The onepassword_item_api_credential table provides insights into API credentials stored within 1Password. As a developer or DevOps engineer, explore credential-specific details through this table, including the server, the key, and the password. Utilize it to manage and track API credentials, ensuring that they are securely stored and correctly used.

Examples

Basic info

Explore the OnePassword API credentials to gain insights into user activity and preferences. This can be useful for assessing user behavior and identifying potential security risks.

select
id,
title,
username,
credential,
created_at,
favorite
from
onepassword_item_api_credential;
select
id,
title,
username,
credential,
created_at,
favorite
from
onepassword_item_api_credential;

List API credentials stored in a particular vault

Discover the segments that have stored API credentials in a specific vault. This can be useful to audit the security of your credentials and ensure they are stored in the correct vault.

select
c.id,
c.title,
username,
credential,
c.created_at,
favorite
from
onepassword_item_api_credential as c,
onepassword_vault as v
where
c.vault_id = v.id
and v.name = 'my-creds';
select
c.id,
c.title,
username,
credential,
c.created_at,
favorite
from
onepassword_item_api_credential as c,
onepassword_vault as v
where
c.vault_id = v.id
and v.name = 'my-creds';

Show API credentials that contain a specific tag

Discover the segments that contain specific tags within your API credentials. This can help you quickly identify and manage credentials associated with certain projects or tasks.

select
id,
title,
username,
credential,
created_at,
favorite
from
onepassword_item_api_credential
where
tags @> '["nps-creds"]';
Error: The corresponding SQLite query is unavailable.

List API credentials that were updated within the last month

Determine the API credentials that have been recently updated to ensure they are current and secure. This can be beneficial for maintaining system integrity and mitigating potential security risks.

select
id,
title,
username,
credential,
created_at,
favorite
from
onepassword_item_api_credential
where
updated_at >= now() - interval '1 month';
select
id,
title,
username,
credential,
created_at,
favorite
from
onepassword_item_api_credential
where
updated_at >= datetime('now', '-1 month');

List API credentials marked as favourite

Explore which API credentials have been marked as favourites, to easily access them for future use. This could be particularly useful in managing and prioritizing multiple API credentials.

select
id,
title,
username,
credential,
created_at,
favorite
from
onepassword_item_api_credential
where
favorite;
select
id,
title,
username,
credential,
created_at,
favorite
from
onepassword_item_api_credential
where
favorite = 1;

Schema for onepassword_item_api_credential

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
categorytextThe category of the item.
created_attimestamp with time zoneDate and time when the item was created.
credentialtextThe credential stored in the item.
favoritebooleanWhether the item is marked as a favorite.
fieldsjsonbThe fields of the item.
filesjsonbThe files of the item.
idtext=The UUID of the item.
last_edited_bytextUUID of the user that last edited the item.
sectionsjsonbThe sections of the item.
tagsjsonbAn array of strings of the tags assigned to the item.
titletextThe title of the item.
trashedbooleanChecks if the item is trashed.
updated_attimestamp with time zoneDate and time when the item was last changed.
urlsjsonbArray of URL objects containing URLs for the item.
usernametextThe username stored in the item.
vault_idtext=The UUID of the vault the item is in.
versionbigintThe version of the item.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- onepassword

You can pass the configuration to the command with the --config argument:

steampipe_export_onepassword --config '<your_config>' onepassword_item_api_credential