Microsoft Azure Functions · Arazzo Workflow

Preview and Swap a Slot Into Production

Version 1.0.0

Diff a staging slot against a target, swap it in, and confirm the app is running.

1 workflow 1 source API 1 provider
View Spec View on GitHub AzureCloudComputeEvent-DrivenMicrosoftServerlessArazzoWorkflows

Provider

microsoft-azure-functions

Workflows

swap-slot-to-production
Preview slot differences, swap the slot, and confirm the app is running.
Computes the differences between the source and target slots, swaps the source slot into the target, and polls the function app until it reports Running.
3 steps inputs: apiVersion, name, preserveVnet, resourceGroupName, slot, subscriptionId, targetSlot outputs: appState, differences, swapStatus
1
previewDifferences
Compute the configuration differences between the source slot and the target slot so the caller can review what the swap will change.
2
swapSlot
Swap the source slot into the target slot. ARM returns 202 when the swap is accepted as a long-running operation.
3
pollAppState
Read the function app and confirm it reports a Running state after the swap. Use this step in a retry loop until the swap operation completes.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Preview and Swap a Slot Into Production
  summary: Diff a staging slot against a target, swap it in, and confirm the app is running.
  description: >-
    The blue-green release flow for Azure Functions. The workflow first computes
    the configuration differences between the source slot and the target slot so
    the caller can review what will change, then performs the slot swap, accepting
    the long-running 202 response, and finally polls the function app until it
    reports a Running state after the swap. Every step spells out its ARM request
    inline — including the required api-version query parameter and the
    CsmSlotEntity swap envelope — so the flow can be read and executed without
    opening the underlying OpenAPI description. All requests are authorized with
    the azure_auth OAuth2 bearer token carried by the Azure Resource Manager
    endpoint.
  version: 1.0.0
sourceDescriptions:
- name: webappsApi
  url: ../openapi/microsoft-azure-functions-webapps-api-openapi.yml
  type: openapi
workflows:
- workflowId: swap-slot-to-production
  summary: Preview slot differences, swap the slot, and confirm the app is running.
  description: >-
    Computes the differences between the source and target slots, swaps the
    source slot into the target, and polls the function app until it reports
    Running.
  inputs:
    type: object
    required:
    - subscriptionId
    - resourceGroupName
    - name
    - slot
    - targetSlot
    properties:
      subscriptionId:
        type: string
        description: The Azure subscription identifier (GUID).
      resourceGroupName:
        type: string
        description: The resource group that contains the function app.
      name:
        type: string
        description: The name of the function app.
      slot:
        type: string
        description: The source slot to swap from (e.g. "staging").
      targetSlot:
        type: string
        description: The target slot to swap into (e.g. "production").
      preserveVnet:
        type: boolean
        description: Whether to preserve the VNet configuration through the swap.
        default: true
      apiVersion:
        type: string
        description: The ARM api-version to use for all requests.
        default: "2024-11-01"
  steps:
  - stepId: previewDifferences
    description: >-
      Compute the configuration differences between the source slot and the
      target slot so the caller can review what the swap will change.
    operationId: WebApps_ListSlotDifferencesSlot
    parameters:
    - name: api-version
      in: query
      value: $inputs.apiVersion
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: name
      in: path
      value: $inputs.name
    - name: slot
      in: path
      value: $inputs.slot
    requestBody:
      contentType: application/json
      payload:
        targetSlot: $inputs.targetSlot
        preserveVnet: $inputs.preserveVnet
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      differences: $response.body#/value
    onSuccess:
    - name: swap
      type: goto
      stepId: swapSlot
  - stepId: swapSlot
    description: >-
      Swap the source slot into the target slot. ARM returns 202 when the swap is
      accepted as a long-running operation.
    operationId: WebApps_SwapSlotSlot
    parameters:
    - name: api-version
      in: query
      value: $inputs.apiVersion
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: name
      in: path
      value: $inputs.name
    - name: slot
      in: path
      value: $inputs.slot
    requestBody:
      contentType: application/json
      payload:
        targetSlot: $inputs.targetSlot
        preserveVnet: $inputs.preserveVnet
    successCriteria:
    - condition: $statusCode == 202
    outputs:
      swapStatus: $statusCode
    onSuccess:
    - name: confirm
      type: goto
      stepId: pollAppState
  - stepId: pollAppState
    description: >-
      Read the function app and confirm it reports a Running state after the
      swap. Use this step in a retry loop until the swap operation completes.
    operationId: WebApps_Get
    parameters:
    - name: api-version
      in: query
      value: $inputs.apiVersion
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: name
      in: path
      value: $inputs.name
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.properties.state == "Running"
      type: jsonpath
    outputs:
      appState: $response.body#/properties/state
  outputs:
    differences: $steps.previewDifferences.outputs.differences
    swapStatus: $steps.swapSlot.outputs.swapStatus
    appState: $steps.pollAppState.outputs.appState

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/microsoft-azure-functions-swap-slot-to-production-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.