Retrieve a domains's firewall rules
Project-scoped operation. Resource fields may include additional operation-specific values.
GET
/
shield
/
domains
/
{domain_id}
/
firewall-rules
Retrieve a domains's firewall rules
curl --request GET \
--url https://api.aptranet.com/shield/domains/{domain_id}/firewall-rules \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/shield/domains/{domain_id}/firewall-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/shield/domains/{domain_id}/firewall-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/shield/domains/{domain_id}/firewall-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))
}{
"results": [
{
"id": 2,
"name": "<string>",
"description": "<string>",
"enabled": true,
"action": {},
"conditions": [
{}
],
"source": "<string>",
"phase": "<string>"
}
],
"count": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>",
"error_description": "<string>"
}Authorizations
Project API access key.
Current secret for the access key.
Path Parameters
Query Parameters
Available options:
id, name, description, enabled, action, -id, -name, -description, -enabled, -action Required range:
0 <= x <= 100Required range:
0 <= x <= 100000Example:
"Block by specific IP rule."
Example:
"This rule blocks all the requests coming form a specific IP address."
Available options:
allow, block Example:
false
Retrieve a domains's firewall rules
curl --request GET \
--url https://api.aptranet.com/shield/domains/{domain_id}/firewall-rules \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/shield/domains/{domain_id}/firewall-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/shield/domains/{domain_id}/firewall-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/shield/domains/{domain_id}/firewall-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))
}{
"results": [
{
"id": 2,
"name": "<string>",
"description": "<string>",
"enabled": true,
"action": {},
"conditions": [
{}
],
"source": "<string>",
"phase": "<string>"
}
],
"count": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>",
"error_description": "<string>"
}