Ana içeriğe geç

Update Certificate

Endpoint​

PUT /apiops/projects/{projectName}/certificates/{certificateName}/

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typemultipart/form-dataYes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name
certificateNamestringYesCertificate name (cannot be changed)

Form Data​

Same as Create Certificate. See Create Certificate for field descriptions.

Query Parameters​

ParameterTypeRequiredDescription
jwkUpdateActionstringNoAction to take on referenced JWKs: NULLIFY (clear references) or UPDATE (re-parse and update JWKs). Defaults to NULLIFY if not provided.
updateScopestringNoScope for updating JWKs: SAME_PROJECT or ALL_PROJECTS (used when jwkUpdateAction is UPDATE)

Notes​

  • Certificate name in path must match existing certificate
  • All form fields are required
  • Old certificate is deleted and new one is created
  • Certificate is automatically deployed after update
  • If jwkUpdateAction=UPDATE, JWKs created from this certificate will be re-parsed and updated
  • If jwkUpdateAction=NULLIFY or not provided, JWK references will be cleared (default behavior)
  • updateScope determines which JWKs to update when jwkUpdateAction=UPDATE: SAME_PROJECT or ALL_PROJECTS

Response​

Same as Create Certificate. See Create Certificate for response format.

cURL Example​

Example 1: Update Certificate​

curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/certificates/my-certificate/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "alias=updated-cert-alias" \
-F "certificateDescription=Updated SSL certificate" \
-F "environmentList=production,staging" \
-F "pemEncodedFile=@updated-certificate.pem"

Example 2: Update Certificate with JWK Updates​

curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/certificates/my-certificate/?jwkUpdateAction=UPDATE&updateScope=SAME_PROJECT" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "alias=updated-cert-alias" \
-F "certificateDescription=Updated SSL certificate" \
-F "environmentList=production,staging" \
-F "pemEncodedFile=@updated-certificate.pem"

Example 3: Update Certificate and Clear JWK References​

curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/certificates/my-certificate/?jwkUpdateAction=NULLIFY" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "alias=updated-cert-alias" \
-F "certificateDescription=Updated SSL certificate" \
-F "environmentList=production,staging" \
-F "pemEncodedFile=@updated-certificate.pem"

Notes and Warnings​

  • Certificate Name:

    • Cannot be changed (specified in path)
    • Must match existing certificate
  • Replacement:

    • Old certificate is deleted and new one is created
    • This ensures clean update across all environments
  • All Fields Required:

    • All form fields must be provided
    • Same requirements as create
  • Referenced JWKs:

    • If jwkUpdateAction=UPDATE, JWKs created from this certificate will be re-parsed and updated
    • If jwkUpdateAction=NULLIFY or not provided (default), JWK references will be cleared
    • updateScope determines which JWKs to update when jwkUpdateAction=UPDATE: SAME_PROJECT or ALL_PROJECTS
    • Default behavior (NULLIFY) ensures JWKs don't reference deleted or updated certificates

Permissions​

User must have SECRETS + MANAGE permission in the project. For deployment operations (when deploying certificates to environments), user must also have SECRETS + DEPLOY_UNDEPLOY permission.