/cas/{id}/download
Docs for PKI Manager 3.17.0 (released 2026-11-24), from main 4d59c30 (30 commits after the release).
const url = 'https://pki.example.com/api/v1/cas/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/download?format=pem';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://pki.example.com/api/v1/cas/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/download?format=pem' \ --header 'Authorization: Bearer <token>'Download CA certificate in various formats.
Certificate Formats (public certificate only):
pem- PEM text format (Base64-encoded with headers)crt- CRT text certificate (same as PEM)der- DER binary compact formatcer- CER Windows-compatible format (same as DER)
Truststore Formats (public certificate only, for trust validation):
p12-truststore- PKCS#12 truststore containing only the CA certificatejks-truststore- Java KeyStore truststore containing only the CA certificate
Keystore Formats (certificate + private key, for CA signing operations):
p12-keystore- PKCS#12 keystore with CA certificate and private keyjks-keystore- Java KeyStore with CA certificate and private key
Security Note: Keystore formats expose the CA’s private key. They are refused with 403 CA_KEY_EXPORT_DISABLED unless the server runs with ALLOW_CA_KEY_EXPORT=true. When enabled, only the admin role may use them (403 CA_KEY_EXPORT_ADMIN_REQUIRED otherwise) and every attempt is written to the audit log as ca.export_private_key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Download format
DEPRECATED: use the X-Export-Password header instead. A password in the URL is recorded in browser history and proxy/server logs. Password for P12 and JKS formats. Required for keystore formats, optional for truststore formats (defaults to “changeit” if not provided)
Header Parameters
Section titled “Header Parameters”Export password for password-protected formats. Preferred over the deprecated password query parameter: a header is not recorded in browser history or in proxy/server access logs. Takes precedence over the query parameter.
Responses
Section titled “Responses”Default Response
object
Base64-encoded certificate data
Example generated
{ "data": "example", "mimeType": "example", "filename": "example"}Default Response
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
object
object
object
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}PKI Manager is a personal project of Oriol Rius, built for his own use. It is not a commercial product. About this project