Replace advanced configuration
Requires Modify distribution. Read first and preserve desired values: omitted booleans become false. HTTPS-to-HTTP redirection conflicts with enabled HTTP-to-HTTPS redirection.
PUT
/
cloud-cdn
/
distributions
/
configurations
/
advanced
Replace advanced configuration
curl --request PUT \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_error_logging": true,
"disable_proxy_force_ranges": true,
"redirect_https_to_http": true,
"use_default_le_chain": true,
"use_dns01_le_challenge": true,
"use_rsa_le_certificate": true,
"query_forward_enabled": true,
"query_forward_from": [
"<string>"
],
"query_forward_to": [
"<string>"
],
"query_forward_keys": [
"<string>"
]
}
'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced"
payload = {
"network_error_logging": True,
"disable_proxy_force_ranges": True,
"redirect_https_to_http": True,
"use_default_le_chain": True,
"use_dns01_le_challenge": True,
"use_rsa_le_certificate": True,
"query_forward_enabled": True,
"query_forward_from": ["<string>"],
"query_forward_to": ["<string>"],
"query_forward_keys": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Aptranet-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
network_error_logging: true,
disable_proxy_force_ranges: true,
redirect_https_to_http: true,
use_default_le_chain: true,
use_dns01_le_challenge: true,
use_rsa_le_certificate: true,
query_forward_enabled: true,
query_forward_from: ['<string>'],
query_forward_to: ['<string>'],
query_forward_keys: ['<string>']
})
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced"
payload := strings.NewReader("{\n \"network_error_logging\": true,\n \"disable_proxy_force_ranges\": true,\n \"redirect_https_to_http\": true,\n \"use_default_le_chain\": true,\n \"use_dns01_le_challenge\": true,\n \"use_rsa_le_certificate\": true,\n \"query_forward_enabled\": true,\n \"query_forward_from\": [\n \"<string>\"\n ],\n \"query_forward_to\": [\n \"<string>\"\n ],\n \"query_forward_keys\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"error_description": "<string>"
}Authorizations
Project API access key.
Current secret for the access key.
Query Parameters
Required range:
x >= 1Body
application/json
Maximum array length:
50Maximum string length:
64Pattern:
^[A-Za-z0-9._*-]{1,64}$Maximum array length:
50Maximum string length:
64Pattern:
^[A-Za-z0-9._*-]{1,64}$Maximum array length:
50Maximum string length:
64Pattern:
^[A-Za-z0-9._*-]{1,64}$Response
Successful response.
Replace advanced configuration
curl --request PUT \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_error_logging": true,
"disable_proxy_force_ranges": true,
"redirect_https_to_http": true,
"use_default_le_chain": true,
"use_dns01_le_challenge": true,
"use_rsa_le_certificate": true,
"query_forward_enabled": true,
"query_forward_from": [
"<string>"
],
"query_forward_to": [
"<string>"
],
"query_forward_keys": [
"<string>"
]
}
'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced"
payload = {
"network_error_logging": True,
"disable_proxy_force_ranges": True,
"redirect_https_to_http": True,
"use_default_le_chain": True,
"use_dns01_le_challenge": True,
"use_rsa_le_certificate": True,
"query_forward_enabled": True,
"query_forward_from": ["<string>"],
"query_forward_to": ["<string>"],
"query_forward_keys": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Aptranet-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
network_error_logging: true,
disable_proxy_force_ranges: true,
redirect_https_to_http: true,
use_default_le_chain: true,
use_dns01_le_challenge: true,
use_rsa_le_certificate: true,
query_forward_enabled: true,
query_forward_from: ['<string>'],
query_forward_to: ['<string>'],
query_forward_keys: ['<string>']
})
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/configurations/advanced"
payload := strings.NewReader("{\n \"network_error_logging\": true,\n \"disable_proxy_force_ranges\": true,\n \"redirect_https_to_http\": true,\n \"use_default_le_chain\": true,\n \"use_dns01_le_challenge\": true,\n \"use_rsa_le_certificate\": true,\n \"query_forward_enabled\": true,\n \"query_forward_from\": [\n \"<string>\"\n ],\n \"query_forward_to\": [\n \"<string>\"\n ],\n \"query_forward_keys\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"error_description": "<string>"
}