Download a certificate you have permission to access, including its current issuance, issuer chain, and stored private key (if available). Returns 404 Not Found for any other certificate.
GET /downloads/{certificateId}
GET https://zanpki.com/downloads/{certificateId}
| Operation ID |
downloads.certificateId.get
|
|---|---|
| Access | Browser session signed in through ZanAuth, using the access token cookie alongside its ID token and refresh token cookies. Or: An access token issued for this site by its ZanAuth issuer, or a static key. |
Parameters
| Name | In | Type | Description | |
|---|---|---|---|---|
certificateId
| Path | Required | string (snowflake) | Certificate ID. |
Responses
| Status | Description | Schema | Content type |
|---|---|---|---|
| 200 | The certificate's current issuance, its issuer chain, and its stored private key (if available). | CertificateDownload | application/json |
| 422 | The request input was rejected. The errors object lists each validation failure. | ValidationProblem | application/json |
| Any other status | The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation. | Problem | application/json |
200 The certificate's current issuance, its issuer chain, and its stored private key (if available).
| Property | Type | Description | |
|---|---|---|---|
certificates_id
| string (snowflake) | Required | The certificate's ID. It stays the same through every reissue and renewal. |
issuances_id
| string (snowflake) | Required | ID of the issuance. Each time a certificate is issued, it receives a new issuance ID and serial number. |
issuances_expires_at
| integer (int64) | Required | When the certificate expires (NotAfter), in seconds since the Unix epoch. For a certificate request, null until a certificate has been issued. |
certificate_chain
| string | Required | PEM-encoded certificate chain starting with the leaf certificate, followed by its issuing authorities. |
private_key
| string, or null | Required | PEM-encoded private key (PKCS #8), decrypted from ZanKMS for this response only. Null if ZanPKI does not store a private key for this certificate (such as one imported without its key). |
422 The request input was rejected. The errors object lists each validation failure.
| Property | Type | Description | |
|---|---|---|---|
type
| string | Required | A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check. |
title
| string | Required | The HTTP status as text, such as Not Found. |
status
| integer (int32) | Required | The HTTP status code of the response. |
detail
| string | Required | A human-readable explanation of what went wrong. |
instance
| string | Required | The path the request was sent to. |
errors
| InputErrors | Required | Validation errors for each rejected value. Parameter errors are returned as a list, and body errors as a tree matching the request body structure. |
Any other status: The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation.
| Property | Type | Description | |
|---|---|---|---|
type
| string | Required | A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check. |
title
| string | Required | The HTTP status as text, such as Not Found. |
status
| integer (int32) | Required | The HTTP status code of the response. |
detail
| string | Required | A human-readable explanation of what went wrong. |
instance
| string | Required | The path the request was sent to. |
Example
curl -X GET 'https://zanpki.com/downloads/{certificateId}' \
-H 'Authorization: Bearer <access token>'