Authorizations
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Body
Path to the file or folder for which the rule will be applied. The rule is applied if the requested URI matches the rule path. We add a leading forward slash to any rule path. Specify a path without a forward slash.
300
"/folder/images/*.png"
Rule type. Possible values:
- Type 0 - Regular expression. Must start with '^/' or '/'.
- Type 1 - Regular expression. Note that for this rule type we automatically add / to each rule pattern before your regular expression. This type is legacy, please use Type 0.
0 <= x <= 1
0
Enables or disables a rule. Possible values:
- true - Rule is active, rule settings are applied.
- false - Rule is inactive, rule settings are not applied.
true
Rule name.
255
"My first rule"
Rule execution order: from lowest (1) to highest. If requested URI matches multiple rules, the one higher in the order of the rules will be applied.
1 <= x <= 2147483647
1
Sets a protocol other than the one specified in the CDN resource settings to connect to the origin. Possible values:
- HTTPS - CDN servers connect to origin via HTTPS protocol.
- HTTP - CDN servers connect to origin via HTTP protocol.
- MATCH - Connection protocol is chosen automatically; in this case, content on origin source should be available for the CDN both through HTTP and HTTPS protocols.
- null -
originProtocol
setting is inherited from the CDN resource settings.
HTTPS
, HTTP
, MATCH
null
ID of the origin group to which the rule is applied. If the origin group is not specified, the rule is applied to the origin group that the CDN resource is associated with.
null
List of options that can be configured for the rule.
In case of null
value the option is not added to the rule.
Option inherits its value from the CDN resource settings.
Response
Successful.
Rule ID.
5
Rule name.
255
"My first rule"
Enables or disables a rule. Possible values:
- true - Rule is active, rule settings are applied.
- false - Rule is inactive, rule settings are not applied.
true
Defines whether the rule has been deleted. Possible values:
- true - Rule has been deleted.
- false - Rule has not been deleted.
false
ID of the origin group to which the rule is applied. If the origin group is not specified, the rule is applied to the origin group that the CDN resource is associated with.
null
Path to the file or folder for which the rule will be applied. The rule is applied if the requested URI matches the rule path. We add a leading forward slash to any rule path. Specify a path without a forward slash.
300
"/folder/images/*.png"
Rule type. Possible values:
- Type 0 - Regular expression. Must start with '^/' or '/'.
- Type 1 - Regular expression. Note that for this rule type we automatically add / to each rule pattern before your regular expression. This type is legacy, please use Type 0.
0 <= x <= 1
0
Rule execution order: from lowest (1) to highest. If requested URI matches multiple rules, the one higher in the order of the rules will be applied.
1 <= x <= 2147483647
1
Protocol used by CDN servers to request content from an origin source. Possible values:
- HTTPS - CDN servers connect to origin via HTTPS protocol.
- HTTP - CDN servers connect to origin via HTTP protocol.
- MATCH - Connection protocol is chosen automatically; in this case, content on origin source should be available for the CDN both through HTTP and HTTPS protocols.
HTTPS
, HTTP
, MATCH
"HTTPS"
Sets a protocol other than the one specified in the CDN resource settings to connect to the origin. Possible values:
- HTTPS - CDN servers connect to origin via HTTPS protocol.
- HTTP - CDN servers connect to origin via HTTP protocol.
- MATCH - Connection protocol is chosen automatically; in this case, content on origin source should be available for the CDN both through HTTP and HTTPS protocols.
- null -
originProtocol
setting is inherited from the CDN resource settings.
HTTPS
, HTTP
, MATCH
null
Defines whether the rule has an applied preset. Possible values:
- true - Rule has a preset applied.
- false - Rule does not have a preset applied. If a preset is applied to the rule, the options included in the preset cannot be edited for the rule.
false
ID of the rule with which the current rule is synchronized within the CDN resource shared cache zone feature.
null
List of options that can be configured for the rule.
In case of null
value the option is not added to the rule.
Option inherits its value from the CDN resource settings.