Client Reference
Page Rules
Page Rules endpoint reference.
Settings
Returns a list of settings (and their details) that Page Rules can apply to matching requests.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->pageRules()->settings('ZONE_ID');
List
List Page Rules in a zone.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
params | array | No | [] | Query Parameters |
php
$response = $client->pageRules()->list('ZONE_ID', []);
Create
Create a Page Rule
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
values | mixed | Yes | Values to set on Page Rule. |
php
$response = $client->pageRules()->create('ZONE_ID', $values);
Get
Fetches the details of a Page Rule.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
pageRuleId | string | Yes | Page Rule Identifier. |
php
$response = $client->pageRules()->get('ZONE_ID', 'PAGE_RULE_ID');
Edit
Updates one or more fields of an existing Page Rule.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
pageRuleId | string | Yes | Page Rule Identifier. | |
values | mixed | Yes | Values to set on Page Rule. |
php
$response = $client->pageRules()->edit('ZONE_ID', 'PAGE_RULE_ID', $values);
Update
Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
pageRuleId | string | Yes | Page Rule Identifier. | |
values | mixed | Yes | Values to set on Page Rule. |
php
$response = $client->pageRules()->update('ZONE_ID', 'PAGE_RULE_ID', $values);
Delete
Delete a Page Rule
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
pageRuleId | string | Yes | Page Rule Identifier. |
php
$response = $client->pageRules()->delete('ZONE_ID', 'PAGE_RULE_ID');

