Skip to content

Retrieve a certificate file from a certificate authority

Request

Early Access
OAuth 2.0 scope:
  • okta.certificateAuthorities.read

Retrieves one certificate authority (CA) certificate as a downloadable file, PEM-encoded by default.

Use include=chain to get the certificate concatenated with the CA certificates above it, up to the root. A chain is concatenated PEM, so include=chain can't be combined with format=der. Asking for the chain of a root CA returns the root certificate on its own, because a self-signed root has no parent.

The response is application/octet-stream, and the Content-Disposition header names the file: okta-certificate.pem, okta-certificate.der, or okta-certificate-chain.pem.

Path
authorityInstanceIdstring^[0-9A-F]+$required

The stable identifier of the certificate authority, in uppercase hexadecimal. It survives renewals and is the value embedded in the SCEP enrollment URL.

skistring^[0-9A-F]+$required

The subject key identifier of one certificate within the authority, in uppercase hexadecimal

Query
formatstring(CertificateAuthorityCertificateFormat)

The encoding of the downloaded certificate

Default:"pem"
Enum:"der""pem"
includestring(CertificateAuthorityCertificateInclude)

Set to chain to download the certificate together with the CA certificates above it, up to the root. Can't be combined with format=der.

Value:"chain"
curl -i -X GET \
  'https://subdomain.okta.com/pki/api/v2/certificate-authorities/{authorityInstanceId}/certificates/{ski}/download?format=der&include=chain'

Responses

OK

Headers
Content-Dispositionstring

Names the downloaded file, for example attachment; filename="okta-certificate.pem"

Bodyapplication/octet-stream
string, (binary)(CertificateAuthorityCertificateFile)read-only

The certificate as a file — a PEM-encoded certificate, a PEM-encoded chain, or DER-encoded bytes

Response
string