DNS RecordsProxy Record

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
}'
{
  "status": "Success",
  "statusDescription": "CDN Proxy enabled successfully."
}
POST
/dns/{dnsId}/records/{recordid}/proxy
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
modestring

Proxy mode. http means enable proxy, disabled means turn it off.

optimizestring

Performance optimization setting for the proxy.

sslstring

SSL termination mode for CDN proxy to origin. N = HTTP (no SSL). S = HTTPS strict. F = Full SSL strict.

Options: N, S, F
cachestring

Cache duration for proxied responses.

expirystring

Cache expiry/max-age duration for CDN content. N = no caching.

Options: N, 1h, 2h, 4h, 8h, 12h, 1d, 2d, 3d, 4d, 5d, 6d, 7d
cachecontrolstring

Respect Cache-Control headers from origin. Y means enabled.

usestalestring

Serve stale cache while revalidating in the background. Y means enabled.

revalidatestring

Revalidate cached content with the origin server. Y means enabled.

querystringstring

Controls whether query string parameters are forwarded to the origin. Y = pass through. N = strip at edge.

Options: Y, N
schemestring

Protocol to use when connecting to the origin server. http or https.

portstring

Origin server port number for CDN proxy.

statusinteger

Enable or disable the proxy. 1 means enabled, 0 means disabled.

typestring

DNS record type being proxied.

hoststring

Hostname or subdomain for the proxied record.

recordnumber

IP address of the origin server.

ttlinteger

Time to live in seconds for the DNS record.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

Body

application/json
modestring

Proxy mode. http means enable proxy, disabled means turn it off.

Example:
http
optimizestring

Performance optimization setting for the proxy.

Example:
http
sslstring

SSL termination mode for CDN proxy to origin. N = HTTP (no SSL). S = HTTPS strict. F = Full SSL strict.

Allowed values:NSF
cachestring

Cache duration for proxied responses.

Example:
1d
expirystring

Cache expiry/max-age duration for CDN content. N = no caching.

Allowed values:N1h2h4h8h12h1d2d3d4d5d6d7d
cachecontrolstring

Respect Cache-Control headers from origin. Y means enabled.

Example:
Y
usestalestring

Serve stale cache while revalidating in the background. Y means enabled.

Example:
Y
revalidatestring

Revalidate cached content with the origin server. Y means enabled.

Example:
Y
querystringstring

Controls whether query string parameters are forwarded to the origin. Y = pass through. N = strip at edge.

Allowed values:YN
schemestring

Protocol to use when connecting to the origin server. http or https.

Example:
http
portstring

Origin server port number for CDN proxy.

Example:
80
statusinteger

Enable or disable the proxy. 1 means enabled, 0 means disabled.

Example:
1
typestring

DNS record type being proxied.

Example:
A
hoststring

Hostname or subdomain for the proxied record.

Example:
www
recordnumber

IP address of the origin server.

Example:
1.1.1.1
ttlinteger

Time to live in seconds for the DNS record.

Example:
60

Responses

statusstring

Operation outcome.

statusDescriptionstring

Human-readable description of the operation outcome.