List Page Rules

Fetches Page Rules in a zone.

/zones/{zone_identifier}/pagerules

get

Page Rules

page-rules-list-page-rules

Debug "planAvailability"

{
  "business": true,
  "enterprise": true,
  "free": true,
  "pro": true
}

Debug "tokenPermissions"

{
  "enum": [
    "#zone:read"
  ]
}

Debug "parameters"

[
  {
    "in": "path",
    "name": "zone_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "order",
    "schema": {
      "default": "priority",
      "description": "The field used to sort returned Page Rules.",
      "enum": [
        "status",
        "priority"
      ],
      "example": "status",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "direction",
    "schema": {
      "default": "desc",
      "description": "The direction used to sort returned Page Rules.",
      "enum": [
        "asc",
        "desc"
      ],
      "example": "desc",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "match",
    "schema": {
      "default": "all",
      "description": "When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",
      "enum": [
        "any",
        "all"
      ],
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "status",
    "schema": {
      "default": "disabled",
      "description": "The status of the Page Rule.",
      "enum": [
        "active",
        "disabled"
      ],
      "example": "active",
      "type": "string"
    }
  }
]

Debug "requestBody"

null

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "properties": {
                "errors": {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                },
                "messages": {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "enum": [
                    true
                  ],
                  "example": true,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            },
            {
              "properties": {
                "result": {
                  "items": {
                    "properties": {
                      "actions": {
                        "description": "The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both.",
                        "example": [
                          {
                            "id": "browser_check",
                            "value": "on"
                          }
                        ],
                        "items": {
                          "oneOf": [
                            {
                              "properties": {
                                "modified_on": {
                                  "description": "The timestamp of when the override was last modified.",
                                  "example": "2014-01-01T05:20:00.12345Z",
                                  "format": "date-time",
                                  "readOnly": true,
                                  "type": "string"
                                },
                                "name": {
                                  "description": "The type of route.",
                                  "enum": [
                                    "forward_url"
                                  ],
                                  "example": "forward_url"
                                },
                                "value": {
                                  "properties": {
                                    "type": {
                                      "description": "The response type for the URL redirect.",
                                      "enum": [
                                        "temporary",
                                        "permanent"
                                      ],
                                      "example": "temporary"
                                    },
                                    "url": {
                                      "description": "The URL to redirect the request to.\nNotes: ${num} refers to the position of '*' in the constraint value.",
                                      "example": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3",
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "type": "object"
                            }
                          ]
                        },
                        "type": "array"
                      },
                      "created_on": {
                        "description": "The timestamp of when the Page Rule was created.",
                        "example": "2014-01-01T05:20:00.12345Z",
                        "format": "date-time",
                        "readOnly": true,
                        "type": "string"
                      },
                      "id": {
                        "description": "Identifier",
                        "example": "023e105f4ecef8ad9ca31a8372d0c353",
                        "maxLength": 32,
                        "readOnly": true,
                        "type": "string"
                      },
                      "modified_on": {
                        "description": "The timestamp of when the Page Rule was last modified.",
                        "example": "2014-01-01T05:20:00.12345Z",
                        "format": "date-time",
                        "readOnly": true,
                        "type": "string"
                      },
                      "priority": {
                        "default": 1,
                        "description": "The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to take precedence (rule B: `/images/special/*`), specify a higher priority for rule B so it overrides rule A.",
                        "type": "integer"
                      },
                      "status": {
                        "default": "disabled",
                        "description": "The status of the Page Rule.",
                        "enum": [
                          "active",
                          "disabled"
                        ],
                        "example": "active",
                        "type": "string"
                      },
                      "targets": {
                        "description": "The rule targets to evaluate on each request.",
                        "example": [
                          {
                            "constraint": {
                              "operator": "matches",
                              "value": "*example.com/images/*"
                            },
                            "target": "url"
                          }
                        ],
                        "items": {
                          "description": "A request condition target.",
                          "oneOf": [
                            {
                              "description": "URL target.",
                              "properties": {
                                "constraint": {
                                  "allOf": [
                                    {
                                      "description": "String constraint.",
                                      "properties": {
                                        "operator": {
                                          "default": "contains",
                                          "description": "The matches operator can use asterisks and pipes as wildcard and 'or' operators.",
                                          "enum": [
                                            "matches",
                                            "contains",
                                            "equals",
                                            "not_equal",
                                            "not_contain"
                                          ]
                                        },
                                        "value": {
                                          "description": "The value to apply the operator to.",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "operator",
                                        "value"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "properties": {
                                        "value": {
                                          "description": "The URL pattern to match against the current request. The pattern may contain up to four asterisks ('*') as placeholders.",
                                          "example": "*example.com/images/*",
                                          "pattern": "^(https?://)?(([-a-zA-Z0-9*]*\\.)+[-a-zA-Z0-9]{2,20})(:(8080|8443|443|80))?(/[\\S]+)?$",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  ],
                                  "description": "The constraint of a target.",
                                  "type": "object"
                                },
                                "target": {
                                  "description": "A target based on the URL of the request.",
                                  "enum": [
                                    "url"
                                  ],
                                  "example": "url"
                                }
                              },
                              "type": "object"
                            }
                          ],
                          "required": [
                            "target",
                            "constraint"
                          ]
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "id",
                      "targets",
                      "actions",
                      "priority",
                      "status",
                      "modified_on",
                      "created_on"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            }
          ]
        }
      }
    },
    "description": "List Page Rules response"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "properties": {
                    "errors": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "messages": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "items": {},
                          "type": "array"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "success": {
                      "description": "Whether the API call was successful",
                      "enum": [
                        true
                      ],
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "errors",
                    "messages",
                    "result"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "items": {
                        "properties": {
                          "actions": {
                            "description": "The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both.",
                            "example": [
                              {
                                "id": "browser_check",
                                "value": "on"
                              }
                            ],
                            "items": {
                              "oneOf": [
                                {
                                  "properties": {
                                    "modified_on": {
                                      "description": "The timestamp of when the override was last modified.",
                                      "example": "2014-01-01T05:20:00.12345Z",
                                      "format": "date-time",
                                      "readOnly": true,
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "The type of route.",
                                      "enum": [
                                        "forward_url"
                                      ],
                                      "example": "forward_url"
                                    },
                                    "value": {
                                      "properties": {
                                        "type": {
                                          "description": "The response type for the URL redirect.",
                                          "enum": [
                                            "temporary",
                                            "permanent"
                                          ],
                                          "example": "temporary"
                                        },
                                        "url": {
                                          "description": "The URL to redirect the request to.\nNotes: ${num} refers to the position of '*' in the constraint value.",
                                          "example": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3",
                                          "type": "string"
                                        }
                                      }
                                    }
                                  },
                                  "type": "object"
                                }
                              ]
                            },
                            "type": "array"
                          },
                          "created_on": {
                            "description": "The timestamp of when the Page Rule was created.",
                            "example": "2014-01-01T05:20:00.12345Z",
                            "format": "date-time",
                            "readOnly": true,
                            "type": "string"
                          },
                          "id": {
                            "description": "Identifier",
                            "example": "023e105f4ecef8ad9ca31a8372d0c353",
                            "maxLength": 32,
                            "readOnly": true,
                            "type": "string"
                          },
                          "modified_on": {
                            "description": "The timestamp of when the Page Rule was last modified.",
                            "example": "2014-01-01T05:20:00.12345Z",
                            "format": "date-time",
                            "readOnly": true,
                            "type": "string"
                          },
                          "priority": {
                            "default": 1,
                            "description": "The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to take precedence (rule B: `/images/special/*`), specify a higher priority for rule B so it overrides rule A.",
                            "type": "integer"
                          },
                          "status": {
                            "default": "disabled",
                            "description": "The status of the Page Rule.",
                            "enum": [
                              "active",
                              "disabled"
                            ],
                            "example": "active",
                            "type": "string"
                          },
                          "targets": {
                            "description": "The rule targets to evaluate on each request.",
                            "example": [
                              {
                                "constraint": {
                                  "operator": "matches",
                                  "value": "*example.com/images/*"
                                },
                                "target": "url"
                              }
                            ],
                            "items": {
                              "description": "A request condition target.",
                              "oneOf": [
                                {
                                  "description": "URL target.",
                                  "properties": {
                                    "constraint": {
                                      "allOf": [
                                        {
                                          "description": "String constraint.",
                                          "properties": {
                                            "operator": {
                                              "default": "contains",
                                              "description": "The matches operator can use asterisks and pipes as wildcard and 'or' operators.",
                                              "enum": [
                                                "matches",
                                                "contains",
                                                "equals",
                                                "not_equal",
                                                "not_contain"
                                              ]
                                            },
                                            "value": {
                                              "description": "The value to apply the operator to.",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "operator",
                                            "value"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "value": {
                                              "description": "The URL pattern to match against the current request. The pattern may contain up to four asterisks ('*') as placeholders.",
                                              "example": "*example.com/images/*",
                                              "pattern": "^(https?://)?(([-a-zA-Z0-9*]*\\.)+[-a-zA-Z0-9]{2,20})(:(8080|8443|443|80))?(/[\\S]+)?$",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      ],
                                      "description": "The constraint of a target.",
                                      "type": "object"
                                    },
                                    "target": {
                                      "description": "A target based on the URL of the request.",
                                      "enum": [
                                        "url"
                                      ],
                                      "example": "url"
                                    }
                                  },
                                  "type": "object"
                                }
                              ],
                              "required": [
                                "target",
                                "constraint"
                              ]
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "id",
                          "targets",
                          "actions",
                          "priority",
                          "status",
                          "modified_on",
                          "created_on"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  }
                }
              ]
            },
            {
              "properties": {
                "errors": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": [
                    {
                      "code": 7003,
                      "message": "No route for the URI"
                    }
                  ],
                  "minLength": 1
                },
                "messages": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": []
                },
                "result": {
                  "enum": [
                    null
                  ],
                  "nullable": true,
                  "type": "object"
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "enum": [
                    false
                  ],
                  "example": false,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            }
          ]
        }
      }
    },
    "description": "List Page Rules response failure"
  }
}

Debug "security"

[
  {
    "api_token": []
  },
  {
    "api_email": [],
    "api_key": []
  }
]