Share via


Get Certificate Versions - Get Certificate Versions

List the versions of a certificate.
The GetCertificateVersions operation returns the versions of a certificate in the specified key vault. This operation requires the certificates/list permission.

GET {vaultBaseUrl}/certificates/{certificate-name}/versions?api-version=7.4
GET {vaultBaseUrl}/certificates/{certificate-name}/versions?maxresults={maxresults}&api-version=7.4

URI Parameters

Name In Required Type Description
certificate-name
path True

string

The name of the certificate.

vaultBaseUrl
path True

string

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

api-version
query True

string

Client API version.

maxresults
query

integer (int32)

minimum: 1
maximum: 25

Maximum number of results to return in a page. If not specified the service will return up to 25 results.

Responses

Name Type Description
200 OK

CertificateListResult

A response message containing a list of certificates in the key vault along with a link to the next page of keys.

Other Status Codes

KeyVaultError

Key Vault error response describing why the operation failed.

Examples

GetCertificateVersions

Sample request

GET https://myvault.vault.azure.net//certificates/listVersionsCert01/versions?api-version=7.4

Sample response

{
  "value": [
    {
      "id": "https://myvault.vault.azure.net/certificates/listVersionsCert01/002ade539442463aba45c0efb42e3e84",
      "x5t": "fLi3U52HunIVNXubkEnf8tP6Wbo",
      "attributes": {
        "enabled": true,
        "nbf": 1430344421,
        "exp": 2208988799,
        "created": 1482189534,
        "updated": 1482189534
      }
    },
    {
      "id": "https://myvault.vault.azure.net/certificates/listVersionsCert01/7fcb3e9eb8bf43f3a6ff4b9c3740801d",
      "x5t": "fLi3U52HunIVNXubkEnf8tP6Wbo",
      "attributes": {
        "enabled": true,
        "nbf": 1430344421,
        "exp": 2208988799,
        "created": 1482189532,
        "updated": 1482189532
      }
    }
  ],
  "nextLink": null
}

Definitions

Name Description
CertificateAttributes

The certificate management attributes.

CertificateItem

The certificate item containing certificate metadata.

CertificateListResult

The certificate list result.

DeletionRecoveryLevel

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

Error

The key vault server error.

KeyVaultError

The key vault error exception.

CertificateAttributes

The certificate 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.

recoverableDays

integer (int32)

softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0.

recoveryLevel

DeletionRecoveryLevel

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

updated

integer (unixtime)

Last updated time in UTC.

CertificateItem

The certificate item containing certificate metadata.

Name Type Description
attributes

CertificateAttributes

The certificate management attributes.

id

string

Certificate identifier.

tags

object

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

x5t

string (base64url)

Thumbprint of the certificate.

CertificateListResult

The certificate list result.

Name Type Description
nextLink

string

The URL to get the next set of certificates.

value

CertificateItem[]

A response message containing a list of certificates in the key vault along with a link to the next page of certificates.

DeletionRecoveryLevel

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

Value Description
Purgeable

Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.)

Recoverable+Purgeable

Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered

Recoverable

Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered

Recoverable+ProtectedSubscription

Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered

CustomizedRecoverable+Purgeable

Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled.

CustomizedRecoverable

Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available.

CustomizedRecoverable+ProtectedSubscription

Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled.

Error

The key vault server error.

Name Type Description
code

string

The error code.

innererror

Error

The key vault server error.

message

string

The error message.

KeyVaultError

The key vault error exception.

Name Type Description
error

Error

The key vault server error.