Cloudflare · Arazzo Workflow

Cloudflare Replace Page Rule

Version 1.0.0

Create a page rule, fully replace its configuration, then read it back.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI GatewayAPI GatewayArtificial IntelligenceCDNCloudContainersDDoS ProtectionDNSEdgeEdge ComputingObject StoragePlatformReal-Time CommunicationSecurityServerlessWeb PerformanceArazzoWorkflows

Provider

cloudflare

Workflows

replace-page-rule
Create a page rule, replace its full configuration, and read it back.
Creates a page rule, fully replaces its targets and actions with a new configuration, and reads the rule back to confirm the replacement.
3 steps inputs: actionId, actionValue, newActionValue, newUrlPattern, urlPattern, zoneId outputs: ruleId, ruleStatus
1
createRule
Create a page rule with its initial target and action.
2
replaceRule
Replace the page rule so its configuration exactly matches the new target and action.
3
getRule
Read the page rule back to confirm the replacement.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Cloudflare Replace Page Rule
  summary: Create a page rule, fully replace its configuration, then read it back.
  description: >-
    Where editing a page rule patches selected fields, replacing it overwrites
    the entire configuration. The workflow creates a page rule, replaces it so
    its configuration exactly matches a new target and action set, and reads it
    back to confirm the replacement. Each step inlines its request and asserts
    both the documented HTTP 200 status and the Cloudflare {success, result}
    envelope flag.
  version: 1.0.0
sourceDescriptions:
- name: zonesApi
  url: ../openapi/cloudflare-zones-api-openapi.yml
  type: openapi
workflows:
- workflowId: replace-page-rule
  summary: Create a page rule, replace its full configuration, and read it back.
  description: >-
    Creates a page rule, fully replaces its targets and actions with a new
    configuration, and reads the rule back to confirm the replacement.
  inputs:
    type: object
    required:
    - zoneId
    - urlPattern
    - actionId
    - actionValue
    - newUrlPattern
    - newActionValue
    properties:
      zoneId:
        type: string
        description: The unique identifier of the zone.
      urlPattern:
        type: string
        description: The initial URL match pattern.
      actionId:
        type: string
        description: The page rule action setting id (e.g. cache_level).
      actionValue:
        type: string
        description: The initial value applied by the action.
      newUrlPattern:
        type: string
        description: The replacement URL match pattern.
      newActionValue:
        type: string
        description: The replacement value applied by the action.
  steps:
  - stepId: createRule
    description: Create a page rule with its initial target and action.
    operationId: page-rules-create-a-page-rule
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    requestBody:
      contentType: application/json
      payload:
        targets:
        - target: url
          constraint:
            operator: matches
            value: $inputs.urlPattern
        actions:
        - id: $inputs.actionId
          value: $inputs.actionValue
        status: active
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      ruleId: $response.body#/result/id
  - stepId: replaceRule
    description: >-
      Replace the page rule so its configuration exactly matches the new target
      and action.
    operationId: page-rules-update-a-page-rule
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    - name: pagerule_id
      in: path
      value: $steps.createRule.outputs.ruleId
    requestBody:
      contentType: application/json
      payload:
        targets:
        - target: url
          constraint:
            operator: matches
            value: $inputs.newUrlPattern
        actions:
        - id: $inputs.actionId
          value: $inputs.newActionValue
        status: active
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      ruleId: $response.body#/result/id
  - stepId: getRule
    description: Read the page rule back to confirm the replacement.
    operationId: page-rules-get-a-page-rule
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    - name: pagerule_id
      in: path
      value: $steps.createRule.outputs.ruleId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      ruleStatus: $response.body#/result/status
  outputs:
    ruleId: $steps.createRule.outputs.ruleId
    ruleStatus: $steps.getRule.outputs.ruleStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/cloudflare-replace-page-rule-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.