List edge function rules
GET
/api/v2/organizations/{organization}/projects/{project}/rules/function
const url = 'https://dashboard.quantcdn.io/api/v2/organizations/example/projects/example/rules/function';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://dashboard.quantcdn.io/api/v2/organizations/example/projects/example/rules/function \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organization
required
string
Organization identifier
project
required
string
Project identifier
Responses
Section titled “Responses”The request has succeeded.
Media typeapplication/json
Array<object>
object
name
Rule name
string
uuid
required
Rule UUID
string
rule_id
Rule ID
string
weight
Rule weight
integer
url
URL patterns
Array<string>
domain
Domain patterns
Array<string>
disabled
required
Whether rule is disabled
boolean
only_with_cookie
Only apply with cookie
string
method
HTTP method
string
method_is
Allowed HTTP methods
Array<string>
method_is_not
Excluded HTTP methods
Array<string>
ip
IP address
string
ip_is
Allowed IP addresses
Array<string>
ip_is_not
Excluded IP addresses
Array<string>
asn
ASN filter type (asn_is, asn_is_not, any)
string
asn_is
Allowed AS numbers
Array<string>
asn_is_not
Excluded AS numbers
Array<string>
country
Country code
string
country_is
Allowed countries
Array<string>
country_is_not
Excluded countries
Array<string>
action
required
Rule action
string
action_config
required
object
fn_uuid
required
Function UUID
string
Example
[ { "name": "Test redirect rule", "uuid": "123e4567-e89b-12d3-a456-426614174000", "rule_id": "rule-001", "weight": 0, "url": [ "/old-path/*", "/legacy/*" ], "domain": [ "test-domain.com", "*.test-domain.com" ], "disabled": false, "only_with_cookie": "session_id", "method": "GET", "method_is": [ "GET", "POST" ], "method_is_not": [ "DELETE", "PUT" ], "ip": "192.168.1.1", "ip_is": [ "192.168.1.0/24", "10.0.0.1" ], "ip_is_not": [ "172.16.0.0/12" ], "asn": "any", "asn_is": [ "15169", "8075" ], "asn_is_not": [ "13335" ], "country": "US", "country_is": [ "US", "CA", "GB" ], "country_is_not": [ "CN", "RU" ], "action": "redirect", "action_config": { "fn_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7" } }]The server could not understand the request due to invalid syntax.
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}Access is forbidden.
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}