list-keys

List the keys that exist in the current database.

Syntax

fauna list-keys [OPTIONS]

Description

The list-keys command lists the keys that you have created in the current database, which can include keys for the current database or its child databases.

If you don’t pass any options at the command line, Fauna uses the default options in the fauna-shell configuration file.

Options

Option Description

--domain=<domain>

Optional Fauna server domain, that is, the hostname where Fauna is running. Defaults to db.fauna.com.

--endpoint=<name>

Optional name of the endpoint to use for the command.

--port=<number>

Optional connection port. Defaults to 8443.

--scheme=<scheme>

Optional connection scheme. Must be one of https or http. Defaults to https.

--secret=<secret>

Optional secret to use. A secret authenticates your connection to Fauna, and connects you to a database.

--timeout=<integer>

Optional connection timeout, an integer number of milliseconds. When the interval has elapsed, fauna-shell stops waiting for a response and displays an error.

The default is zero, which means that fauna-shell waits until a response is received.

Example

For this example, assume that you have previously created some keys. Display the list with fauna list-keys:

$ fauna list-keys
Key ID               Database             Role
373686120364376132   [current]            admin
373711801788923969   [current]            server
373719319317577793   [current]            server
373714670254555204   internal             server
373714670256652356   internal             server
374523090163466305   my-test-db           admin
No keys created      production           -

You can verify the existence of these keys from the shell by running Key.all(). The numeric identifiers match up with the Key ID column in the list-keys output.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!