Export Certificate
Overview
Exports a certificate as a ZIP file containing certificate files for all environments. Each environment’s certificate is included as a separate .cer file in the ZIP archive.
Endpoint
GET /apiops/projects/{projectName}/certificates/{certificateName}/export/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| certificateName | string | Yes | Certificate name |
Query Parameters
None.
Response
Success Response (200 OK)
The response is a ZIP file containing certificate files.
Headers
Content-Type: application/octet-streamContent-Disposition: attachment; filename="{certificateName}-certificates.zip"Content-Length: {file-size}
Response Body
- Binary ZIP file containing:
{certificateName}-{environmentName}.cer- Certificate file for each environment
ZIP File Contents
- One .cer file per environment
- Files are named:
{certificateName}-{environmentName}.cer - Each file contains the certificate in binary DER format
Error Response (400 Bad Request)
{
"error": "bad_request",
"error_description": "Certificate (name: my-certificate) is not found!"
}
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/certificates/my-certificate/export/" \
-H "Authorization: Bearer YOUR_TOKEN" \
--output my-certificate-certificates.zip
Notes and Warnings
- ZIP Format:
- Certificate is exported as a ZIP archive
- Contains one .cer file per environment
- File Naming:
- Files are named:
{certificateName}-{environmentName}.cer - Example:
my-certificate-production.cer
- Files are named:
- Certificate Format:
- Certificates are in binary DER format (.cer)
- Can be converted to PEM format if needed
- Multiple Environments:
- ZIP contains certificates for all environments
- Each environment has its own file
Related Documentation
- Get Certificate - Get certificate details
- Create Certificate - Create a new certificate