Replace TLS configuration
PUT
/
cloud-cdn
/
distributions
/
configurations
/
tls
Replace TLS configuration
curl --request PUT \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/tls \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enable_https": true,
"https_redirect": true,
"enable_http3": true,
"tls_versions_support": {
"ssl3": true,
"tls1": true,
"tls1_1": true,
"tls1_2": true,
"tls1_3": true
},
"custom_sni_hostname": {
"enabled": true,
"value": "<string>"
},
"origin_tls_validation": true
}
'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/tls"
payload = {
"enable_https": True,
"https_redirect": True,
"enable_http3": True,
"tls_versions_support": {
"ssl3": True,
"tls1": True,
"tls1_1": True,
"tls1_2": True,
"tls1_3": True
},
"custom_sni_hostname": {
"enabled": True,
"value": "<string>"
},
"origin_tls_validation": True
}
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({
enable_https: true,
https_redirect: true,
enable_http3: true,
tls_versions_support: {ssl3: true, tls1: true, tls1_1: true, tls1_2: true, tls1_3: true},
custom_sni_hostname: {enabled: true, value: '<string>'},
origin_tls_validation: true
})
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/tls', 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/tls"
payload := strings.NewReader("{\n \"enable_https\": true,\n \"https_redirect\": true,\n \"enable_http3\": true,\n \"tls_versions_support\": {\n \"ssl3\": true,\n \"tls1\": true,\n \"tls1_1\": true,\n \"tls1_2\": true,\n \"tls1_3\": true\n },\n \"custom_sni_hostname\": {\n \"enabled\": true,\n \"value\": \"<string>\"\n },\n \"origin_tls_validation\": true\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_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}Authorizations
Access key beginning with APTRANET_.
Current secret paired with the access key.
Query Parameters
Distribution identifier.
Required range:
x >= 1Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Select a certificate from the same project. Explicit 0 selects automatic management. Omit to preserve the current binding when HTTPS is already enabled.
Required range:
x >= 0Response
TLS configuration updated.
Replace TLS configuration
curl --request PUT \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/tls \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enable_https": true,
"https_redirect": true,
"enable_http3": true,
"tls_versions_support": {
"ssl3": true,
"tls1": true,
"tls1_1": true,
"tls1_2": true,
"tls1_3": true
},
"custom_sni_hostname": {
"enabled": true,
"value": "<string>"
},
"origin_tls_validation": true
}
'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/tls"
payload = {
"enable_https": True,
"https_redirect": True,
"enable_http3": True,
"tls_versions_support": {
"ssl3": True,
"tls1": True,
"tls1_1": True,
"tls1_2": True,
"tls1_3": True
},
"custom_sni_hostname": {
"enabled": True,
"value": "<string>"
},
"origin_tls_validation": True
}
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({
enable_https: true,
https_redirect: true,
enable_http3: true,
tls_versions_support: {ssl3: true, tls1: true, tls1_1: true, tls1_2: true, tls1_3: true},
custom_sni_hostname: {enabled: true, value: '<string>'},
origin_tls_validation: true
})
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/tls', 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/tls"
payload := strings.NewReader("{\n \"enable_https\": true,\n \"https_redirect\": true,\n \"enable_http3\": true,\n \"tls_versions_support\": {\n \"ssl3\": true,\n \"tls1\": true,\n \"tls1_1\": true,\n \"tls1_2\": true,\n \"tls1_3\": true\n },\n \"custom_sni_hostname\": {\n \"enabled\": true,\n \"value\": \"<string>\"\n },\n \"origin_tls_validation\": true\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_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}