Cloudflare · Arazzo Workflow

Cloudflare Rotate Worker Route

Version 1.0.0

Create a Worker route, update its pattern, then delete it.

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

rotate-worker-route
Create, update, and delete a Worker route in a single lifecycle.
Provisions a Worker route, updates its URL pattern, and then deletes it.
3 steps inputs: newRoutePattern, routePattern, script, zoneId outputs: routeId
1
createRoute
Create a route mapping the initial pattern to the Worker script.
2
updateRoute
Update the route to use the replacement URL pattern.
3
deleteRoute
Delete the route now that the update is complete.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Cloudflare Rotate Worker Route
  summary: Create a Worker route, update its pattern, then delete it.
  description: >-
    A full lifecycle for a single Worker route binding. The workflow creates a
    route mapping a URL pattern to a Worker script, updates the route to a new
    pattern, and deletes it once the change is applied, threading the route
    identifier from step to step. Each step inlines its request and asserts the
    documented HTTP 200 status, and the Cloudflare {success, result} envelope
    flag where the response carries one.
  version: 1.0.0
sourceDescriptions:
- name: routesApi
  url: ../openapi/cloudflare-routes-api-openapi.yml
  type: openapi
workflows:
- workflowId: rotate-worker-route
  summary: Create, update, and delete a Worker route in a single lifecycle.
  description: >-
    Provisions a Worker route, updates its URL pattern, and then deletes it.
  inputs:
    type: object
    required:
    - zoneId
    - routePattern
    - script
    - newRoutePattern
    properties:
      zoneId:
        type: string
        description: The unique identifier of the zone.
      routePattern:
        type: string
        description: The initial URL pattern that should invoke the Worker.
      script:
        type: string
        description: The name of the Worker script the route maps to.
      newRoutePattern:
        type: string
        description: The replacement URL pattern applied during the update.
  steps:
  - stepId: createRoute
    description: Create a route mapping the initial pattern to the Worker script.
    operationId: createRoute
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    requestBody:
      contentType: application/json
      payload:
        pattern: $inputs.routePattern
        script: $inputs.script
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      routeId: $response.body#/result/id
  - stepId: updateRoute
    description: Update the route to use the replacement URL pattern.
    operationId: updateRoute
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    - name: route_id
      in: path
      value: $steps.createRoute.outputs.routeId
    requestBody:
      contentType: application/json
      payload:
        pattern: $inputs.newRoutePattern
        script: $inputs.script
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      routeId: $response.body#/result/id
  - stepId: deleteRoute
    description: Delete the route now that the update is complete.
    operationId: deleteRoute
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    - name: route_id
      in: path
      value: $steps.createRoute.outputs.routeId
    successCriteria:
    - condition: $statusCode == 200
  outputs:
    routeId: $steps.createRoute.outputs.routeId

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-rotate-worker-route-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.