swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Resource Provider
  title: Azure Location Based Services Resource Provider
  version: 2017-01-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-ms-code-generation-settings:
    name: LocationBasedServicesManagementClient
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/locationbasedservices/resource-manager/Microsoft.LocationBasedServices/preview/2017-01-01-preview/locationbasedservices.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: locationbasedservices
  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:
  AccountNameParameter:
    description: The name of the Location Based Services Account.
    in: path
    name: accountName
    required: true
    type: string
    x-ms-parameter-location: method
  ApiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  ResourceGroupNameParameter:
    description: The name of the Azure Resource Group.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  /providers/Microsoft.LocationBasedServices/operations:
    get:
      description: List operations available for the Location Based Services Resource Provider
      operationId: Accounts_ListOperations
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: The request was successful.
          schema:
            $ref: "#/definitions/LocationBasedServicesOperations"
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        GetOperations:
          parameters:
            api-version: 2017-01-01-preview
          responses:
            "200":
              body:
                value:
                  - display:
                      description: Register the provider
                      operation: Register the provider
                      provider: Microsoft Location Based Services
                      resource: Location Based Services Account
                    name: Microsoft.LocationBasedServices/register/action
                  - display:
                      description: Create or update a Location Based Services Account.
                      operation: Create or update a Location Based Services Account.
                      provider: Microsoft Location Based Services
                      resource: Location Based Services Account
                    name: Microsoft.LocationBasedServices/accounts/write
                  - display:
                      description: Get a Location Based Services Account.
                      operation: Get a Location Based Services Account.
                      provider: Microsoft Location Based Services
                      resource: Location Based Services Account
                    name: Microsoft.LocationBasedServices/accounts/read
                  - display:
                      description: Delete a Location Based Services Account.
                      operation: Delete a Location Based Services Account.
                      provider: Microsoft Location Based Services
                      resource: Location Based Services Account
                    name: Microsoft.LocationBasedServices/accounts/delete
                  - display:
                      description: List Location Based Services Account keys
                      operation: List keys
                      provider: Microsoft Location Based Services
                      resource: Location Based Services Account
                    name: Microsoft.LocationBasedServices/accounts/listKeys/action
                  - display:
                      description: Generate new Location Based Services Account primary or secondary key
                      operation: Generate new primary or secondary key
                      provider: Microsoft Location Based Services
                      resource: Location Based Services Account
                    name: Microsoft.LocationBasedServices/accounts/regenerateKey/action
      x-ms-pageable:
        itemName: value
  "/subscriptions/{subscriptionId}/providers/Microsoft.LocationBasedServices/accounts":
    get:
      description: Get all Location Based Services Accounts in a Subscription
      operationId: Accounts_ListBySubscription
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: The request was successful.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccounts"
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        ListAccountsBySubscription:
          parameters:
            api-version: 2017-01-01-preview
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount2
                    location: global
                    name: myLBSAccount2
                    sku:
                      name: S0
                      tier: Standard
                    tags:
                      test: "true"
                    type: Microsoft.LocationBasedServices/accounts
                  - id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                    location: global
                    name: myLBSAccount
                    sku:
                      name: S0
                      tier: Standard
                    tags:
                      test: "true"
                    type: Microsoft.LocationBasedServices/accounts
      x-ms-pageable:
        itemName: value
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources":
    post:
      description: Moves Location Based Services Accounts from one ResourceGroup (or Subscription) to another
      operationId: Accounts_Move
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The name of the resource group that contains Location Based Services Account to move.
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: The details of the Location Based Services Account move.
          in: body
          name: moveRequest
          required: true
          schema:
            $ref: "#/definitions/LocationBasedServicesAccountsMoveRequest"
      responses:
        "200":
          description: The Accounts were successfully moved.
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        MoveAccounts:
          parameters:
            api-version: 2017-01-01-preview
            moveRequest:
              resourceIds:
                - /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                - /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount2
              targetResourceGroup: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup2
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200": {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LocationBasedServices/accounts":
    get:
      description: Get all Location Based Services Accounts in a Resource Group
      operationId: Accounts_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
      responses:
        "200":
          description: The request was successful.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccounts"
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        ListAccountsByResourceGroup:
          parameters:
            api-version: 2017-01-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount2
                    location: global
                    name: myLBSAccount2
                    sku:
                      name: S0
                      tier: Standard
                    tags:
                      test: "true"
                    type: Microsoft.LocationBasedServices/accounts
                  - id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                    location: global
                    name: myLBSAccount
                    sku:
                      name: S0
                      tier: Standard
                    tags:
                      test: "true"
                    type: Microsoft.LocationBasedServices/accounts
      x-ms-pageable:
        itemName: value
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LocationBasedServices/accounts/{accountName}":
    delete:
      description: Delete a Location Based Services Account
      operationId: Accounts_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/AccountNameParameter"
      responses:
        "200":
          description: The Account was deleted successfully.
        "204":
          description: The specified Account was not found. Nothing was deleted.
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        DeleteAccount:
          parameters:
            accountName: myLBSAccount
            api-version: 2017-01-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200": {}
            "204": {}
    get:
      description: Get a Location Based Services Account
      operationId: Accounts_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/AccountNameParameter"
      responses:
        "200":
          description: The request was successful.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccount"
        "404":
          description: The specified Account does not exist.
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        GetAccount:
          parameters:
            accountName: myLBSAccount
            api-version: 2017-01-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200":
              body:
                id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                location: global
                name: myLBSAccount
                sku:
                  name: S0
                  tier: Standard
                tags:
                  test: "true"
                type: Microsoft.LocationBasedServices/accounts
            "404": {}
    patch:
      description: Updates a Location Based Services Account. Only a subset of the parameters may be updated after creation, such as Sku and Tags.
      operationId: Accounts_Update
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/AccountNameParameter"
        - description: The updated parameters for the Location Based Services Account.
          in: body
          name: LocationBasedServicesAccountUpdateParameters
          required: true
          schema:
            $ref: "#/definitions/LocationBasedServicesAccountUpdateParameters"
      responses:
        "200":
          description: The Account was successfully updated.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccount"
        "404":
          description: The specified Account was not found. Nothing was updated.
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        UpdateAccount:
          parameters:
            LocationBasedServicesAccountUpdateParameters:
              tags:
                specialTag: "true"
            accountName: myLBSAccount
            api-version: 2017-01-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200":
              body:
                id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                location: global
                name: myLBSAccount
                sku:
                  name: S0
                  tier: Standard
                tags:
                  specialTag: "true"
                type: Microsoft.LocationBasedServices/accounts
            "404": {}
    put:
      description: Create or update a Location Based Services Account. A Location Based Services Account holds the keys which allow access to the Location Based Services REST APIs.
      operationId: Accounts_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/AccountNameParameter"
        - description: The new or updated parameters for the Location Based Services Account.
          in: body
          name: LocationBasedServicesAccountCreateParameters
          required: true
          schema:
            $ref: "#/definitions/LocationBasedServicesAccountCreateParameters"
      responses:
        "200":
          description: The Account was successfully updated.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccount"
        "201":
          description: The Account was successfully created.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccount"
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        CreateAccount:
          parameters:
            LocationBasedServicesAccountCreateParameters:
              location: global
              sku:
                name: S0
              tags:
                test: "true"
            accountName: myLBSAccount
            api-version: 2017-01-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200":
              body:
                id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                location: global
                name: myLBSAccount
                sku:
                  name: S0
                  tier: Standard
                tags:
                  test: "true"
                type: Microsoft.LocationBasedServices/accounts
            "201":
              body:
                id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                location: global
                name: myLBSAccount
                sku:
                  name: S0
                  tier: Standard
                tags:
                  test: "true"
                type: Microsoft.LocationBasedServices/accounts
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LocationBasedServices/accounts/{accountName}/listKeys":
    post:
      description: Get the keys to use with the Location Based Services APIs. A key is used to authenticate and authorize access to the Location Based Services REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.
      operationId: Accounts_ListKeys
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/AccountNameParameter"
      responses:
        "200":
          description: The request was successful.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccountKeys"
        "404":
          description: The specified Account does not exist.
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        ListKeys:
          parameters:
            accountName: myLBSAccount
            api-version: 2017-01-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200":
              body:
                id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                primaryKey: ZiBllKWCwXXLTO13S2TaoHoK8kPFYaoyYlAcnCcE4PQ
                secondaryKey: cJHpmUGNaGGO8H59p6NKGhfff9VjD278-2bi5wo0_mU
            "404": {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LocationBasedServices/accounts/{accountName}/regenerateKey":
    post:
      description: Regenerate either the primary or secondary key for use with the Location Based Services APIs. The old key will stop working immediately.
      operationId: Accounts_RegenerateKeys
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/AccountNameParameter"
        - description: "Which key to regenerate:  primary or secondary."
          in: body
          name: keySpecification
          required: true
          schema:
            $ref: "#/definitions/LocationBasedServicesKeySpecification"
      responses:
        "200":
          description: The request was successful.
          schema:
            $ref: "#/definitions/LocationBasedServicesAccountKeys"
        "404":
          description: The specified Account does not exist.
        default:
          description: An unexpected error occurred.
          schema:
            $ref: "#/definitions/Error"
      x-ms-examples:
        RegenerateKey:
          parameters:
            accountName: myLBSAccount
            api-version: 2017-01-01-preview
            keySpecification:
              keyType: primary
            resourceGroupName: myResourceGroup
            subscriptionId: 21a9967a-e8a9-4656-a70b-96ff1c4d05a0
          responses:
            "200":
              body:
                id: /subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.LocationBasedServices/accounts/myLBSAccount
                primaryKey: uj0yqjjz8zG3IOSWvb_smi1q1QenGtupAqrOA1zCO6s
                secondaryKey: cJHpmUGNaGGO8H59p6NKGhfff9VjD278-2bi5wo0_mU
            "404": {}
definitions:
  Error:
    description: This object is returned when an error occurs in the Location Based Service API
    properties:
      code:
        description: Error code.
        readOnly: true
        type: string
      details:
        description: If available, a list of additional details about the error.
        items:
          properties:
            code:
              description: Error code.
              readOnly: true
              type: string
            message:
              description: If available, a human readable description of the error.
              readOnly: true
              type: string
            target:
              description: If available, the component generating the error.
              readOnly: true
              type: string
          type: object
        readOnly: true
        type: array
      message:
        description: If available, a human readable description of the error.
        readOnly: true
        type: string
      target:
        description: If available, the component generating the error.
        readOnly: true
        type: string
    type: object
  LocationBasedServicesAccount:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An Azure resource which represents access to a suite of Location Based Services REST APIs.
    properties:
      location:
        description: The location of the resource.
        readOnly: true
        type: string
      sku:
        $ref: "#/definitions/Sku"
        description: The SKU of this account.
        readOnly: true
      tags:
        additionalProperties:
          type: string
        description: Gets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
        readOnly: true
        type: object
    type: object
  LocationBasedServicesAccountCreateParameters:
    description: Parameters used to create a new Location Based Services Account.
    properties:
      location:
        description: The location of the resource.
        type: string
      sku:
        $ref: "#/definitions/Sku"
        description: The SKU of this account.
      tags:
        additionalProperties:
          type: string
        description: Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
        type: object
    required:
      - location
      - sku
    type: object
  LocationBasedServicesAccountKeys:
    description: The set of keys which can be used to access the Location Based Services REST APIs. Two keys are provided for key rotation without interruption.
    properties:
      id:
        description: The full Azure resource identifier of the Location Based Services Account.
        readOnly: true
        type: string
      primaryKey:
        description: The primary key for accessing the Location Based Services REST APIs.
        readOnly: true
        type: string
      secondaryKey:
        description: The secondary key for accessing the Location Based Services REST APIs.
        readOnly: true
        type: string
    type: object
  LocationBasedServicesAccountUpdateParameters:
    description: Parameters used to update an existing Location Based Services Account.
    properties:
      sku:
        $ref: "#/definitions/Sku"
        description: The SKU of this account.
      tags:
        additionalProperties:
          type: string
        description: Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
        type: object
    type: object
  LocationBasedServicesAccounts:
    description: A list of Location Based Services Accounts.
    properties:
      value:
        description: A Location Based Services Account.
        items:
          $ref: "#/definitions/LocationBasedServicesAccount"
        readOnly: true
        type: array
    type: object
  LocationBasedServicesAccountsMoveRequest:
    description: The description of what resources to move between resource groups.
    properties:
      resourceIds:
        description: A list of resource names to move from the source resource group.
        items:
          type: string
        type: array
      targetResourceGroup:
        description: The name of the destination resource group.
        type: string
    required:
      - targetResourceGroup
      - resourceIds
    type: object
  LocationBasedServicesKeySpecification:
    description: Whether the operation refers to the primary or secondary key.
    properties:
      keyType:
        description: Whether the operation refers to the primary or secondary key.
        enum:
          - primary
          - secondary
        type: string
        x-ms-enum:
          modelAsString: true
          name: KeyType
    required:
      - keyType
    type: object
  LocationBasedServicesOperations:
    description: The set of operations available for Location Based Services.
    properties:
      value:
        description: An operation available for Location Based Services.
        items:
          properties:
            display:
              description: The human-readable description of the operation.
              properties:
                description:
                  description: The description of the operation.
                  readOnly: true
                  type: string
                operation:
                  description: The action that users can perform, based on their permission level.
                  readOnly: true
                  type: string
                provider:
                  description: "Service provider: Microsoft Location Based Services."
                  readOnly: true
                  type: string
                resource:
                  description: Resource on which the operation is performed.
                  readOnly: true
                  type: string
              type: object
            name:
              description: "Operation name: {provider}/{resource}/{operation}."
              readOnly: true
              type: string
            origin:
              description: The origin of the operation.
              readOnly: true
              type: string
          type: object
        readOnly: true
        type: array
    type: object
  Resource:
    description: An Azure resource
    properties:
      id:
        description: The fully qualified Location Based Services Account resource identifier.
        readOnly: true
        type: string
      name:
        description: The name of the Location Based Services Account, which is unique within a Resource Group.
        readOnly: true
        type: string
      type:
        description: Azure resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  Sku:
    description: The SKU of the Location Based Services Account.
    properties:
      name:
        description: The name of the SKU, in standard format (such as S0).
        type: string
      tier:
        description: Gets the sku tier. This is based on the SKU name.
        readOnly: true
        type: string
    required:
      - name
