Azure API Management REST API — PolicyFragment

Azure API Management REST API — PolicyFragment. 5 operations. Lead operation: Microsoft Azure API Management WorkspacePolicyFragment_ListByService. Self-contained Naftiko capability covering one Microsoft Azure Api Management business surface.

Run with Naftiko Microsoft Azure Api ManagementPolicyFragment

What You Can Do

GET
Workspacepolicyfragmentlistbyservice — Microsoft Azure API Management WorkspacePolicyFragment_ListByService
/v1/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/microsoft-apimanagement/service/{servicename}/workspaces/{workspaceid}/policyfragments
HEAD
Workspacepolicyfragmentgetentitytag — Microsoft Azure API Management WorkspacePolicyFragment_GetEntityTag
/v1/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/microsoft-apimanagement/service/{servicename}/workspaces/{workspaceid}/policyfragments/{id}
GET
Workspacepolicyfragmentget — Microsoft Azure API Management WorkspacePolicyFragment_Get
/v1/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/microsoft-apimanagement/service/{servicename}/workspaces/{workspaceid}/policyfragments/{id}
PUT
Workspacepolicyfragmentcreateorupdate — Microsoft Azure API Management WorkspacePolicyFragment_CreateOrUpdate
/v1/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/microsoft-apimanagement/service/{servicename}/workspaces/{workspaceid}/policyfragments/{id}
DELETE
Workspacepolicyfragmentdelete — Microsoft Azure API Management WorkspacePolicyFragment_Delete
/v1/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/microsoft-apimanagement/service/{servicename}/workspaces/{workspaceid}/policyfragments/{id}

MCP Tools

microsoft-azure-api-management-workspacepolicyfragment

Microsoft Azure API Management WorkspacePolicyFragment_ListByService

read-only idempotent
microsoft-azure-api-management-workspacepolicyfragment-2

Microsoft Azure API Management WorkspacePolicyFragment_GetEntityTag

microsoft-azure-api-management-workspacepolicyfragment-3

Microsoft Azure API Management WorkspacePolicyFragment_Get

read-only idempotent
microsoft-azure-api-management-workspacepolicyfragment-4

Microsoft Azure API Management WorkspacePolicyFragment_CreateOrUpdate

idempotent
microsoft-azure-api-management-workspacepolicyfragment-5

Microsoft Azure API Management WorkspacePolicyFragment_Delete

idempotent

Capability Spec

rest-policyfragment.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Azure API Management REST API — PolicyFragment
  description: 'Azure API Management REST API — PolicyFragment. 5 operations. Lead operation: Microsoft Azure API Management
    WorkspacePolicyFragment_ListByService. Self-contained Naftiko capability covering one Microsoft Azure Api Management business
    surface.'
  tags:
  - Microsoft Azure Api Management
  - PolicyFragment
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MICROSOFT_AZURE_API_MANAGEMENT_API_KEY: MICROSOFT_AZURE_API_MANAGEMENT_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-policyfragment
    baseUri: https://management.azure.com
    description: Azure API Management REST API — PolicyFragment business capability. Self-contained, no shared references.
    resources:
    - name: subscriptions-subscriptionId-resourceGroups-resourceGroupName-providers-Microsof
      path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments
      operations:
      - name: workspacepolicyfragmentlistbyservice
        method: GET
        description: Microsoft Azure API Management WorkspacePolicyFragment_ListByService
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: subscriptions-subscriptionId-resourceGroups-resourceGroupName-providers-Microsof
      path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}
      operations:
      - name: workspacepolicyfragmentgetentitytag
        method: HEAD
        description: Microsoft Azure API Management WorkspacePolicyFragment_GetEntityTag
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: workspacepolicyfragmentget
        method: GET
        description: Microsoft Azure API Management WorkspacePolicyFragment_Get
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: workspacepolicyfragmentcreateorupdate
        method: PUT
        description: Microsoft Azure API Management WorkspacePolicyFragment_CreateOrUpdate
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: workspacepolicyfragmentdelete
        method: DELETE
        description: Microsoft Azure API Management WorkspacePolicyFragment_Delete
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.MICROSOFT_AZURE_API_MANAGEMENT_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-policyfragment-rest
    port: 8080
    description: REST adapter for Azure API Management REST API — PolicyFragment. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/microsoft-apimanagement/service/{servicename}/workspaces/{workspaceid}/policyfragments
      name: subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsof
      description: REST surface for subscriptions-subscriptionId-resourceGroups-resourceGroupName-providers-Microsof.
      operations:
      - method: GET
        name: workspacepolicyfragmentlistbyservice
        description: Microsoft Azure API Management WorkspacePolicyFragment_ListByService
        call: rest-policyfragment.workspacepolicyfragmentlistbyservice
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/microsoft-apimanagement/service/{servicename}/workspaces/{workspaceid}/policyfragments/{id}
      name: subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsof
      description: REST surface for subscriptions-subscriptionId-resourceGroups-resourceGroupName-providers-Microsof.
      operations:
      - method: HEAD
        name: workspacepolicyfragmentgetentitytag
        description: Microsoft Azure API Management WorkspacePolicyFragment_GetEntityTag
        call: rest-policyfragment.workspacepolicyfragmentgetentitytag
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: workspacepolicyfragmentget
        description: Microsoft Azure API Management WorkspacePolicyFragment_Get
        call: rest-policyfragment.workspacepolicyfragmentget
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: workspacepolicyfragmentcreateorupdate
        description: Microsoft Azure API Management WorkspacePolicyFragment_CreateOrUpdate
        call: rest-policyfragment.workspacepolicyfragmentcreateorupdate
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: workspacepolicyfragmentdelete
        description: Microsoft Azure API Management WorkspacePolicyFragment_Delete
        call: rest-policyfragment.workspacepolicyfragmentdelete
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-policyfragment-mcp
    port: 9090
    transport: http
    description: MCP adapter for Azure API Management REST API — PolicyFragment. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: microsoft-azure-api-management-workspacepolicyfragment
      description: Microsoft Azure API Management WorkspacePolicyFragment_ListByService
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-policyfragment.workspacepolicyfragmentlistbyservice
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-azure-api-management-workspacepolicyfragment-2
      description: Microsoft Azure API Management WorkspacePolicyFragment_GetEntityTag
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-policyfragment.workspacepolicyfragmentgetentitytag
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-azure-api-management-workspacepolicyfragment-3
      description: Microsoft Azure API Management WorkspacePolicyFragment_Get
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-policyfragment.workspacepolicyfragmentget
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-azure-api-management-workspacepolicyfragment-4
      description: Microsoft Azure API Management WorkspacePolicyFragment_CreateOrUpdate
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-policyfragment.workspacepolicyfragmentcreateorupdate
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-azure-api-management-workspacepolicyfragment-5
      description: Microsoft Azure API Management WorkspacePolicyFragment_Delete
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-policyfragment.workspacepolicyfragmentdelete
      outputParameters:
      - type: object
        mapping: $.