curl --request POST \
--url https://api.bunny.net/pullzone/{pullZoneId}/edgerules/addOrUpdate \
--header 'AccessKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"Guid": "<string>",
"ActionType": "ForceSSL",
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>",
"Triggers": [
{
"Type": "Url",
"PatternMatchingType": 0,
"PatternMatches": [
"<string>"
],
"Parameter1": "<string>"
}
],
"ExtraActions": [
{
"ActionType": "<unknown>",
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>"
}
],
"TriggerMatchingType": 0,
"Description": "<string>",
"Enabled": true,
"OrderIndex": 123
}
'curl --request POST \
--url https://api.bunny.net/pullzone/{pullZoneId}/edgerules/addOrUpdate \
--header 'AccessKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"Guid": "<string>",
"ActionType": "ForceSSL",
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>",
"Triggers": [
{
"Type": "Url",
"PatternMatchingType": 0,
"PatternMatches": [
"<string>"
],
"Parameter1": "<string>"
}
],
"ExtraActions": [
{
"ActionType": "<unknown>",
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>"
}
],
"TriggerMatchingType": 0,
"Description": "<string>",
"Enabled": true,
"OrderIndex": 123
}
'API Access Key authorization header
The ID of the Pull Zone where the Edge Rule will be created
Model definition for EdgeRuleV2Model
The unique GUID of the edge rule
The action type of the edge rule
ForceSSL, Redirect, OriginUrl, OverrideCacheTime, BlockRequest, SetResponseHeader, SetRequestHeader, ForceDownload, DisableTokenAuthentication, EnableTokenAuthentication, OverrideCacheTimePublic, IgnoreQueryString, DisableOptimizer, ForceCompression, SetStatusCode, BypassPermaCache, OverrideBrowserCacheTime, OriginStorage, SetNetworkRateLimit, SetConnectionLimit, SetRequestsPerSecondLimit, RunEdgeScript, OriginMagicContainers, DisableWAF, RetryOrigin, OverrideBrowserCacheResponseHeader, RemoveBrowserCacheResponseHeader, DisableShieldChallenge, DisableShield, DisableShieldBotDetection, BypassAwsS3Authentication, DisableShieldAccessLists, DisableShieldRateLimiting "ForceSSL"
The Action parameter 1. The value depends on other parameters of the edge rule.
The Action parameter 2. The value depends on other parameters of the edge rule.
The Action parameter 3. The value depends on other parameters of the edge rule.
The list of trigger that trigger the edge rule
Show child attributes
Additional actions to be performed
Show child attributes
The trigger matching type
0, 1, 2 The description of the edge rule
Determines if the edge rule is currently enabled or not
The index of the edge rule in the list of execution priority
The Edge Rule was successfuly added
Was this page helpful?