Ana içeriğe geç

Export Certificate

Endpoint

GET /apiops/projects/{projectName}/certificates/{certificateName}/export/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
certificateNamestringYesCertificate name

Query Parameters

None.

Response

Success Response (200 OK)

The response is a ZIP file containing certificate files.

Headers

  • Content-Type: application/octet-stream
  • Content-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
  • 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

Permissions

User must have SECRETS + EXPORT_IMPORT permission in the project.