List
List the keys of a vault.
The list shows the metadata of each key, and no value. A request uses a key as secret://<vault>/<key>.
osapi client secret list [flags]
Examples
osapi client secret list --vault default
osapi client secret list --vault default --json
Result
The command prints:
$ osapi client secret list --vault default Keys (2): KEY VERSION CHANGED BY registry-token 3 2026-01-15 09:12:00 ops@example.com db-password 1 2026-01-12 16:40:00 ci@example.com trace 26e448c9dbe1c4a8d216a98c675079c9
With --json, the API's response:
{
"items": [
{
"vault": "default",
"key": "registry-token",
"version": 3,
"changed": "2026-01-15T09:12:00Z",
"by": "ops@example.com"
},
{
"vault": "default",
"key": "db-password",
"version": 1,
"changed": "2026-01-12T16:40:00Z",
"by": "ci@example.com"
}
],
"total_items": 2
}
Permission
It needs the secret:read permission. osapi controller role get --name <role>
shows what a role grants.
Flags
| Flag | Description | Default |
|---|---|---|
--vault | The name of the vault, such as default (required) |
Global flags
| Flag | Description | Default |
|---|---|---|
-d, --debug | Enable or disable debug mode | |
-j, --json | Enable JSON output | |
-f, --osapi-file | Path to config file; without one at the default path, osapi runs on the defaults | /etc/osapi/osapi.yaml |
--url | Base URL the CLI client connects to (controller.client.url) | https://localhost:8080 |
Output tells how the result is printed, and what --json
gives.