Read Origin Shield configuration
Returns available locations and current price text. Origin Shield is a CDN cache add-on, separate from Cloud Shield application protection.
GET
/
cloud-cdn
/
distributions
/
shield
Read Origin Shield configuration
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/shield \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/shield"
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/shield', 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/shield"
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))
}{
"enabled": true,
"location_id": 123,
"locations": [
{
"id": 2,
"datacenter": "<string>",
"country": "<string>",
"city": "<string>"
}
],
"manual_location_id": true,
"price": "<string>",
"cancel_at": "<string>",
"billing_period_end": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}Authorizations
Project API access key.
Current secret for the access key.
Query Parameters
Required range:
x >= 1Read Origin Shield configuration
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/shield \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/shield"
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/shield', 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/shield"
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))
}{
"enabled": true,
"location_id": 123,
"locations": [
{
"id": 2,
"datacenter": "<string>",
"country": "<string>",
"city": "<string>"
}
],
"manual_location_id": true,
"price": "<string>",
"cancel_at": "<string>",
"billing_period_end": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}