Microsoft Azure API Management · Arazzo Workflow

Azure API Management Upsert API

Version 1.0.0

Find an API by identifier and update it if present, otherwise create it.

1 workflow 1 source API 1 provider
View Spec View on GitHub A2AAI GatewayAPI CenterAPI GatewayAPI ManagementEnterpriseMCPMicrosoft AzureArazzoWorkflows

Provider

microsoft-azure-api-management

Workflows

upsert-api
Upsert an API definition into an API Management service.
Lists existing APIs, checks for a matching identifier, and either updates the matched API description or creates a new API with the supplied display name, path, and backend service URL.
3 steps inputs: apiId, description, displayName, path, resourceGroupName, serviceName, serviceUrl, subscriptionId outputs: apiResourceId, updatedApiResourceId
1
listApis
List the APIs already registered on the service so the flow can detect an existing definition for the target identifier.
2
updateApi
Patch the existing API with an updated description, leaving other properties intact.
3
createApi
Create a new API with the supplied display name, path, and backend service URL when no matching API was found.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Azure API Management Upsert API
  summary: Find an API by identifier and update it if present, otherwise create it.
  description: >-
    A common API Management onboarding pattern. The workflow lists the APIs on
    the service, branches on whether the target API identifier already exists,
    and then either patches the existing API definition or creates a brand new
    one. 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: apiApi
  url: ../openapi/microsoft-azure-api-management-api-api-openapi.yml
  type: openapi
workflows:
- workflowId: upsert-api
  summary: Upsert an API definition into an API Management service.
  description: >-
    Lists existing APIs, checks for a matching identifier, and either updates
    the matched API description or creates a new API with the supplied display
    name, path, and backend service URL.
  inputs:
    type: object
    required:
    - subscriptionId
    - resourceGroupName
    - serviceName
    - apiId
    - displayName
    - path
    - serviceUrl
    properties:
      subscriptionId:
        type: string
        description: The Azure subscription identifier.
      resourceGroupName:
        type: string
        description: The resource group containing the service.
      serviceName:
        type: string
        description: The API Management service name.
      apiId:
        type: string
        description: The API identifier to upsert.
      displayName:
        type: string
        description: The human-readable API display name.
      description:
        type: string
        description: The API description.
      path:
        type: string
        description: The API URL suffix/path on the gateway.
      serviceUrl:
        type: string
        description: The backend service URL the API proxies to.
  steps:
  - stepId: listApis
    description: >-
      List the APIs already registered on the service so the flow can detect an
      existing definition for the target identifier.
    operationId: Api_ListByService
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      apiCount: $response.body#/count
    onSuccess:
    - name: apiExists
      type: goto
      stepId: updateApi
      criteria:
      - context: $response.body
        condition: $.value[?(@.name == '$inputs.apiId')]
        type: jsonpath
    - name: apiMissing
      type: goto
      stepId: createApi
      criteria:
      - context: $response.body
        condition: $.count == 0
        type: jsonpath
  - stepId: updateApi
    description: >-
      Patch the existing API with an updated description, leaving other
      properties intact.
    operationId: Api_Update
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: apiId
      in: path
      value: $inputs.apiId
    requestBody:
      contentType: application/json
      payload:
        properties:
          description: $inputs.description
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      apiId: $response.body#/name
      apiResourceId: $response.body#/id
    onSuccess:
    - name: done
      type: end
  - stepId: createApi
    description: >-
      Create a new API with the supplied display name, path, and backend
      service URL when no matching API was found.
    operationId: Api_CreateOrUpdate
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: apiId
      in: path
      value: $inputs.apiId
    requestBody:
      contentType: application/json
      payload:
        properties:
          displayName: $inputs.displayName
          description: $inputs.description
          serviceUrl: $inputs.serviceUrl
          path: $inputs.path
          protocols:
          - https
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      apiId: $response.body#/name
      apiResourceId: $response.body#/id
  outputs:
    apiResourceId: $steps.createApi.outputs.apiResourceId
    updatedApiResourceId: $steps.updateApi.outputs.apiResourceId

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-api-management-upsert-api-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.