ApiManagementClient
Use these REST APIs for performing operations on entities like API, Product, and Subscription associated with your Azure API Management deployment
COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"schemes": [
"https"
],
"host": "management.azure.com",
"info": {
"description": "Use these REST APIs for performing operations on entities like API, Product, and Subscription associated with your Azure API Management deployment.",
"title": "ApiManagementClient",
"version": "2018-01-01",
"x-apisguru-categories": [
"cloud"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
},
"x-origin": [
{
"format": "swagger",
"url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/apimanagement.json",
"version": "2.0"
}
],
"x-preferred": true,
"x-providerName": "azure.com",
"x-serviceName": "apimanagement",
"x-tags": [
"Azure",
"Microsoft"
]
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"azure_auth": {
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"description": "Azure Active Directory OAuth2 Flow.",
"flow": "implicit",
"scopes": {
"user_impersonation": "impersonate your user account"
},
"type": "oauth2"
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"parameters": {
"ApiVersionParameter": {
"description": "Version of the API to be used with the client request.",
"in": "query",
"name": "api-version",
"required": true,
"type": "string"
},
"IfMatchOptionalParameter": {
"description": "ETag of the Entity. Not required when creating an entity, but required when updating an entity.",
"in": "header",
"name": "If-Match",
"required": false,
"type": "string",
"x-ms-parameter-location": "method"
},
"IfMatchRequiredParameter": {
"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.",
"in": "header",
"name": "If-Match",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"PolicyIdParameter": {
"description": "The identifier of the Policy.",
"enum": [
"policy"
],
"in": "path",
"name": "policyId",
"required": true,
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "PolicyIdName"
},
"x-ms-parameter-location": "method"
},
"ResourceGroupNameParameter": {
"description": "The name of the resource group.",
"in": "path",
"name": "resourceGroupName",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"ServiceNameParameter": {
"description": "The name of the API Management service.",
"in": "path",
"maxLength": 50,
"minLength": 1,
"name": "serviceName",
"pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"SkipQueryParameter": {
"description": "Number of records to skip.",
"format": "int32",
"in": "query",
"minimum": 0,
"name": "$skip",
"required": false,
"type": "integer",
"x-ms-parameter-location": "method"
},
"SubscriptionIdParameter": {
"description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"in": "path",
"name": "subscriptionId",
"required": true,
"type": "string"
},
"TopQueryParameter": {
"description": "Number of records to return.",
"format": "int32",
"in": "query",
"minimum": 1,
"name": "$top",
"required": false,
"type": "integer",
"x-ms-parameter-location": "method"
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies": {
"get": {
"description": "Lists all the Global Policy definitions of the Api Management service.",
"operationId": "Policy_ListByService",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"description": "Policy scope.",
"enum": [
"Tenant",
"Product",
"Api",
"Operation",
"All"
],
"in": "query",
"name": "scope",
"required": false,
"type": "string",
"x-ms-enum": {
"modelAsString": false,
"name": "PolicyScopeContract"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns an array of Policy Contracts.",
"schema": {
"$ref": "#/definitions/PolicyCollection"
}
}
},
"tags": [
"Policy"
],
"x-ms-examples": {
"ApiManagementListPolicies": {
"parameters": {
"api-version": "2018-01-01",
"resourceGroupName": "rg1",
"serviceName": "apimService1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"nextLink": "",
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy",
"name": "policy",
"properties": {
"policyContent": "<!--\r\n IMPORTANT:\r\n - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n - Only the <forward-request> policy element can appear within the <backend> section element.\r\n - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n - To remove a policy, delete the corresponding policy statement from the policy document.\r\n - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
},
"type": "Microsoft.ApiManagement/service/policies"
}
]
}
}
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}": {
"delete": {
"description": "Deletes the global policy configuration of the Api Management Service.",
"operationId": "Policy_Delete",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"$ref": "#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Successfully deleted the policy configuration at the Global level."
},
"204": {
"description": "Successfully deleted the policy configuration at the Global level."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"Policy"
],
"x-ms-examples": {
"ApiManagementDeletePolicy": {
"parameters": {
"If-Match": "*",
"api-version": "2018-01-01",
"policyId": "policy",
"resourceGroupName": "rg1",
"serviceName": "apimService1",
"subscriptionId": "subid"
},
"responses": {
"200": {},
"204": {}
}
}
}
},
"get": {
"description": "Get the Global policy definition of the Api Management service.",
"operationId": "Policy_Get",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns the Policy Contracts.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/PolicyContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"Policy"
],
"x-ms-examples": {
"ApiManagementGetPolicy": {
"parameters": {
"api-version": "2018-01-01",
"policyId": "policy",
"resourceGroupName": "rg1",
"serviceName": "apimService1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy",
"name": "policy",
"properties": {
"policyContent": "<!--\r\n IMPORTANT:\r\n - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n - Only the <forward-request> policy element can appear within the <backend> section element.\r\n - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n - To remove a policy, delete the corresponding policy statement from the policy document.\r\n - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
},
"type": "Microsoft.ApiManagement/service/policies"
}
}
}
}
}
},
"head": {
"description": "Gets the entity state (Etag) version of the Global policy definition in the Api Management service.",
"operationId": "Policy_GetEntityTag",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "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.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"description": "Error Response.",
"properties": {
"error": {
"description": "Error Body contract.",
"properties": {
"code": {
"description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
"type": "string"
},
"details": {
"description": "The list of invalid fields send in request, in case of validation error.",
"items": {
"description": "Error Field contract.",
"properties": {
"code": {
"description": "Property level error code.",
"type": "string"
},
"message": {
"description": "Human-readable representation of property-level error.",
"type": "string"
},
"target": {
"description": "Property name.",
"type": "string"
}
}
},
"type": "array"
},
"message": {
"description": "Human-readable representation of the error.",
"type": "string"
}
}
}
}
}
}
},
"tags": [
"Policy"
],
"x-ms-examples": {
"ApiManagementHeadPolicy": {
"parameters": {
"api-version": "2018-01-01",
"policyId": "policy",
"resourceGroupName": "rg1",
"serviceName": "apimService1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"headers": {
"etag": "AAAAAAAAAAa="
}
}
}
}
}
},
"put": {
"description": "Creates or updates the global policy configuration of the Api Management service.",
"operationId": "Policy_CreateOrUpdate",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"description": "The policy contents to apply.",
"in": "body",
"name": "parameters",
"required": true,
"schema": {
"$ref": "#/definitions/PolicyContract"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Global policy configuration of the Api Management service was successfully updated.",
"schema": {
"$ref": "#/definitions/PolicyContract"
}
},
"201": {
"description": "Global policy configuration was successfully created.",
"schema": {
"$ref": "#/definitions/PolicyContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"tags": [
"Policy"
],
"x-ms-examples": {
"ApiManagementCreatePolicy": {
"parameters": {
"api-version": "2018-01-01",
"parameters": {
"properties": {
"contentFormat": "xml",
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
}
},
"policyId": "policy",
"resourceGroupName": "rg1",
"serviceName": "apimService1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy",
"name": "policy",
"properties": {
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
},
"type": "Microsoft.ApiManagement/service/policies"
}
},
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy",
"name": "policy",
"properties": {
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
},
"type": "Microsoft.ApiManagement/service/policies"
}
}
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets": {
"get": {
"description": "Lists all policy snippets.",
"operationId": "PolicySnippets_ListByService",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"description": "Policy scope.",
"enum": [
"Tenant",
"Product",
"Api",
"Operation",
"All"
],
"in": "query",
"name": "scope",
"required": false,
"type": "string",
"x-ms-enum": {
"modelAsString": false,
"name": "PolicyScopeContract"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns an array of Policy Contracts.",
"schema": {
"$ref": "#/definitions/PolicySnippetsCollection"
}
}
},
"tags": [
"PolicySnippets"
],
"x-ms-examples": {
"ApiManagementListPolicySnippets": {
"parameters": {
"api-version": "2018-01-01",
"resourceGroupName": "rg1",
"scope": "Api",
"serviceName": "apimService1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": [
{
"content": "<authentication-basic username=\"username\" password=\"password\" />",
"name": "Authenticate with Basic",
"scope": 268435471,
"toolTip": "Authenticate with the backend service using Basic authentication. Use in the inbound section at API scope."
}
]
}
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions": {
"get": {
"description": "Lists all azure regions in which the service exists.",
"operationId": "Regions_ListByService",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists of Regions in which the service is deployed.",
"schema": {
"$ref": "#/definitions/RegionListResult"
}
}
},
"tags": [
"Regions"
],
"x-ms-examples": {
"ApiManagementListRegions": {
"parameters": {
"api-version": "2018-01-01",
"resourceGroupName": "rg1",
"serviceName": "apimService1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"count": 1,
"nextLink": "",
"value": [
{
"isDeleted": false,
"isMasterRegion": true,
"name": "West US"
}
]
}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
"ErrorFieldContract": {
"description": "Error Field contract.",
"properties": {
"code": {
"description": "Property level error code.",
"type": "string"
},
"message": {
"description": "Human-readable representation of property-level error.",
"type": "string"
},
"target": {
"description": "Property name.",
"type": "string"
}
}
},
"ErrorResponse": {
"description": "Error Response.",
"properties": {
"error": {
"description": "Error Body contract.",
"properties": {
"code": {
"description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
"type": "string"
},
"details": {
"description": "The list of invalid fields send in request, in case of validation error.",
"items": {
"description": "Error Field contract.",
"properties": {
"code": {
"description": "Property level error code.",
"type": "string"
},
"message": {
"description": "Human-readable representation of property-level error.",
"type": "string"
},
"target": {
"description": "Property name.",
"type": "string"
}
}
},
"type": "array"
},
"message": {
"description": "Human-readable representation of the error.",
"type": "string"
}
}
}
}
},
"ErrorResponseBody": {
"description": "Error Body contract.",
"properties": {
"code": {
"description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
"type": "string"
},
"details": {
"description": "The list of invalid fields send in request, in case of validation error.",
"items": {
"description": "Error Field contract.",
"properties": {
"code": {
"description": "Property level error code.",
"type": "string"
},
"message": {
"description": "Human-readable representation of property-level error.",
"type": "string"
},
"target": {
"description": "Property name.",
"type": "string"
}
}
},
"type": "array"
},
"message": {
"description": "Human-readable representation of the error.",
"type": "string"
}
}
},
"PolicyCollection": {
"description": "The response of the list policy operation.",
"properties": {
"nextLink": {
"description": "Next page link if any.",
"type": "string"
},
"value": {
"description": "Policy Contract value.",
"items": {
"$ref": "#/definitions/PolicyContract"
},
"type": "array"
}
}
},
"PolicyContract": {
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "Policy Contract details.",
"properties": {
"properties": {
"$ref": "#/definitions/PolicyContractProperties",
"description": "Properties of the Policy.",
"x-ms-client-flatten": true
}
}
},
"PolicyContractProperties": {
"description": "Policy contract Properties.",
"properties": {
"contentFormat": {
"default": "xml",
"description": "Format of the policyContent.",
"enum": [
"xml",
"xml-link",
"rawxml",
"rawxml-link"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "PolicyContentFormat",
"values": [
{
"description": "The contents are inline and Content type is an XML document.",
"value": "xml"
},
{
"description": "The policy XML document is hosted on a http endpoint accessible from the API Management service.",
"value": "xml-link"
},
{
"description": "The contents are inline and Content type is a non XML encoded policy document.",
"value": "rawxml"
},
{
"description": "The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.",
"value": "rawxml-link"
}
]
}
},
"policyContent": {
"description": "Json escaped Xml Encoded contents of the Policy.",
"type": "string"
}
},
"required": [
"policyContent"
]
},
"PolicySnippetContract": {
"description": "Policy snippet.",
"properties": {
"content": {
"description": "Snippet content.",
"readOnly": true,
"type": "string"
},
"name": {
"description": "Snippet name.",
"readOnly": true,
"type": "string"
},
"scope": {
"description": "Binary OR value of the Snippet scope.",
"readOnly": true,
"type": "integer"
},
"toolTip": {
"description": "Snippet toolTip.",
"readOnly": true,
"type": "string"
}
}
},
"PolicySnippetsCollection": {
"description": "The response of the list policy snippets operation.",
"properties": {
"value": {
"description": "Policy snippet value.",
"items": {
"$ref": "#/definitions/PolicySnippetContract"
},
"type": "array"
}
}
},
"RegionContract": {
"description": "Region profile.",
"properties": {
"isDeleted": {
"description": "whether Region is deleted.",
"type": "boolean"
},
"isMasterRegion": {
"description": "whether Region is the master region.",
"type": "boolean"
},
"name": {
"description": "Region name.",
"readOnly": true,
"type": "string"
}
}
},
"RegionListResult": {
"description": "Lists Regions operation response details.",
"properties": {
"count": {
"description": "Total record count number across all pages.",
"format": "int64",
"type": "integer"
},
"nextLink": {
"description": "Next page link if any.",
"type": "string"
},
"value": {
"description": "Lists of Regions.",
"items": {
"$ref": "#/definitions/RegionContract"
},
"type": "array"
}
}
},
"Resource": {
"description": "The Resource definition.",
"properties": {
"id": {
"description": "Resource ID.",
"readOnly": true,
"type": "string"
},
"name": {
"description": "Resource name.",
"readOnly": true,
"type": "string"
},
"type": {
"description": "Resource type for API Management resource.",
"readOnly": true,
"type": "string"
}
},
"x-ms-azure-resource": true
}
}
}