Proxy Record
curl -X POST "https://api.5centscdn.com/v2/dns/example_string/records/example_string/proxy" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"mode": "http",
"optimize": "http",
"ssl": "N",
"cache": "1d",
"expiry": "1d",
"cachecontrol": "Y",
"usestale": "Y",
"revalidate": "Y",
"querystring": "N",
"scheme": "http",
"port": "80",
"status": 1,
"type": "A",
"host": "www",
"record": "1.1.1.1",
"ttl": 60
}'
import requests
import json
url = "https://api.5centscdn.com/v2/dns/example_string/records/example_string/proxy"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"mode": "http",
"optimize": "http",
"ssl": "N",
"cache": "1d",
"expiry": "1d",
"cachecontrol": "Y",
"usestale": "Y",
"revalidate": "Y",
"querystring": "N",
"scheme": "http",
"port": "80",
"status": 1,
"type": "A",
"host": "www",
"record": "1.1.1.1",
"ttl": 60
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/dns/example_string/records/example_string/proxy", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"mode": "http",
"optimize": "http",
"ssl": "N",
"cache": "1d",
"expiry": "1d",
"cachecontrol": "Y",
"usestale": "Y",
"revalidate": "Y",
"querystring": "N",
"scheme": "http",
"port": "80",
"status": 1,
"type": "A",
"host": "www",
"record": "1.1.1.1",
"ttl": 60
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"mode": "http",
"optimize": "http",
"ssl": "N",
"cache": "1d",
"expiry": "1d",
"cachecontrol": "Y",
"usestale": "Y",
"revalidate": "Y",
"querystring": "N",
"scheme": "http",
"port": "80",
"status": 1,
"type": "A",
"host": "www",
"record": "1.1.1.1",
"ttl": 60
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/dns/example_string/records/example_string/proxy", 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/dns/example_string/records/example_string/proxy')
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 = '{
"mode": "http",
"optimize": "http",
"ssl": "N",
"cache": "1d",
"expiry": "1d",
"cachecontrol": "Y",
"usestale": "Y",
"revalidate": "Y",
"querystring": "N",
"scheme": "http",
"port": "80",
"status": 1,
"type": "A",
"host": "www",
"record": "1.1.1.1",
"ttl": 60
}'
response = http.request(request)
puts response.body
{
"status": "Success",
"statusDescription": "CDN Proxy enabled successfully."
}
/dns/{dnsId}/records/{recordid}/proxyTarget server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
Proxy mode. http means enable proxy, disabled means turn it off.
Performance optimization setting for the proxy.
SSL termination mode for CDN proxy to origin. N = HTTP (no SSL). S = HTTPS strict. F = Full SSL strict.
Cache duration for proxied responses.
Cache expiry/max-age duration for CDN content. N = no caching.
Respect Cache-Control headers from origin. Y means enabled.
Serve stale cache while revalidating in the background. Y means enabled.
Revalidate cached content with the origin server. Y means enabled.
Controls whether query string parameters are forwarded to the origin. Y = pass through. N = strip at edge.
Protocol to use when connecting to the origin server. http or https.
Origin server port number for CDN proxy.
Enable or disable the proxy. 1 means enabled, 0 means disabled.
DNS record type being proxied.
Hostname or subdomain for the proxied record.
IP address of the origin server.
Time to live in seconds for the DNS record.
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
SSL termination mode for CDN proxy to origin. N = HTTP (no SSL). S = HTTPS strict. F = Full SSL strict.
NSFCache expiry/max-age duration for CDN content. N = no caching.
N1h2h4h8h12h1d2d3d4d5d6d7dControls whether query string parameters are forwarded to the origin. Y = pass through. N = strip at edge.
YNResponses
Operation outcome.
Human-readable description of the operation outcome.