arazzo: 1.0.1 info: title: Cloudflare Create Page Rule summary: Create a page rule for a URL pattern and read it back to confirm it. description: >- Page rules apply per-URL behavior overrides such as forwarding URLs, cache levels, or SSL settings. The workflow creates a page rule from a target URL pattern and a set of actions, then reads the rule back by id to confirm it was stored with the expected status and priority. 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: cloudflareZonesApi url: ../openapi/cloudflare-zones--openapi-original.yml type: openapi workflows: - workflowId: create-page-rule summary: Create a page rule then fetch it by id to verify it persisted. description: >- Creates a page rule that matches a URL pattern and applies the supplied actions, then retrieves the rule by its identifier to confirm its stored configuration. inputs: type: object required: - zoneId - urlPattern - actionId - actionValue properties: zoneId: type: string description: The unique identifier of the zone. urlPattern: type: string description: The URL match pattern (e.g. *example.com/images/*). actionId: type: string description: The page rule action setting id (e.g. cache_level, forwarding_url). actionValue: type: string description: The value applied by the action (e.g. cache_everything). status: type: string description: Whether the page rule is active or disabled (active or disabled). steps: - stepId: createRule description: >- Create a page rule that matches the supplied URL pattern and applies the supplied 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: $inputs.status successCriteria: - condition: $statusCode == 200 - context: $response.body condition: $.success == true type: jsonpath outputs: ruleId: $response.body#/result/id - stepId: getRule description: Fetch the page rule by its identifier to confirm it persisted. 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: ruleId: $response.body#/result/id ruleStatus: $response.body#/result/status priority: $response.body#/result/priority outputs: ruleId: $steps.getRule.outputs.ruleId ruleStatus: $steps.getRule.outputs.ruleStatus priority: $steps.getRule.outputs.priority