Downloading a certificate¶
The certificates/{id}/contents
function allows you to download a certificate. You can control:
- 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 complete certificate chain.
- The order of the certificate chain (for complete certificate chain downloads).
To download a certificate
-
If you have not already done so, obtain an API key.
-
Obtain a certificate ID from the initial certificate request. If necessary, you can use Search results to get the certificate ID.
-
Use the
certificates/{id}/contents
function. For additional help, use the parameter descriptions from Dev Central. -
(Optional) For the chain of trust, specify a
chainOrder
:Chain Order Description EE_FIRST Download the certificate with the end-entity portion of the chain first. EE_ONLY Download only the end-entity certificate. ROOT_FIRST Default. Download the certificate with root portion of the chain first. Example request
Example responseGET https://api.venafi.cloud/outagedetection/v1/certificates/df7a8100-64c3-11eb-bcda-99e9056552b51/contents?format=PEM&chainOrder=EE_ONLY tppl-api-key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX accept: text/plain
-----BEGIN CERTIFICATE----- MIIFFjCCA/6gAwIBAgIUHZcxmPlKcB82xzPr1xeIyGlOBBgwDQYJKoZIhvcNAQEL BQAweDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDFZlbmFmaSwgSW5jLjERMA8GA1UE CxMIQnVpbHQtaW4xPzA9BgNVBAMTNkRlZGljYXRlZCAtIFZlbmFmaSBDbG91ZCBC dWlsdC1JbiBJbnRlcm1lZGlhdGUgQ0EgLSBHMTAeFw0yMTA1MjQyMjQ0NDJaFw0y MTA1MzEyMjQ1MTJaMIGBMQswCQYDVQQGEwJVUzENMAsGA1UECBMEVXRhaDEXMBUG A1UEBxMOU2FsdCBMYWtlIENpdHkxFTATBgNVBAoTDFZlbmFmaSwgSW5jLjEWMBQG A1UECxMNRG9jdW1lbnRhdGlvbjEbMBkGA1UEAxMSZXhhbXBsZS52ZmlkZXYuY29t MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxpbjQCUzc2RSAcPMV7Sw +k0J9jC49KzjIkNafMTUYfMkTCXXaN61vxYPpDW5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