List delivery rules
GET
/
cloud-cdn
/
distributions
/
rules
List delivery rules
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/rules \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/rules"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/rules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"rules": [
{
"name": "<string>",
"pattern": "<string>",
"weight": 1,
"active": true,
"origin_protocol": "",
"options": {
"allowedHttpMethods": {},
"brotli_compression": {},
"browser_cache_settings": {},
"cors": {},
"country_acl": {},
"disable_proxy_force_ranges": {},
"edge_cache_settings": {},
"fetch_compressed": {},
"follow_origin_redirect": {},
"force_return": {},
"forward_host_header": {},
"gzipOn": {},
"hostHeader": {},
"ignore_cookie": {},
"ignoreQueryString": {},
"image_stack": {},
"ip_address_acl": {},
"limit_bandwidth": {},
"proxy_cache_key": {},
"proxy_cache_methods_set": {},
"proxy_connect_timeout": {},
"proxy_read_timeout": {},
"query_params_blacklist": {},
"query_params_whitelist": {},
"query_string_forwarding": {},
"redirect_http_to_https": {},
"redirect_https_to_http": {},
"referrer_acl": {},
"response_headers_hiding_policy": {},
"rewrite": {},
"secure_key": {},
"slice": {},
"sni": {},
"stale": {},
"static_response_headers": {},
"staticHeaders": {},
"staticRequestHeaders": {},
"user_agent_acl": {},
"websockets": {}
},
"id": 2,
"rule_type": 123
}
],
"limit": 123
}{
"error": "<string>",
"error_description": "<string>"
}List delivery rules
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/rules \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/rules"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/rules"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"rules": [
{
"name": "<string>",
"pattern": "<string>",
"weight": 1,
"active": true,
"origin_protocol": "",
"options": {
"allowedHttpMethods": {},
"brotli_compression": {},
"browser_cache_settings": {},
"cors": {},
"country_acl": {},
"disable_proxy_force_ranges": {},
"edge_cache_settings": {},
"fetch_compressed": {},
"follow_origin_redirect": {},
"force_return": {},
"forward_host_header": {},
"gzipOn": {},
"hostHeader": {},
"ignore_cookie": {},
"ignoreQueryString": {},
"image_stack": {},
"ip_address_acl": {},
"limit_bandwidth": {},
"proxy_cache_key": {},
"proxy_cache_methods_set": {},
"proxy_connect_timeout": {},
"proxy_read_timeout": {},
"query_params_blacklist": {},
"query_params_whitelist": {},
"query_string_forwarding": {},
"redirect_http_to_https": {},
"redirect_https_to_http": {},
"referrer_acl": {},
"response_headers_hiding_policy": {},
"rewrite": {},
"secure_key": {},
"slice": {},
"sni": {},
"stale": {},
"static_response_headers": {},
"staticHeaders": {},
"staticRequestHeaders": {},
"user_agent_acl": {},
"websockets": {}
},
"id": 2,
"rule_type": 123
}
],
"limit": 123
}{
"error": "<string>",
"error_description": "<string>"
}