swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these REST APIs for performing retrieving a collection of policy snippets available in Azure API Management deployment.
  title: ApiManagementClient
  version: 2019-12-01-preview
  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/preview/2019-12-01-preview/apimpolicydescriptions.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: apimanagement-apimpolicydescriptions
  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: {}
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions":
    get:
      description: Lists all policy descriptions.
      operationId: PolicyDescription_ListByService
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - 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
        - description: Policy scope.
          enum:
            - Tenant
            - Product
            - Api
            - Operation
            - All
          in: query
          name: scope
          required: false
          type: string
          x-ms-enum:
            modelAsString: false
            name: PolicyScopeContract
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - 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
      responses:
        "200":
          description: Returns an array of policy descriptions.
          schema:
            description: Descriptions of APIM policies.
            properties:
              count:
                description: Total record count number.
                format: int64
                type: integer
              value:
                description: Descriptions of APIM policies.
                items:
                  allOf:
                    - 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
                  description: Policy description details.
                  properties:
                    properties:
                      description: Policy description properties.
                      properties:
                        description:
                          description: Policy description.
                          readOnly: true
                          type: string
                        scope:
                          description: Binary OR value of the Snippet scope.
                          readOnly: true
                          type: integer
                type: array
        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:
        - PolicyDescription
      x-ms-examples:
        ApiManagementListPolicyDescriptions:
          parameters:
            api-version: 2019-12-01-preview
            resourceGroupName: rg1
            scope: Api
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                count: 2
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-basic
                    name: authentication-basic
                    properties:
                      description: Authenticate with the backend service using Basic authentication. Use in the inbound section at API scope.
                      scope: 268435471
                    type: Microsoft.ApiManagement/service/policyDescriptions
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-certificate
                    name: authentication-certificate
                    properties:
                      description: Authenticate with the backend service using a client certificate. Use in the inbound section at API scope.
                      scope: 268435471
                    type: Microsoft.ApiManagement/service/policyDescriptions
definitions: {}
