URL
https://cdnsun.com/api/custom-ssl-certificates
Method
POST
Curl example
curl -i -X POST -u username:password -H 'Accept: application/json' -H 'Content-type: application/json' --url 'https://cdnsun.com/api/custom-ssl-certificates' -d '{"custom_ssl_certificate":{"cdn_id":5,"type":"SNI_LE"}}'
Options
Option | Data Type | Description | Example | Note |
---|---|---|---|---|
cdn_id* | integer | Custom SSL Certificate CDN Service ID. | 5 | |
type* | string | Custom SSL Certificate type. | SNI_LE | SNI or SNI_LE |
certificate | string | Custom SSL Certificate content in PEM format. | -----BEGIN CERTIFICATE-----\nMIIDX7uCaIo7IWnNFn3RfEf\nQG1Tzzj70gbiKpQ=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n3ednkIjdWnNFn3RfEf\nQG1Tzzj70gbiP3=\n-----END CERTIFICATE----- | For SNI only. Replace new line characters with \n or \\n. Append all intermediate certificates. |
certificate_key | string | Custom SSL Certificate key in PEM format. | -----BEGIN PRIVATE KEY-----\nVIDX8uCaIo7IWnNFn3RfEf\nQG1Tzzj70gbiKa1=\n-----END PRIVATE KEY----- | For SNI only. Replace new line characters with \n or \\n. |
Note
Please note that only SNI(LE) SSL certificates can be created. Please refer to Creating CDN services with an SSL enabled for more details.