Get
Get the metadata of a key.
The command shows the metadata of the key, and never its value.
osapi client secret get [flags]
Examples
osapi client secret get --vault default --key registry-token
osapi client secret get --vault default --key registry-token --json
Result
The command prints:
$ osapi client secret get --vault default --key registry-token Secret: trace 26e448c9dbe1c4a8d216a98c675079c9 Vault: default Key: registry-token Version: 3 Changed: 2026-01-15 09:12:00 By: ops@example.com
With --json, the API's response:
{
"vault": "default",
"key": "registry-token",
"version": 3,
"changed": "2026-01-15T09:12:00Z",
"by": "ops@example.com"
}
Permission
It needs the secret:read permission. osapi controller role get --name <role>
shows what a role grants.
Flags
| Flag | Description | Default |
|---|---|---|
--key | The name of the key, such as registry-token (required) | |
--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.