{
  "openapi": "3.0.0",
  "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": "2016-10-10",
    "x-jentic-source-url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2016-10-10/apimanagement.json"
  },
  "servers": [
    {
      "url": "https://management.azure.com/"
    }
  ],
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "./apimanagement.json#/components/parameters/ServiceNameParameter"
          },
          {
            "description": "Policy scope.",
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "enum": [
                "Tenant",
                "Product",
                "Api",
                "Operation",
                "All"
              ],
              "type": "string"
            },
            "x-ms-enum": {
              "modelAsString": false,
              "name": "PolicyScopeContract"
            }
          },
          {
            "$ref": "#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/components/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicySnippetsCollection"
                }
              }
            },
            "description": "Returns an array of Policy Contracts."
          }
        },
        "tags": [
          "PolicySnippets"
        ],
        "description": "Lists all policy snippets.",
        "operationId": "PolicySnippets_ListByService"
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "./apimanagement.json#/components/parameters/ServiceNameParameter"
          },
          {
            "$ref": "#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/components/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionListResult"
                }
              }
            },
            "description": "Lists of Regions in which the service is deployed."
          }
        },
        "tags": [
          "Regions"
        ],
        "description": "Lists all azure regions in which the service exists.",
        "operationId": "Regions_ListByService",
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    }
  },
  "components": {
    "parameters": {
      "ApiVersionParameter": {
        "description": "Version of the API to be used with the client request.",
        "in": "query",
        "name": "api-version",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ResourceGroupNameParameter": {
        "description": "The name of the resource group.",
        "in": "path",
        "name": "resourceGroupName",
        "required": true,
        "schema": {
          "type": "string"
        },
        "x-ms-parameter-location": "method"
      },
      "ServiceNameParameter": {
        "description": "The name of the API Management service.",
        "in": "path",
        "name": "serviceName",
        "required": true,
        "schema": {
          "maxLength": 50,
          "minLength": 1,
          "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
          "type": "string"
        },
        "x-ms-parameter-location": "method"
      },
      "SkipQueryParameter": {
        "description": "Number of records to skip.",
        "in": "query",
        "name": "$skip",
        "required": false,
        "schema": {
          "format": "int32",
          "minimum": 0,
          "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,
        "schema": {
          "type": "string"
        }
      },
      "TopQueryParameter": {
        "description": "Number of records to return.",
        "in": "query",
        "name": "$top",
        "required": false,
        "schema": {
          "format": "int32",
          "minimum": 1,
          "type": "integer"
        },
        "x-ms-parameter-location": "method"
      }
    },
    "schemas": {
      "ErrorBodyContract": {
        "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": {
              "$ref": "#/components/schemas/ErrorFieldContract"
            },
            "type": "array"
          },
          "message": {
            "description": "Human-readable representation of the error.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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"
          }
        },
        "type": "object"
      },
      "PolicySnippetContract": {
        "description": "Policy snippet.",
        "properties": {
          "content": {
            "description": "Snippet content.",
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "Snippet name.",
            "readOnly": true,
            "type": "string"
          },
          "scope": {
            "description": "Snippet scope.",
            "enum": [
              "Tenant",
              "Product",
              "Api",
              "Operation",
              "All"
            ],
            "readOnly": true,
            "type": "string",
            "x-ms-enum": {
              "modelAsString": false,
              "name": "PolicyScopeContract"
            }
          },
          "toolTip": {
            "description": "Snippet toolTip.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PolicySnippetsCollection": {
        "description": "The response of the list policy snippets operation.",
        "properties": {
          "value": {
            "description": "Policy snippet value.",
            "items": {
              "$ref": "#/components/schemas/PolicySnippetContract"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "RegionContract": {
        "description": "Region profile.",
        "properties": {
          "isMasterRegion": {
            "description": "whether Region is the master region.",
            "type": "boolean"
          },
          "name": {
            "description": "Region name.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "isMasterRegion"
        ],
        "type": "object"
      },
      "RegionListResult": {
        "description": "Lists Regions operation response details.",
        "properties": {
          "value": {
            "description": "Lists of Regions.",
            "items": {
              "$ref": "#/components/schemas/RegionContract"
            },
            "type": "array"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "azure_auth": {
        "description": "Azure Active Directory OAuth2 Flow.",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
            "scopes": {
              "user_impersonation": "impersonate your user account"
            }
          }
        },
        "type": "oauth2"
      }
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ]
}