Overview
IAM
- Account
- Users
- API Tokens
CDN
- IP addresses list
- CDN service
- Origins
- CDN resources
- CDN activity logs
- Log forwarding
- Log viewer
- Logs uploader
- Tools
- Rules
- Rule templates
- Purge history
- SSL certificates
- CA certificates
- CDN Statistics
- Advanced analytics
- Origin shielding
- Let's Encrypt certificates
Managed DNS
- Analyze
- Locations
- Lookup
- Metrics
- Pickers
- DNS Clients
- Zones
- DNSSEC
- RRsets
Cloud
- Bare Metal
- Container as a Service
- Cost Reports
- DDOS Protection
- File Shares
- Firewalls
- Floating IPs
- Function as a Service
- GPU Cloud
- IP Ranges
- Images
- Inference Instances
- Instances
- Load Balancers
- Logging
- Managed Kubernetes
- Managed PostgreSQL
- Networks
- Placement Groups
- Projects
- Quotas
- Regions
- Registry
- Reservations
- Reserved IPs
- Routers
- SSH Keys
- Secrets
- Service Endpoints
- Snapshot Schedules
- Snapshots
- Tasks
- User Actions
- User Role Assignments
- Volumes
Security
- Event Logs
- BGP announces
- Security Templates
- Profiles
FastEdge
- Apps
- Binaries
- FastEdge Clients
- FastEdge Secrets
- Stats
- FastEdge Templates
WAAP
- WAAP Service
- Domains
- Policies
- Analytics
- Custom Page Sets
- Custom Rules
- Firewall Rules
- Advanced Rules
- Tags
- Network Organizations
- API Discovery
- IP Spotlight
- Security Insights
Web Security
- Billing Statistics
- Resources
Video Streaming
- Streams
- Overlays
- Broadcasts
- Restreams
- Videos
- Subtitles
- Directories
- Playlists
- QualitySets
- Players
- AI
- Streaming Statistics
Object Storage
- Notifications
- Key
- Location
- Storage
- Storage Statistics
Custom Rules
Retrieve a domains's custom rules
Extracts a list of custom rules assigned to a domain, offering filter, ordering, and pagination capabilities
GET
/
waap
/
v1
/
domains
/
{domain_id}
/
custom-rules
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.waap.domains.custom_rules.list(
domain_id=0,
)
page = page.results[0]
print(page.id)
Copy
Ask AI
{
"limit": 123,
"offset": 123,
"count": 123,
"results": [
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"action": {
"allow": {},
"block": {
"status_code": 403,
"action_duration": "12h"
},
"captcha": {},
"handshake": {},
"monitor": {},
"tag": {
"tags": [
"<string>"
]
}
},
"conditions": [
{
"ip": {
"negation": false,
"ip_address": "127.0.0.1"
},
"ip_range": {
"negation": false,
"lower_bound": "127.0.0.1",
"upper_bound": "127.0.0.1"
},
"url": {
"negation": false,
"match_type": "Contains",
"url": "<string>"
},
"user_agent": {
"negation": false,
"user_agent": "<string>",
"match_type": "Contains"
},
"header": {
"negation": false,
"header": "<string>",
"value": "<string>",
"match_type": "Contains"
},
"header_exists": {
"negation": false,
"header": "<string>"
},
"response_header": {
"negation": false,
"header": "<string>",
"value": "<string>",
"match_type": "Contains"
},
"response_header_exists": {
"negation": false,
"header": "<string>"
},
"http_method": {
"negation": false,
"http_method": "CONNECT"
},
"file_extension": {
"negation": false,
"file_extension": [
"<string>"
]
},
"content_type": {
"negation": false,
"content_type": [
"<string>"
]
},
"country": {
"negation": false,
"country_code": [
"<string>"
]
},
"organization": {
"negation": false,
"organization": "<string>"
},
"request_rate": {
"ips": [
"127.0.0.1"
],
"http_methods": [
"CONNECT"
],
"path_pattern": "/",
"requests": 21,
"time": 1800,
"user_defined_tag": "<string>"
},
"owner_types": {
"negation": false,
"owner_types": [
"COMMERCIAL"
]
},
"tags": {
"negation": false,
"tags": [
"<string>"
]
},
"session_request_count": {
"negation": false,
"request_count": 123
},
"user_defined_tags": {
"negation": false,
"tags": [
"<string>"
]
}
}
],
"id": 123
}
]
}
Authorizations
API key for authentication.
Path Parameters
The domain ID
Query Parameters
Determine the field to order results by
Available options:
id
, name
, description
, enabled
, action
, -id
, -name
, -description
, -enabled
, -action
Examples:
"-id"
Number of items to return
Required range:
0 <= x <= 100
Number of items to skip
Required range:
0 <= x <= 100000
Filter rules based on their name. Supports '*' as a wildcard character.
Filter rules based on their description. Supports '*' as a wildcard character.
Filter to refine results by specific actions
Available options:
allow
, block
, captcha
, handshake
, monitor
, tag
Filter rules based on their active status
Response
200
application/json
Successful Response
The response is of type object
.
Was this page helpful?
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.waap.domains.custom_rules.list(
domain_id=0,
)
page = page.results[0]
print(page.id)
Copy
Ask AI
{
"limit": 123,
"offset": 123,
"count": 123,
"results": [
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"action": {
"allow": {},
"block": {
"status_code": 403,
"action_duration": "12h"
},
"captcha": {},
"handshake": {},
"monitor": {},
"tag": {
"tags": [
"<string>"
]
}
},
"conditions": [
{
"ip": {
"negation": false,
"ip_address": "127.0.0.1"
},
"ip_range": {
"negation": false,
"lower_bound": "127.0.0.1",
"upper_bound": "127.0.0.1"
},
"url": {
"negation": false,
"match_type": "Contains",
"url": "<string>"
},
"user_agent": {
"negation": false,
"user_agent": "<string>",
"match_type": "Contains"
},
"header": {
"negation": false,
"header": "<string>",
"value": "<string>",
"match_type": "Contains"
},
"header_exists": {
"negation": false,
"header": "<string>"
},
"response_header": {
"negation": false,
"header": "<string>",
"value": "<string>",
"match_type": "Contains"
},
"response_header_exists": {
"negation": false,
"header": "<string>"
},
"http_method": {
"negation": false,
"http_method": "CONNECT"
},
"file_extension": {
"negation": false,
"file_extension": [
"<string>"
]
},
"content_type": {
"negation": false,
"content_type": [
"<string>"
]
},
"country": {
"negation": false,
"country_code": [
"<string>"
]
},
"organization": {
"negation": false,
"organization": "<string>"
},
"request_rate": {
"ips": [
"127.0.0.1"
],
"http_methods": [
"CONNECT"
],
"path_pattern": "/",
"requests": 21,
"time": 1800,
"user_defined_tag": "<string>"
},
"owner_types": {
"negation": false,
"owner_types": [
"COMMERCIAL"
]
},
"tags": {
"negation": false,
"tags": [
"<string>"
]
},
"session_request_count": {
"negation": false,
"request_count": 123
},
"user_defined_tags": {
"negation": false,
"tags": [
"<string>"
]
}
}
],
"id": 123
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.