Get secret metadata

View as Markdown

Get metadata for one Vault secret without reading its username, password, value, or TOTP seed.

Get metadata

1const secret = await bctrl.tools.call("vault.secrets.get", {
2 name: "production/github/api-token",
3});
4
5console.log(secret.type, secret.origins, secret.hasTotp);

Request parameters

ParameterTypeRequiredDescription
nameVaultSecretNameYesSecret name made from slash-separated letters, numbers, ., _, ~, and - segments. Maximum 256 characters.

Response

FieldTypeAlways presentDescription
nameVaultSecretNameYesSecret name.
type"login" | "value"YesStored secret shape.
labelstringNoDisplay label, when set.
originsstring[]NoExact allowed origins, when configured.
originPatternsstring[]NoAllowed origin patterns, when configured.
hasTotpbooleanYesWhether a TOTP seed exists.
createdAtstringNoCreation timestamp, when available.
updatedAtstringNoUpdate timestamp, when available.

This Tool never exposes secret values. Use Read secret value only when raw reads are authorized by the Space Vault policy.

Next