arazzo: 1.0.1
info:
title: Azure API Management Tag and Label an API
summary: Create a tag, assign it to an API, then list the API's tags.
description: >-
Organizes APIs with a shared tag for discovery and grouping. The workflow
creates or updates the tag at the service level, assigns it to the target
API, then lists the API's tags to confirm the assignment. 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: apitagApi
url: ../openapi/_superseded/microsoft-azure-api-management-apitag-api-openapi.yml
type: openapi
- name: tagApi
url: ../openapi/_superseded/microsoft-azure-api-management-tag-api-openapi.yml
type: openapi
workflows:
- workflowId: tag-api
summary: Create a tag and assign it to an API.
description: >-
Creates or updates a service tag, assigns it to the API, then lists the
API's tags to confirm.
inputs:
type: object
required:
- subscriptionId
- resourceGroupName
- serviceName
- tagId
- displayName
- apiId
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.
tagId:
type: string
description: The tag identifier to create.
displayName:
type: string
description: The tag display name.
apiId:
type: string
description: The API identifier to assign the tag to.
steps:
- stepId: createTag
description: >-
Create or update the tag at the service level.
operationId: Tag_CreateOrUpdate
parameters:
- name: subscriptionId
in: path
value: $inputs.subscriptionId
- name: resourceGroupName
in: path
value: $inputs.resourceGroupName
- name: serviceName
in: path
value: $inputs.serviceName
- name: tagId
in: path
value: $inputs.tagId
requestBody:
contentType: application/json
payload:
properties:
displayName: $inputs.displayName
successCriteria:
- condition: $statusCode == 200
outputs:
tagResourceId: $response.body#/id
- stepId: assignTag
description: >-
Assign the tag to the target API.
operationId: Tag_AssignToApi
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
- name: tagId
in: path
value: $inputs.tagId
successCriteria:
- condition: $statusCode == 200
outputs:
assignmentResourceId: $response.body#/id
- stepId: listApiTags
description: >-
List the API's tags to confirm the assignment is present.
operationId: Tag_ListByApi
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
successCriteria:
- condition: $statusCode == 200
outputs:
tagCount: $response.body#/count
outputs:
tagResourceId: $steps.createTag.outputs.tagResourceId
tagCount: $steps.listApiTags.outputs.tagCount
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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.