swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these REST APIs for performing operations on Group entity in your Azure API Management deployment. Groups are used to manage the visibility of products to developers. Each API Management service instance comes with the following immutable system groups whose membership is automatically managed by API Management.  - **Administrators** - Azure subscription administrators are members of this group. - **Developers** - Authenticated developer portal users fall into this group. - **Guests** - Unauthenticated developer portal users are placed into this group. In addition to these system groups, administrators can create custom groups or [leverage external groups in associated Azure Active Directory tenants](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-aad#how-to-add-an-external-azure-active-directory-group). Custom and external groups can be used alongside system groups in giving developers visibility and access to API products. For example, you could create one custom group for developers affiliated with a specific partner organization and allow them access to the APIs from a product containing relevant APIs only. A user can be a member of more than one group.
  title: ApiManagementClient
  version: 2018-06-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/2018-06-01-preview/apimgroups.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: apimanagement-apimgroups
  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}/groups":
    get:
      description: Lists a collection of groups defined within a service instance.
      externalDocs:
        url: https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups
      operationId: Group_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: "| Field       | Supported operators    | Supported functions               |

            |-------------|------------------------|-----------------------------------|

            \r

            |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|

            |displayName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|

            |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|

            |aadObjectId | eq |    |\n"
          in: query
          name: $filter
          required: false
          type: string
        - description: Number of records to return.
          format: int32
          in: query
          minimum: 1
          name: $top
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Number of records to skip.
          format: int32
          in: query
          minimum: 0
          name: $skip
          required: false
          type: integer
          x-ms-parameter-location: method
        - 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: Lists a collection of Group entities.
          schema:
            description: Paged Group list representation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                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: Contract details.
                  properties:
                    properties:
                      description: Group contract Properties.
                      properties:
                        builtIn:
                          description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                          readOnly: true
                          type: boolean
                        description:
                          description: Group description. Can contain HTML formatting tags.
                          maxLength: 1000
                          type: string
                        displayName:
                          description: Group name.
                          maxLength: 300
                          minLength: 1
                          type: string
                        externalId:
                          description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                          type: string
                        type:
                          description: Group type.
                          enum:
                            - custom
                            - system
                            - external
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: GroupType
                      required:
                        - displayName
                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:
        - Group
      x-ms-examples:
        ApiManagementListGroups:
          parameters:
            api-version: 2018-06-01-preview
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020001
                    name: 5600b59375ff190048020001
                    properties:
                      builtIn: true
                      description: Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.
                      displayName: Administrators
                      type: system
                    type: Microsoft.ApiManagement/service/groups
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9
                    name: 59306a29e4bbd510dc24e5f9
                    properties:
                      builtIn: false
                      description: awesome group of people
                      displayName: AwesomeGroup (samiraad.onmicrosoft.com)
                      externalId: aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca
                      type: external
                    type: Microsoft.ApiManagement/service/groups
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020002
                    name: 5600b59375ff190048020002
                    properties:
                      builtIn: true
                      description: Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.
                      displayName: Developers
                      type: system
                    type: Microsoft.ApiManagement/service/groups
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020003
                    name: 5600b59375ff190048020003
                    properties:
                      builtIn: true
                      description: Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.
                      displayName: Guests
                      type: system
                    type: Microsoft.ApiManagement/service/groups
      x-ms-odata: ./definitions.json#/definitions/GroupContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}":
    delete:
      description: Deletes specific group of the API Management service instance.
      operationId: Group_Delete
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - 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
        - 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: The group was successfully deleted.
        "204":
          description: The group was successfully deleted.
        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:
        - Group
      x-ms-examples:
        ApiManagementDeleteGroup:
          parameters:
            If-Match: "*"
            api-version: 2018-06-01-preview
            groupId: aadGroup
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    get:
      description: Gets the details of the group specified by its identifier.
      operationId: Group_Get
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - 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: The response body contains the specified Group entity.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            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: Contract details.
            properties:
              properties:
                description: Group contract Properties.
                properties:
                  builtIn:
                    description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                    readOnly: true
                    type: boolean
                  description:
                    description: Group description. Can contain HTML formatting tags.
                    maxLength: 1000
                    type: string
                  displayName:
                    description: Group name.
                    maxLength: 300
                    minLength: 1
                    type: string
                  externalId:
                    description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                    type: string
                  type:
                    description: Group type.
                    enum:
                      - custom
                      - system
                      - external
                    type: string
                    x-ms-enum:
                      modelAsString: false
                      name: GroupType
                required:
                  - displayName
        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:
        - Group
      x-ms-examples:
        ApiManagementGetGroup:
          parameters:
            api-version: 2018-06-01-preview
            groupId: 59306a29e4bbd510dc24e5f9
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9
                name: 59306a29e4bbd510dc24e5f9
                properties:
                  builtIn: false
                  description: awesome group of people
                  displayName: AwesomeGroup (samiraad.onmicrosoft.com)
                  externalId: aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca
                  type: external
                type: Microsoft.ApiManagement/service/groups
    head:
      description: Gets the entity state (Etag) version of the group specified by its identifier.
      operationId: Group_GetEntityTag
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - 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: Specified group entity exists and 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:
        - Group
      x-ms-examples:
        ApiManagementHeadGroup:
          parameters:
            api-version: 2018-06-01-preview
            groupId: 59306a29e4bbd510dc24e5f9
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              headers:
                etag: AAAAAAAAAAa=
    patch:
      description: Updates the details of the group specified by its identifier.
      operationId: Group_Update
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Update parameters.
          in: body
          name: parameters
          required: true
          schema:
            description: Parameters supplied to the Update Group operation.
            properties:
              properties:
                description: Parameters supplied to the Update Group operation.
                properties:
                  description:
                    description: Group description.
                    type: string
                  displayName:
                    description: Group name.
                    maxLength: 300
                    minLength: 1
                    type: string
                  externalId:
                    description: Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                    type: string
                  type:
                    description: Group type.
                    enum:
                      - custom
                      - system
                      - external
                    type: string
                    x-ms-enum:
                      modelAsString: false
                      name: GroupType
        - 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
        - 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:
        "204":
          description: The group details were successfully updated.
        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:
        - Group
      x-ms-examples:
        ApiManagementUpdateGroup:
          parameters:
            If-Match: "*"
            api-version: 2018-06-01-preview
            groupId: tempgroup
            parameters:
              properties:
                displayName: temp group
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "204": {}
    put:
      description: Creates or Updates a group.
      operationId: Group_CreateOrUpdate
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Create parameters.
          in: body
          name: parameters
          required: true
          schema:
            description: Parameters supplied to the Create Group operation.
            properties:
              properties:
                description: Parameters supplied to the Create Group operation.
                properties:
                  description:
                    description: Group description.
                    type: string
                  displayName:
                    description: Group name.
                    maxLength: 300
                    minLength: 1
                    type: string
                  externalId:
                    description: Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                    type: string
                  type:
                    description: Group type.
                    enum:
                      - custom
                      - system
                      - external
                    type: string
                    x-ms-enum:
                      modelAsString: false
                      name: GroupType
                required:
                  - displayName
        - 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
        - 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: Group already exists.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            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: Contract details.
            properties:
              properties:
                description: Group contract Properties.
                properties:
                  builtIn:
                    description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                    readOnly: true
                    type: boolean
                  description:
                    description: Group description. Can contain HTML formatting tags.
                    maxLength: 1000
                    type: string
                  displayName:
                    description: Group name.
                    maxLength: 300
                    minLength: 1
                    type: string
                  externalId:
                    description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                    type: string
                  type:
                    description: Group type.
                    enum:
                      - custom
                      - system
                      - external
                    type: string
                    x-ms-enum:
                      modelAsString: false
                      name: GroupType
                required:
                  - displayName
        "201":
          description: Group was created successfully.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            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: Contract details.
            properties:
              properties:
                description: Group contract Properties.
                properties:
                  builtIn:
                    description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                    readOnly: true
                    type: boolean
                  description:
                    description: Group description. Can contain HTML formatting tags.
                    maxLength: 1000
                    type: string
                  displayName:
                    description: Group name.
                    maxLength: 300
                    minLength: 1
                    type: string
                  externalId:
                    description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                    type: string
                  type:
                    description: Group type.
                    enum:
                      - custom
                      - system
                      - external
                    type: string
                    x-ms-enum:
                      modelAsString: false
                      name: GroupType
                required:
                  - displayName
        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:
        - Group
      x-ms-examples:
        ApiManagementCreateGroup:
          parameters:
            api-version: 2018-06-01-preview
            groupId: tempgroup
            parameters:
              properties:
                displayName: temp group
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup
                name: tempgroup
                properties:
                  displayName: temp group
                  type: custom
                type: Microsoft.ApiManagement/service/groups
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup
                name: tempgroup
                properties:
                  displayName: temp group
                  type: custom
                type: Microsoft.ApiManagement/service/groups
        ApiManagementCreateGroupExternal:
          parameters:
            api-version: 2018-06-01-preview
            groupId: aadGroup
            parameters:
              properties:
                description: new group to test
                displayName: NewGroup (samiraad.onmicrosoft.com)
                externalId: aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d
                type: external
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup
                name: aadGroup
                properties:
                  description: new group to test
                  displayName: NewGroup (samiraad.onmicrosoft.com)
                  externalId: aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d
                  type: external
                type: Microsoft.ApiManagement/service/groups
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup
                name: aadGroup
                properties:
                  description: new group to test
                  displayName: NewGroup (samiraad.onmicrosoft.com)
                  externalId: aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d
                  type: external
                type: Microsoft.ApiManagement/service/groups
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users":
    get:
      description: Lists a collection of user entities associated with the group.
      operationId: GroupUser_List
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "| Field       | Supported operators    | Supported functions               |

            |-------------|------------------------|-----------------------------------|

            \r

            |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|

            |firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|

            |lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|

            |email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|

            |registrationDate | ge, le, eq, ne, gt, lt |    |

            |note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n"
          in: query
          name: $filter
          required: false
          type: string
        - description: Number of records to return.
          format: int32
          in: query
          minimum: 1
          name: $top
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Number of records to skip.
          format: int32
          in: query
          minimum: 0
          name: $skip
          required: false
          type: integer
          x-ms-parameter-location: method
        - 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: Lists a collection of user entities associated with the group.
          schema:
            description: Paged Users list representation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                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: User details.
                  properties:
                    properties:
                      allOf:
                        - description: User Entity Base Parameters set.
                          properties:
                            identities:
                              description: Collection of user identities.
                              items:
                                description: User identity details.
                                properties:
                                  id:
                                    description: Identifier value within provider.
                                    type: string
                                  provider:
                                    description: Identity provider name.
                                    type: string
                              type: array
                            note:
                              description: Optional note about a user set by the administrator.
                              type: string
                            state:
                              default: active
                              description: Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.
                              enum:
                                - active
                                - blocked
                                - pending
                                - deleted
                              type: string
                              x-ms-enum:
                                modelAsString: true
                                name: UserState
                                values:
                                  - description: User state is active.
                                    value: active
                                  - description: User is blocked. Blocked users cannot authenticate at developer portal or call API.
                                    value: blocked
                                  - description: User account is pending. Requires identity confirmation before it can be made active.
                                    value: pending
                                  - description: User account is closed. All identities and related entities are removed.
                                    value: deleted
                      description: User profile.
                      properties:
                        email:
                          description: Email address.
                          type: string
                        firstName:
                          description: First name.
                          type: string
                        groups:
                          description: Collection of groups user is part of.
                          items:
                            description: Group contract Properties.
                            properties:
                              builtIn:
                                description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                                readOnly: true
                                type: boolean
                              description:
                                description: Group description. Can contain HTML formatting tags.
                                maxLength: 1000
                                type: string
                              displayName:
                                description: Group name.
                                maxLength: 300
                                minLength: 1
                                type: string
                              externalId:
                                description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                                type: string
                              type:
                                description: Group type.
                                enum:
                                  - custom
                                  - system
                                  - external
                                type: string
                                x-ms-enum:
                                  modelAsString: false
                                  name: GroupType
                            required:
                              - displayName
                          readOnly: true
                          type: array
                        lastName:
                          description: Last name.
                          type: string
                        registrationDate:
                          description: |
                            Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
                          format: date-time
                          type: string
                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:
        - GroupUser
      x-ms-examples:
        ApiManagementListGroupUsers:
          parameters:
            api-version: 2018-06-01-preview
            groupId: 57d2ef278aa04f0888cba3f3
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/kjoshiarmTemplateUser1
                    name: armTemplateUser1
                    properties:
                      email: user1@live.com
                      firstName: user1
                      identities:
                        - id: user1@live.com
                          provider: Basic
                      lastName: lastname1
                      note: note for user 1
                      registrationDate: 2017-05-31T18:54:41.447Z
                      state: active
                    type: Microsoft.ApiManagement/service/groups/users
      x-ms-odata: ./definitions.json#/definitions/UserContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}":
    delete:
      description: Remove existing user from existing group.
      operationId: GroupUser_Delete
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: User identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 80
          minLength: 1
          name: userId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - 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: The user was successfully removed from the group.
        "204":
          description: The user was successfully removed from the group.
        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:
        - GroupUser
      x-ms-examples:
        ApiManagementDeleteGroupUser:
          parameters:
            If-Match: "*"
            api-version: 2018-06-01-preview
            groupId: templategroup
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            userId: 59307d350af58404d8a26300
          responses:
            "200": {}
            "204": {}
    head:
      description: Checks that user entity specified by identifier is associated with the group entity.
      operationId: GroupUser_CheckEntityExists
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: User identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 80
          minLength: 1
          name: userId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - 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:
        "204":
          description: Entity exists
        "404":
          description: Entity does not exists.
        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:
        - GroupUser
      x-ms-examples:
        ApiManagementHeadGroupUser:
          parameters:
            api-version: 2018-06-01-preview
            groupId: 59306a29e4bbd510dc24e5f9
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            userId: 5931a75ae4bbd512a88c680b
          responses:
            "204": {}
            "404": {}
    put:
      description: Add existing user to existing group
      operationId: GroupUser_Create
      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: Group identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 256
          minLength: 1
          name: groupId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: User identifier. Must be unique in the current API Management service instance.
          in: path
          maxLength: 80
          minLength: 1
          name: userId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - 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: The specified user is already a member of the specified group.
          schema:
            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: User details.
            properties:
              properties:
                allOf:
                  - description: User Entity Base Parameters set.
                    properties:
                      identities:
                        description: Collection of user identities.
                        items:
                          description: User identity details.
                          properties:
                            id:
                              description: Identifier value within provider.
                              type: string
                            provider:
                              description: Identity provider name.
                              type: string
                        type: array
                      note:
                        description: Optional note about a user set by the administrator.
                        type: string
                      state:
                        default: active
                        description: Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.
                        enum:
                          - active
                          - blocked
                          - pending
                          - deleted
                        type: string
                        x-ms-enum:
                          modelAsString: true
                          name: UserState
                          values:
                            - description: User state is active.
                              value: active
                            - description: User is blocked. Blocked users cannot authenticate at developer portal or call API.
                              value: blocked
                            - description: User account is pending. Requires identity confirmation before it can be made active.
                              value: pending
                            - description: User account is closed. All identities and related entities are removed.
                              value: deleted
                description: User profile.
                properties:
                  email:
                    description: Email address.
                    type: string
                  firstName:
                    description: First name.
                    type: string
                  groups:
                    description: Collection of groups user is part of.
                    items:
                      description: Group contract Properties.
                      properties:
                        builtIn:
                          description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                          readOnly: true
                          type: boolean
                        description:
                          description: Group description. Can contain HTML formatting tags.
                          maxLength: 1000
                          type: string
                        displayName:
                          description: Group name.
                          maxLength: 300
                          minLength: 1
                          type: string
                        externalId:
                          description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                          type: string
                        type:
                          description: Group type.
                          enum:
                            - custom
                            - system
                            - external
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: GroupType
                      required:
                        - displayName
                    readOnly: true
                    type: array
                  lastName:
                    description: Last name.
                    type: string
                  registrationDate:
                    description: |
                      Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
                    format: date-time
                    type: string
        "201":
          description: The user was successfully added to the group.
          schema:
            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: User details.
            properties:
              properties:
                allOf:
                  - description: User Entity Base Parameters set.
                    properties:
                      identities:
                        description: Collection of user identities.
                        items:
                          description: User identity details.
                          properties:
                            id:
                              description: Identifier value within provider.
                              type: string
                            provider:
                              description: Identity provider name.
                              type: string
                        type: array
                      note:
                        description: Optional note about a user set by the administrator.
                        type: string
                      state:
                        default: active
                        description: Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.
                        enum:
                          - active
                          - blocked
                          - pending
                          - deleted
                        type: string
                        x-ms-enum:
                          modelAsString: true
                          name: UserState
                          values:
                            - description: User state is active.
                              value: active
                            - description: User is blocked. Blocked users cannot authenticate at developer portal or call API.
                              value: blocked
                            - description: User account is pending. Requires identity confirmation before it can be made active.
                              value: pending
                            - description: User account is closed. All identities and related entities are removed.
                              value: deleted
                description: User profile.
                properties:
                  email:
                    description: Email address.
                    type: string
                  firstName:
                    description: First name.
                    type: string
                  groups:
                    description: Collection of groups user is part of.
                    items:
                      description: Group contract Properties.
                      properties:
                        builtIn:
                          description: true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
                          readOnly: true
                          type: boolean
                        description:
                          description: Group description. Can contain HTML formatting tags.
                          maxLength: 1000
                          type: string
                        displayName:
                          description: Group name.
                          maxLength: 300
                          minLength: 1
                          type: string
                        externalId:
                          description: For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.
                          type: string
                        type:
                          description: Group type.
                          enum:
                            - custom
                            - system
                            - external
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: GroupType
                      required:
                        - displayName
                    readOnly: true
                    type: array
                  lastName:
                    description: Last name.
                    type: string
                  registrationDate:
                    description: |
                      Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
                    format: date-time
                    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:
        - GroupUser
      x-ms-examples:
        ApiManagementCreateGroupUser:
          parameters:
            api-version: 2018-06-01-preview
            groupId: tempgroup
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            userId: 59307d350af58404d8a26300
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/59307d350af58404d8a26300
                name: 59307d350af58404d8a26300
                properties:
                  email: testuser1@live.com
                  firstName: test
                  groups: []
                  identities: []
                  lastName: user
                  registrationDate: 2017-06-01T20:46:45.437Z
                  state: active
                type: Microsoft.ApiManagement/service/groups/users
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/59307d350af58404d8a26300
                name: 59307d350af58404d8a26300
                properties:
                  email: testuser1@live.com
                  firstName: test
                  groups: []
                  identities: []
                  lastName: user
                  registrationDate: 2017-06-01T20:46:45.437Z
                  state: active
                type: Microsoft.ApiManagement/service/groups/users
definitions: {}
