Recover Deleted Secret

Recovers the deleted secret back to its current version under /secrets. Authorization: requires the secrets/recover permission.

POST https://{vaultBaseUrl}/deletedsecrets/{secret-name}/recover?api-version={api-version}

URI Parameters

Name In Required Type Description
vaultBaseUrl
path True
  • string

The vault name, for example https://myvault.vault.azure.net.

secret-name
path True
  • string

The name of the deleted secret

api-version
query True
  • string

Client API version.

Responses

Name Type Description
200 OK

A Secret bundle of the original secret and its attributes

Other Status Codes

Key Vault error response describing why the operation failed.

Definitions

Error

The key vault server error.

KeyVaultError
SecretAttributes

The secret management attributes.

SecretBundle

The key vault server error.

Name Type Description
code
  • string

The error code.

innererror
message
  • string

The error message.

Name Type Description
error

The key vault server error.

The secret management attributes.

Name Type Description
created
  • integer
    unixtime

Creation time in UTC.

enabled
  • boolean

Determines whether the object is enabled.

exp
  • integer
    unixtime

Expiry date in UTC.

nbf
  • integer
    unixtime

Not before date in UTC.

recoveryLevel
  • enum:
    • Purgeable
    • Recoverable+Purgeable
    • Recoverable
    • Recoverable+ProtectedSubscription

Reflects the deletion recovery level currently in effect for secrets in the current vault. If it contains 'Purgeable', the secret can be permanently deleted by a privileged user; otherwise, only the system can purge the secret, at the end of the retention interval.

updated
  • integer
    unixtime

Last updated time in UTC.

Name Type Description
attributes

The secret management attributes.

contentType
  • string

The content type of the secret.

id
  • string

The secret id.

kid
  • string

If this is a secret backing a KV certificate, then this field specifies the corresponding key backing the KV certificate.

managed
  • boolean

True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate, then managed will be true.

tags
  • <string, string>

Application specific metadata in the form of key-value pairs.

value
  • string

The secret value.