Skip to content

Downloading a certificate

The certificaterequests function allows you to download a certificate. You can specify:

  • The download format as a Base64 PEM encoded certificate or as a binary DER file.
  • Whether to download just the end entity certificate or the full certificate chain. For full certificate downloads.
  • The order of the certificate chain (for full certificate chain downloads).

To download a certificate

  1. If you have not already done so, obtain an API key.

  2. Obtain a certificate id from the initial certificate request. If necessary, you can use Search results to get the certificate id.

  3. Use the 'certificaterequests' function. For additional help, use the parameter descriptions from ´╗┐our screenshotdocumentation.

  4. (Optional) For the chain of trust, specify a chainOrder:

    Chain Order Description
    EE_FIRST Download the certificate with the entity portion of the chain first.
    EE_Only Download only the certificate with the entity portion.
    ROOT_FIRST Default. Download the certificate with root portion of the chain first.

Example request

GET https://api.venafi.cloud/v1/certificaterequests/
529e2aa0-4bc4-11e7-be41-1507c9a9e451/certificate?
format=PEM&chainOrder=EE_FIRST
tppl-api-key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Example response

HTTP 1.1 OK
{
-----BEGIN CERTIFICATE-----
MIIFUDCCBDigAwIBAgIQDNCBGcGwPu+rHNntVw2VxjANBgk
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgS
...
-----END CERTIFICATE-----
}