Learn R Programming

motherduck (version 0.2.0)

list_md_active_accounts: List active MotherDuck accounts

Description

Retrieves a list of active MotherDuck accounts available to the authenticated user, returning the results as a tidy tibble.

Usage

list_md_active_accounts(motherduck_token = "MOTHERDUCK_TOKEN")

Value

A tibble with two columns:

  • account_settings: configuration keys for the active accounts.

  • account_values: corresponding configuration values.

Arguments

motherduck_token

Character. Either the name of an environment variable containing your MotherDuck access token (default "MOTHERDUCK_TOKEN") or the token itself.

Details

This function queries the MotherDuck REST API endpoint (https://api.motherduck.com/v1/active_accounts) using the provided or environment-resolved authentication token. The current user name is also displayed via show_current_user().

See Also

Other db-api: configure_md_user_settings(), create_md_access_token(), create_md_user(), delete_md_access_token(), delete_md_user(), list_md_user_instance(), list_md_user_tokens(), show_current_user()

Examples

Run this code
if (FALSE) {
# Retrieve active accounts for the authenticated user
accounts_tbl <- list_md_active_accounts()
print(accounts_tbl)
}

Run the code above in your browser using DataLab