Update SSL
Update SSL of VoD push zone
curl -X POST "https://api.5centscdn.com/v2/zones/vod/push/42/ssl" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"enabled": "",
"http2": true,
"redirect": false,
"mode": "S",
"certid": 42,
"warning": false,
"crt": "",
"name": "",
"key": "",
"cabundle": ""
}'
import requests
import json
url = "https://api.5centscdn.com/v2/zones/vod/push/42/ssl"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"enabled": "",
"http2": true,
"redirect": false,
"mode": "S",
"certid": 42,
"warning": false,
"crt": "",
"name": "",
"key": "",
"cabundle": ""
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/zones/vod/push/42/ssl", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"enabled": "",
"http2": true,
"redirect": false,
"mode": "S",
"certid": 42,
"warning": false,
"crt": "",
"name": "",
"key": "",
"cabundle": ""
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"enabled": "",
"http2": true,
"redirect": false,
"mode": "S",
"certid": 42,
"warning": false,
"crt": "",
"name": "",
"key": "",
"cabundle": ""
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/zones/vod/push/42/ssl", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/zones/vod/push/42/ssl')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"enabled": "",
"http2": true,
"redirect": false,
"mode": "S",
"certid": 42,
"warning": false,
"crt": "",
"name": "",
"key": "",
"cabundle": ""
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Zone updated successfully",
"zone": {
"type": "push",
"id": 12345,
"serviceid": 67890,
"mode": "http",
"cnames": "",
"edgeruleids": 0,
"deleted": null,
"name": "my-cdn-zone",
"hashid": "abc123def456",
"fqdn": "cdn.example.com",
"fqdnVoD": "vod.example.com",
"edgerules": {
"enabled": "N"
},
"domainlock": {
"policy": "N",
"list": "example.com,cdn.example.com",
"ips": "203.0.113.10",
"noreferer": "N",
"type": "push",
"enabled": "N",
"active": "N"
},
"geoblock": {
"policy": "N",
"list": [
"US",
"GB"
],
"ips": "203.0.113.10",
"enabled": "N",
"active": "N"
},
"securetoken": {
"policy": "F",
"keyip": "N",
"list": "ab12cd34ef56gh78",
"timeout": 3600,
"session": "0",
"ips": "",
"dirs": "",
"enabled": "N",
"active": "N"
},
"eac": {
"policy": "N",
"list": "http://example.com/auth.script",
"ips": "203.0.113.10",
"enabled": "N",
"active": "N"
},
"ssl": {
"http": "N",
"http2": "Y",
"redirect": "Y",
"mode": "S",
"certid": null,
"zerossl": null,
"enabled": "Y",
"warning": false
},
"cache": {
"smart": "0",
"cache": "4h",
"expiry": "1M",
"querystring": "N",
"cachecontrol": "Y",
"usestale": "Y",
"revalidate": "Y",
"cacheInSecs": 14400,
"cacheInMins": 240,
"expiryInSecs": 2592000,
"expiryInMins": 43200
},
"edge": {
"compression": "N",
"compressionlevel": 5,
"disposition": "N",
"stripcookie": "N",
"xff": "N",
"cors": "Y",
"webp": "N",
"pseudostreaming": "N",
"wp": "N",
"lfo": "Y",
"prefresh": "N"
},
"transcodefile": {
"profiles": [
"1",
"2"
],
"emails": [
"admin@example.com"
],
"webhooks": [
"https://hooks.example.com/webhook"
]
},
"ftpdetails": {
"username": "user_67890_push_12345",
"password": "••••••••"
},
"server": {
"code": "206",
"name": "Singapore",
"country": "SouthEast Asia",
"meta": {
"uploadPort": "21",
"uploadHost": "upload.example.com"
}
},
"ssl_enabled": "Y"
},
"warnings": []
}
/zones/vod/push/{zoneid}/sslTarget server for requests. Edit to use your own host.
API key (sent in header)
Zone ID
The media type of the request body
Always sent as empty string. SSL state is determined by the mode field.
Enable or disable HTTP/2 protocol. true = HTTP/2 enabled. false = HTTP/1.1 only.
Enable or disable HTTPS redirect. true = all HTTP requests are redirected to HTTPS with a 301 Moved Permanently response. false = allow both HTTP and HTTPS.
SSL certificate type. N = None (no SSL, HTTP only). S = Shared (5centsCDN shared wildcard certificate). L = Free SSL (auto-provisioned via ZeroSSL/Let's Encrypt, requires at least one CNAME configured). C = Custom (upload your own certificate).
ID of the custom SSL certificate to use. Required when mode is C. Null for all other modes.
SSL configuration warning indicator. Always false in request payloads.
SSL certificate content in PEM format (CRT). Only applicable when uploading a new custom certificate.
Name of the SSL certificate. Only applicable when uploading a new custom certificate.
Private key in PEM format. Only applicable when uploading a new custom certificate.
Certificate Authority (CA) bundle in PEM format. Only applicable when uploading a new custom certificate.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Body
Enable or disable HTTP/2 protocol. true = HTTP/2 enabled. false = HTTP/1.1 only.
trueEnable or disable HTTPS redirect. true = all HTTP requests are redirected to HTTPS with a 301 Moved Permanently response. false = allow both HTTP and HTTPS.
falseSSL certificate type. N = None (no SSL, HTTP only). S = Shared (5centsCDN shared wildcard certificate). L = Free SSL (auto-provisioned via ZeroSSL/Let's Encrypt, requires at least one CNAME configured). C = Custom (upload your own certificate).
NSLCID of the custom SSL certificate to use. Required when mode is C. Null for all other modes.
42SSL certificate content in PEM format (CRT). Only applicable when uploading a new custom certificate.
Name of the SSL certificate. Only applicable when uploading a new custom certificate.
Private key in PEM format. Only applicable when uploading a new custom certificate.
Certificate Authority (CA) bundle in PEM format. Only applicable when uploading a new custom certificate.
Responses
Status of the API response.
Human-readable status message describing the outcome.
Array of non-fatal warning messages from the operation.