Fastly · Arazzo Workflow

Fastly Add a Header Rule

Version 1.0.0

Clone the active version, add a header manipulation rule, then activate the new version.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CDNEdge CloudEdge ComputeWebAssemblySecurityArtificial IntelligenceObservabilityAsyncAPIStreamingWebhookLoggingArazzoWorkflows

Provider

fastly

Workflows

add-header-rule
Clone a version, add a header rule, and activate the clone.
Clones the supplied version, creates a header manipulation rule on the cloned version, and activates the clone.
3 steps inputs: action, apiToken, dst, headerName, serviceId, src, type, versionId outputs: active, clonedVersion, headerName
1
cloneVersion
Clone the supplied version into a new editable draft version.
2
createHeader
Create the header manipulation rule on the cloned version.
3
activateVersion
Activate the cloned version so the header rule takes effect.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Fastly Add a Header Rule
  summary: Clone the active version, add a header manipulation rule, then activate the new version.
  description: >-
    Header objects let Fastly add, modify, or remove HTTP headers as requests
    and responses flow through the edge. This workflow clones the live version
    into a draft, creates a header rule on the clone, and activates the new
    version so the rule takes effect. Every step spells out its request inline so
    the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: headerApi
  url: ../openapi/fastly-header-api-openapi.yml
  type: openapi
- name: serviceVersionApi
  url: ../openapi/fastly-service-version-api-openapi.yml
  type: openapi
workflows:
- workflowId: add-header-rule
  summary: Clone a version, add a header rule, and activate the clone.
  description: >-
    Clones the supplied version, creates a header manipulation rule on the
    cloned version, and activates the clone.
  inputs:
    type: object
    required:
    - apiToken
    - serviceId
    - versionId
    - headerName
    - action
    - type
    - dst
    properties:
      apiToken:
        type: string
        description: The Fastly API token used to authenticate requests.
      serviceId:
        type: string
        description: The alphanumeric identifier of the service.
      versionId:
        type: integer
        description: The version number to clone.
      headerName:
        type: string
        description: A name for the header rule.
      action:
        type: string
        description: The header action to perform.
        enum:
        - set
        - append
        - delete
        - regex
        - regex_repeat
      type:
        type: string
        description: The processing phase the rule applies to.
        enum:
        - request
        - fetch
        - cache
        - response
      dst:
        type: string
        description: The name of the header to affect (the destination).
      src:
        type: string
        description: The source value or variable for the header.
  steps:
  - stepId: cloneVersion
    description: Clone the supplied version into a new editable draft version.
    operationId: cloneServiceVersion
    parameters:
    - name: Fastly-Key
      in: header
      value: $inputs.apiToken
    - name: service_id
      in: path
      value: $inputs.serviceId
    - name: version_id
      in: path
      value: $inputs.versionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      clonedVersion: $response.body#/number
  - stepId: createHeader
    description: Create the header manipulation rule on the cloned version.
    operationId: createHeader
    parameters:
    - name: Fastly-Key
      in: header
      value: $inputs.apiToken
    - name: service_id
      in: path
      value: $inputs.serviceId
    - name: version_id
      in: path
      value: $steps.cloneVersion.outputs.clonedVersion
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        name: $inputs.headerName
        action: $inputs.action
        type: $inputs.type
        dst: $inputs.dst
        src: $inputs.src
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      headerName: $response.body#/name
  - stepId: activateVersion
    description: Activate the cloned version so the header rule takes effect.
    operationId: activateServiceVersion
    parameters:
    - name: Fastly-Key
      in: header
      value: $inputs.apiToken
    - name: service_id
      in: path
      value: $inputs.serviceId
    - name: version_id
      in: path
      value: $steps.cloneVersion.outputs.clonedVersion
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      active: $response.body#/active
  outputs:
    clonedVersion: $steps.cloneVersion.outputs.clonedVersion
    headerName: $steps.createHeader.outputs.headerName
    active: $steps.activateVersion.outputs.active

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/fastly-add-header-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.