Every API 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 apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
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 API
curl "https://apis.io/api/v1/apis/microsoft-azure-api-management:microsoft-azure-api-management-policyfragment-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Microsoft Azure Api Management Policy Fragment API
version: '2024-05-01'
description: 'Operations tagged PolicyFragment across 2 of this provider''s published API definitions: microsoft-azure-api-management-apimanagement-resource-manager-Microsoft.ApiManagement-ApiManagement-stable-2024-05-01-apimpolicyfragments.json, microsoft-azure-api-management-apimanagement-resource-manager-Microsoft.ApiManagement-ApiManagement-stable-2024-05-01-apimworkspaces.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://management.azure.com
security:
- azure_auth:
- user_impersonation
tags:
- name: PolicyFragment
paths:
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments
: get:
tags:
- PolicyFragment
operationId: PolicyFragment_ListByService
description: Gets all policy fragments.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- name: $filter
in: query
required: false
description: '| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>'
schema:
type: string
- name: $orderby
in: query
required: false
description: OData order by query option.
schema:
type: string
- $ref: '#/components/parameters/TopQueryParameter'
- $ref: '#/components/parameters/SkipQueryParameter'
responses:
'200':
description: Successfully returned an array of policy fragments.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentCollection'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-ms-pageable:
nextLinkName: nextLink
summary: Policy fragment list by service
x-summary-source: derived
servers:
- url: https://management.azure.com
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}
: head:
tags:
- PolicyFragment
operationId: PolicyFragment_GetEntityTag
description: Gets the entity state (Etag) version of a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
responses:
'200':
description: The specified policy fragment exists and the current entity state version is present in the ETag header.
headers:
ETag:
description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
schema:
type: string
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Policy fragment get entity tag
x-summary-source: derived
get:
tags:
- PolicyFragment
operationId: PolicyFragment_Get
description: Gets a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/PolicyFragmentContentFormat'
responses:
'200':
description: Successfully returned a policy fragment.
headers:
ETag:
description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Policy fragment get
x-summary-source: derived
put:
tags:
- PolicyFragment
operationId: PolicyFragment_CreateOrUpdate
description: Creates or updates a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/IfMatchOptionalParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
responses:
'200':
description: The policy fragment was successfully updated.
headers:
ETag:
description: Current entity state version
schema:
type: string
location:
description: Location header contains the URL where the status of the long running operation can be checked
schema:
type: string
Azure-AsyncOperation:
description: Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
'201':
description: The policy fragment was successfully created.
headers:
ETag:
description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
schema:
type: string
location:
description: Location header contains the URL where the status of the long running operation can be checked
schema:
type: string
Azure-AsyncOperation:
description: Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-ms-long-running-operation: true
x-ms-long-running-operation-options:
final-state-via: location
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
description: The policy fragment contents to apply.
required: true
summary: Policy fragment create or update
x-summary-source: derived
delete:
tags:
- PolicyFragment
operationId: PolicyFragment_Delete
description: Deletes a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/IfMatchRequiredParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
responses:
'200':
description: The policy fragment was successfully removed.
'204':
description: The policy fragment successfully removed by previous request or does not exist.
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Policy fragment delete
x-summary-source: derived
servers:
- url: https://management.azure.com
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences
: post:
tags:
- PolicyFragment
operationId: PolicyFragment_ListReferences
description: Lists policy resources that reference the policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/TopQueryParameter'
- $ref: '#/components/parameters/SkipQueryParameter'
responses:
'200':
description: Successfully returned an array of references to policy resources that include the policy fragment in their definitions.
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceCollection'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Policy fragment list references
x-summary-source: derived
servers:
- url: https://management.azure.com
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments
: get:
tags:
- PolicyFragment
operationId: WorkspacePolicyFragment_ListByService
description: Gets all policy fragments defined within a workspace.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/WorkspaceIdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- name: $filter
in: query
required: false
description: '| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>'
schema:
type: string
- name: $orderby
in: query
required: false
description: OData order by query option.
schema:
type: string
- $ref: '#/components/parameters/TopQueryParameter'
- $ref: '#/components/parameters/SkipQueryParameter'
responses:
'200':
description: Successfully returned an array of policy fragments.
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentCollection'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-ms-pageable:
nextLinkName: nextLink
summary: Workspace policy fragment list by service
x-summary-source: derived
servers:
- url: https://management.azure.com
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}
: head:
tags:
- PolicyFragment
operationId: WorkspacePolicyFragment_GetEntityTag
description: Gets the entity state (Etag) version of a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/WorkspaceIdParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
responses:
'200':
description: The specified policy fragment exists and the current entity state version is present in the ETag header.
headers:
ETag:
description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
schema:
type: string
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Workspace policy fragment get entity tag
x-summary-source: derived
get:
tags:
- PolicyFragment
operationId: WorkspacePolicyFragment_Get
description: Gets a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/WorkspaceIdParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/PolicyFragmentContentFormat'
responses:
'200':
description: Successfully returned a policy fragment.
headers:
ETag:
description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Workspace policy fragment get
x-summary-source: derived
put:
tags:
- PolicyFragment
operationId: WorkspacePolicyFragment_CreateOrUpdate
description: Creates or updates a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/WorkspaceIdParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/IfMatchOptionalParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
responses:
'200':
description: The policy fragment was successfully updated.
headers:
ETag:
description: Current entity state version
schema:
type: string
location:
description: Location header contains the URL where the status of the long running operation can be checked
schema:
type: string
Azure-AsyncOperation:
description: Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
'201':
description: The policy fragment was successfully created.
headers:
ETag:
description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
schema:
type: string
location:
description: Location header contains the URL where the status of the long running operation can be checked
schema:
type: string
Azure-AsyncOperation:
description: Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-ms-long-running-operation: true
x-ms-long-running-operation-options:
final-state-via: location
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyFragmentContract'
description: The policy fragment contents to apply.
required: true
summary: Workspace policy fragment create or update
x-summary-source: derived
delete:
tags:
- PolicyFragment
operationId: WorkspacePolicyFragment_Delete
description: Deletes a policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/WorkspaceIdParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/IfMatchRequiredParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
responses:
'200':
description: The policy fragment was successfully removed.
'204':
description: The policy fragment successfully removed by previous request or does not exist.
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Workspace policy fragment delete
x-summary-source: derived
servers:
- url: https://management.azure.com
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}/listReferences
: post:
tags:
- PolicyFragment
operationId: WorkspacePolicyFragment_ListReferences
description: Lists policy resources that reference the policy fragment.
parameters:
- $ref: '#/components/parameters/ResourceGroupNameParameter'
- $ref: '#/components/parameters/ServiceNameParameter'
- $ref: '#/components/parameters/WorkspaceIdParameter'
- $ref: '#/components/parameters/IdParameter'
- $ref: '#/components/parameters/ApiVersionParameter'
- $ref: '#/components/parameters/SubscriptionIdParameter'
- $ref: '#/components/parameters/TopQueryParameter'
- $ref: '#/components/parameters/SkipQueryParameter'
responses:
'200':
description: Successfully returned an array of references to policy resources that include the policy fragment in their definitions.
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceCollection'
default:
description: Error response describing why the operation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
summary: Workspace policy fragment list references
x-summary-source: derived
servers:
- url: https://management.azure.com
components:
parameters:
SubscriptionIdParameter:
name: subscriptionId
in: path
description: The ID of the target subscription. The value must be an UUID.
required: true
schema:
type: string
format: uuid
TopQueryParameter:
name: $top
in: query
required: false
description: Number of records to return.
x-ms-parameter-location: method
schema:
type: integer
format: int32
minimum: 1
SkipQueryParameter:
name: $skip
in: query
required: false
description: Number of records to skip.
x-ms-parameter-location: method
schema:
type: integer
format: int32
minimum: 0
ServiceNameParameter:
name: serviceName
in: path
required: true
description: The name of the API Management service.
x-ms-parameter-location: method
schema:
type: string
maxLength: 50
minLength: 1
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
ApiVersionParameter:
name: api-version
in: query
description: The API version to use for this operation.
required: true
schema:
type: string
minLength: 1
IfMatchRequiredParameter:
name: If-Match
in: header
required: true
description: ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
x-ms-parameter-location: method
schema:
type: string
IdParameter:
name: id
in: path
required: true
description: A resource identifier.
x-ms-parameter-location: method
schema:
type: string
maxLength: 80
minLength: 1
pattern: (^[\w]+$)|(^[\w][\w\-]+[\w]$)
PolicyFragmentContentFormat:
name: format
in: query
required: false
description: Policy fragment content format.
x-ms-enum:
name: PolicyFragmentContentFormat
modelAsString: true
values:
- value: xml
description: The contents are inline and Content type is an XML document.
- value: rawxml
description: The contents are inline and Content type is a non XML encoded policy document.
x-ms-parameter-location: method
schema:
type: string
enum:
- xml
- rawxml
default: xml
ResourceGroupNameParameter:
name: resourceGroupName
in: path
description: The name of the resource group. The name is case insensitive.
required: true
x-ms-parameter-location: method
schema:
type: string
maxLength: 90
minLength: 1
IfMatchOptionalParameter:
name: If-Match
in: header
required: false
description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
x-ms-parameter-location: method
schema:
type: string
WorkspaceIdParameter:
name: workspaceId
in: path
required: true
description: Workspace identifier. Must be unique in the current API Management service instance.
x-ms-parameter-location: method
schema:
type: string
maxLength: 80
minLength: 1
pattern: ^[^*#&+:<>?]+$
schemas:
ResourceCollection:
type: object
properties:
value:
type: array
items:
allOf:
- $ref: '#/components/schemas/ProxyResource'
description: A collection of resources.
count:
type: integer
format: int64
description: Total record count number.
nextLink:
type: string
description: Next page link if any.
description: A collection of resources.
ErrorResponse:
type: object
title: Error response
description: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
properties:
error:
$ref: '#/components/schemas/ErrorDetail'
description: The error object.
PolicyFragmentContract:
type: object
properties:
properties:
x-ms-client-flatten: true
$ref: '#/components/schemas/PolicyFragmentContractProperties'
description: Properties of the Policy Fragment.
allOf:
- $ref: '#/components/schemas/ProxyResource'
description: Policy fragment contract details.
PolicyFragmentCollection:
type: object
properties:
value:
type: array
items:
$ref: '#/components/schemas/PolicyFragmentContract'
description: Policy fragment contract value.
count:
type: integer
format: int64
description: Total record count number.
nextLink:
type: string
description: Next page link if any.
description: The response of the get policy fragments operation.
ProxyResource:
title: Proxy Resource
description: The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
type: object
allOf:
- $ref: '#/components/schemas/Resource'
securitySchemes:
azure_auth:
type: oauth2
flows:
implicit:
scopes:
user_impersonation: impersonate your user account
authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
description: Azure Active Directory OAuth2 Flow.
x-refined-from:
- microsoft-azure-api-management-apimanagement-resource-manager-Microsoft.ApiManagement-ApiManagement-stable-2024-05-01-apimpolicyfragments.json
- microsoft-azure-api-management-apimanagement-resource-manager-Microsoft.ApiManagement-ApiManagement-stable-2024-05-01-apimworkspaces.json