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": 0,
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>",
"Triggers": [
{
"Type": 0,
"PatternMatches": [
"<string>"
],
"PatternMatchingType": 0,
"Parameter1": "<string>"
}
],
"ExtraActions": [
{
"ActionType": 0,
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>"
}
],
"TriggerMatchingType": 0,
"Description": "<string>",
"Enabled": true,
"OrderIndex": 123,
"ReadOnly": true
}
'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": 0,
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>",
"Triggers": [
{
"Type": 0,
"PatternMatches": [
"<string>"
],
"PatternMatchingType": 0,
"Parameter1": "<string>"
}
],
"ExtraActions": [
{
"ActionType": 0,
"ActionParameter1": "<string>",
"ActionParameter2": "<string>",
"ActionParameter3": "<string>"
}
],
"TriggerMatchingType": 0,
"Description": "<string>",
"Enabled": true,
"OrderIndex": 123,
"ReadOnly": true
}
'API Access Key authorization header
The ID of the Pull Zone where the Edge Rule will be created
The Edge Rule that will be added
The unique GUID of the edge rule
The action type of the edge rule. ForceSSL = 0, Redirect = 1, OriginUrl = 2, OverrideCacheTime = 3, BlockRequest = 4, SetResponseHeader = 5, SetRequestHeader = 6, ForceDownload = 7, DisableTokenAuthentication = 8, EnableTokenAuthentication = 9, OverrideCacheTimePublic = 10, IgnoreQueryString = 11, DisableOptimizer = 12, ForceCompression = 13, SetStatusCode = 14, BypassPermaCache = 15, OverrideBrowserCacheTime = 16
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 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.
Show child attributes
Show child attributes
The trigger matching type. MatchAny = 0, MatchAll = 1, MatchNone = 2
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
Determines if the edge rule is read-only and cannot be modified or deleted
The Edge Rule was successfuly added
Was this page helpful?