Edit SNI SSL Certificate

To update a custom SNI SSL certificate, use the following request:

PUT /cdn_ssl_certificates/:id.xml
PUT /cdn_ssl_certificates/:id.xml

XML Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml' --url 'http://onapp.test/cdn_ssl_certificates/12.xml' '<cdn_ssl_certificate><name>cert1</name><cert>-----BEGIN CERTIFICATE-----\r\nMIIFKzCCBBOgAwIBAgIQMvEFlcrw7X8kOaJ/Sy1eYjANBgkqhkiG9w0BAQUFADB/\r\nMQswCQYDVQQGEwJCRTEfMB0GA1UECxMWRm9yIFRlc3QgUHVycG9zZXMgT25seTEZ\r\nMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTE0MDIGA1UEAxMrR2xvYmFsU2lnbiBP\r\ncmdhbml6YXRpb24gVmFsaWRhdGlvbiBDQVQgLSBHMjAeFw0xMzExMTEwNzE0MDRa\r\nFw0xNDExMTIwNzE0MDRaME4xCzAJBgNVBAYTAk1ZMSEwHwYDVQQLExhEb21haW4g\r\nQ29udHJvbCBWYWxpZGF0ZWQxHDAaBgNVBAMTE3d3dzQuZG91YmxldWtheS5jb20w\r\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4Wa8LZprvDo6ceUVLqO6O\r\n6DoFRGIAuReYztClkamekCSauwwFN4Y/BAT6kvwxofYttwLgZk19ivID6AEFDh9f\r\nUexmmzNwb9nUEAdUljy3VUdmkhlSfNHxO718qIM6rot/y7TagYg54qij9c29bYe/\r\nFpamqJC0n/YrVJxeHL2Czu9iCUtX/FgW44GdvYEDeWEvHmR1cafT231VITsQnuPU\r\nd1Yh2B0jISgqy8JLfFhfMGaSv18gLybyYl86vWQ0/Bs7of5afxl65SH4/BiaMCgZ\r\nRGZJ51SxyKVUTA/6pDP9DJCNPPngy1xC5R3aSy4yShZehR3LSsabqAasp1AytYWz\r\nAgMBAAGjggHSMIIBzjAOBgNVHQ8BAf8EBAMCBaAwSQYDVR0gBEIwQDA+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e4WgvCArzlyzggvTYcUnRDkJcpvXz9Oeh\r\ncWVsJKvG7artc02T/gd7XXNu02LBAUYQt9L8OhsCgYACPdA9U8zWf8JNPTzEiQ9r\r\nqdtkbcHcBLsgyD55jOFlFH+y8yZIxn9yABVaEEm7nXnbv7iWywLLpnIxbv2oU8R+\r\nRDEH2uCG2Vyf3NMkiHC1LSLs18MaDRKp4JoR1LnwRd0FrtPA0/PSBuXMvvsHkf+3\r\nw9kUFf64CEyopRmzXrQiMQKBgEqxtVFOoSdXc5emBAB9krQXDCihF8RGcbRkvN8W\r\n80vPvXtBQLqcE1dMepnfyU3jTqEFDWG1vxoJkgkjj6i7gEX6+NxATVHvIqb+7x1J\r\nQuNXPVAF4d/8cBvxqeuRIQs+bGzCATBbR4zli5sjIfwR7f0U0Z3zkaPKFjEFU4/M\r\nGOurAoGAEizvbWrvRTjulMjy/wwSFvaSjO4i9m1JxJxZm/0EZnQBNbeOmVw/TijG\r\nWnegJxB1PlR8L/N+PcMkTpaBKYCMJsMTPRwdlpn8xWLgG5p0RxqilbkH+F9RAlcs\r\nFeZsDaTSO3y2FYIntUA43cQLjb3UMkN+pz2NEtOBKSWxPOizRWo=\r\n-----END RSA PRIVATE KEY-----</key></cdn_ssl_certificate>'

JSON Request Example

curl -i -X PUT -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json' --url 'http://onapp.test/cdn_ssl_certificates/12.json' -d '{"cdn_ssl_certificate":{"name":"cert1","cert":"-----BEGIN CERTIFICATE-----\r\nMIIFKzCCBBOgAwIBAgIQMvEFlcrw7X8kOaJ/Sy1eYjANBgkqhkiG9w0BAQUFADB/\r\nMQswCQYDVQQGEwJCRTEfMB0GA1UECxMWRm9yIFRlc3QgUHVycG9zZXMgT25seTEZ\r\nMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTE0MDIGA1UEAxMrR2xvYmFsU2lnbiBP\r\ncmdhbml6YXRpb24gVmFsaWRhdGlvbiBDQVQgLSBHMjAeFw0xMzExMTEw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jO4i9m1JxJxZm/0EZnQBNbeOmVw/TijG\r\nWnegJxB1PlR8L/N+PcMkTpaBKYCMJsMTPRwdlpn8xWLgG5p0RxqilbkH+F9RAlcs\r\nFeZsDaTSO3y2FYIntUA43cQLjb3UMkN+pz2NEtOBKSWxPOizRWo=\r\n-----END RSA PRIVATE KEY-----"}}'

Where:

id - ID of the certificate

name - the name of the certificate

cert - the certificate key

key - the SSL key issued by your SSL provider

  • Every line should be separated by \r\n.
  • Make sure that cert and key parameters do not contain spaces between lines. Except delimiters:

-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----