LocationAPI.yaml 118 KB
Newer Older
Michel Roy's avatar
Michel Roy committed
openapi: 3.0.0
info:
Michel Roy's avatar
Michel Roy committed
  contact:
    url: https://forge.etsi.org/rep/mec/gs013-location-api
Michel Roy's avatar
Michel Roy committed
  title: ETSI GS MEC 013 - Location API
  version: 2.1.1
Michel Roy's avatar
Michel Roy committed
  description: The ETSI MEC ISG MEC013 Location API described using OpenAPI.
Michel Roy's avatar
Michel Roy committed
  license:
    name: BSD-3-Clause
    url: 'https://forge.etsi.org/legal-matters'
externalDocs:
  description: ETSI MEC013 V2.1.1 Location API
  url: 'http://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/02.01.01_60/gs_mec013v020101p.pdf'
servers:
Michel Roy's avatar
Michel Roy committed
  - url: 'https://localhost/location/v2'
tags:
- name: 'location'
Michel Roy's avatar
Michel Roy committed
paths:
  /queries/distance:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'UE Distance Lookup of a specific UE'
      description: 'UE Distance Lookup between terminals or a terminal and a location'
      operationId: distanceGET
      parameters:
        - $ref: '#/components/parameters/Query.Requester'
        - $ref: '#/components/parameters/Query.AddressMandatory'
        - $ref: '#/components/parameters/Query.Latitude'
        - $ref: '#/components/parameters/Query.Longitude'
      responses:
        '200':
          description: 'Successful response to a distance request'
          content:
            application/json:
              schema:
                type: object
                properties:
                  terminalDistance:
                    $ref: '#/components/schemas/TerminalDistance'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'queries'
  /queries/users:
    get:
Michel Roy's avatar
Michel Roy committed
      tags:
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'UE Location Lookup of a specific UE or group of UEs'
      description: 'UE Location Lookup of a specific UE or group of UEs'
      operationId: usersGET
      parameters:
        - $ref: '#/components/parameters/Query.ZoneId'
        - $ref: '#/components/parameters/Query.AccessPointId'
        - $ref: '#/components/parameters/Query.Address'
      responses:
        '200':
          description: 'Successful response to users request'
          content:
            application/json:
              schema:
                type: object
                properties:
                  userList:
                    $ref: '#/components/schemas/UserList'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: "queries"
  /queries/zones:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
        - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Zones information Lookup'
      description: 'Used to get a list of identifiers for zones authorized for use by the application.'
      operationId: zonesGET
      responses:
        '200':
          description: 'Successful response to zones request'
          content:
            application/json:
              schema:
                type: object
                properties:
                  zoneList:
                    $ref: '#/components/schemas/ZoneList'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: "queries"
  /queries/zones/{zoneId}:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
        - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Zones information Lookup'
      description: 'Used to get the information for an authorized zone for use by the application.'
      operationId: zonesGetById
      parameters:
        - $ref: '#/components/parameters/Path.ZoneId'
      responses:
        '200':
          description: 'Successful response to an access point Id request'
          content:
            application/json:
              schema:
                type: object
                properties:
                  zoneInfo:
                    $ref: '#/components/schemas/ZoneInfo'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'queries'
  /queries/zones/{zoneId}/accessPoints:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Radio Node Location Lookup'
      description: 'Radio Node Location Lookup to retrieve a list of radio nodes associated to a zone.'
      operationId: apGET
      parameters:
        - $ref: '#/components/parameters/Path.ZoneId'
        - $ref: '#/components/parameters/Query.InterestRealm'
      responses:
        '200':
          description: 'Successful response to an access point Id request'
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessPointList:
                    $ref: '#/components/schemas/AccessPointList'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: "queries"
  /queries/zones/{zoneId}/accessPoints/{accessPointId}:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Radio Node Location Lookup'
      description: 'Radio Node Location Lookup to retrieve a radio node associated to a zone.'
      operationId: apByIdGET
      parameters:
        - $ref: '#/components/parameters/Path.ZoneId'
        - $ref: '#/components/parameters/Path.AccessPointId'
      responses:
        '200':
          description: 'Successful response to an access point Id request'
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessPointInfo:
                    $ref: '#/components/schemas/AccessPointInfo'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'queries'
  /subscriptions/area/circle:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Retrieves all active subscriptions to area change notifications'
      description: 'This operation is used for retrieving all active subscriptions to area change notifications.'
      operationId: areaCircleSubListGET
      responses:
        '200':
          description: 'Response to retrieve area subscriptions'
          content:
            application/json:
              schema:
                type: object
                required:
                  - notificationSubscriptionList
                properties:
                  notificationSubscriptionList:
                    $ref: '#/components/schemas/NotificationSubscriptionList'
                example:
                  notificationSubscriptionList:
                    circleNotificationSubscription:
                    - clientCorrelator: '0123'
                      callbackReference:
                        callbackData: '1234'
                        notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                      address: 'acr:10.0.0.1'
                      checkImmediate: true
                      enteringLeavingCriteria: 'Entering'
                      frequency: 10
                      latitude: -80.88
                      longitude: 41.277
                      radius: 500
                      trackingAccuracy: 10
                      resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123'
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/area/circle'
    post:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Creates a subscription for area change notification'
      description: 'Creates a subscription to the Location Service for an area change notification.'
      operationId: areaCircleSubPOST
      requestBody:
        description: 'Subscription to be created'
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                circleNotificationSubscription:
                  $ref: '#/components/schemas/CircleNotificationSubscription'
              example:
                circleNotificationSubscription:
                  clientCorrelator: '0123'
                  callbackReference:
                    callbackData: '1234'
                    notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                  address: 'acr:10.0.0.1'
                  checkImmediate: true
                  enteringLeavingCriteria: 'Entering'
                  frequency: 10
                  latitude: -80.88
                  longitude: 41.277
                  radius: 500
                  trackingAccuracy: 10
      responses:
        '201':
          description: 'Successful subscription'
          content:
            application/json:
              schema:
                type: object
                properties:
                  circleNotificationSubscription:
                    $ref: '#/components/schemas/CircleNotificationSubscription'
                example:
                  circleNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                    address: 'acr:10.0.0.1'
                    checkImmediate: true
                    enteringLeavingCriteria: 'Entering'
                    frequency: 10
                    latitude: -80.88
                    longitude: 41.277
                    radius: 500
                    trackingAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      callbacks:
        notification:
          '{$request.body#/circleNotificationSubscription.callbackReference.notifyURL}':
            post:
Michel Roy's avatar
Michel Roy committed
              summary: 'Callback POST used to send a notification'
              description: 'Notification from Location service, content based on subscription type'
              operationId: circleNotificationPOST
              requestBody:
Michel Roy's avatar
Michel Roy committed
                description: 'Subscription notification'
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        subscriptionNotification:
                          $ref: '#/components/schemas/SubscriptionNotification'
                      example:
                        subscriptionNotification:
                          enteringLeavingCriteria: 'Entering'
                          isFinalNotification: false,
Michel Roy's avatar
Michel Roy committed
                          link:
Michel Roy's avatar
Michel Roy committed
                            rel: CircleNotificationSubscription
                            href: 'http://meAppServer.example.com/location/v2/subscriptions/area/circle/sub123'
                          terminalLocation:
                            address: 'acr:10.0.0.1'
                            currentLocation:
                              accuracy: 100
                              altitude: 1001.0
                              latitude: -80.86302
                              longitude: 41.277306
                              timestamp:
                                seconds: 1483231138
                                nanoSeconds": 0
                            locationRetrievalStatus: 'Retrieved'
              responses:
                '204':
                  $ref: '#/components/responses/204'
      x-swagger-router-controller: 'subscriptions'
  /subscriptions/area/circle/{subscriptionId}:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Retrieve subscription information'
      description: 'Get subscription information.'
      operationId: areaCircleSubGET
      parameters:
        - $ref: '#/components/parameters/Path.SubscrId'
      responses:
        '200':
          description: 'Subscription information regarding subscription notifications'
          content:
            application/json:
              schema:
                type: object
                required:
                  - circleNotificationSubscription
                properties:
                  circleNotificationSubscription:
                    $ref: '#/components/schemas/CircleNotificationSubscription'
                example:
                  circleNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                    address: 'acr:10.0.0.1'
                    checkImmediate: true
                    enteringLeavingCriteria: 'Entering'
                    frequency: 10
                    latitude: -80.88
                    longitude: 41.277
                    radius: 500
                    trackingAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'subscriptions'
    put:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Updates a subscription information'
      description: 'Updates a subscription.'
      operationId: areaCircleSubPUT
      requestBody:
        description: 'Subscription to be modified'
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                circleNotificationSubscription:
                  $ref: '#/components/schemas/CircleNotificationSubscription'
              example:
                circleNotificationSubscription:
                  clientCorrelator: '0123'
                  callbackReference:
                    callbackData: '1234'
                    notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                  address: 'acr:10.0.0.1'
                  checkImmediate: true
                  enteringLeavingCriteria: 'Entering'
                  frequency: 10
                  latitude: -80.88
                  longitude: 41.277
                  radius: 500
                  trackingAccuracy: 10
                  resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123'
      parameters:
        - $ref: '#/components/parameters/Path.SubscrId'
      responses:
        '200':
          description: 'Successful subscription to response to subscription notifications'
          content:
            application/json:
              schema:
                type: object
                properties:
                  circleNotificationSubscription:
                    $ref: '#/components/schemas/CircleNotificationSubscription'
                example:
                  circleNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                    address: 'acr:10.0.0.1'
                    checkImmediate: true
                    enteringLeavingCriteria: 'Entering'
                    frequency: 10
                    latitude: -80.88
                    longitude: 41.277
                    radius: 500
                    trackingAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'subscriptions'
    delete:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Cancel a subscription'
      description: 'Method to delete a subscription.'
      operationId: areaCircleSubDELETE
      parameters:
        - $ref: '#/components/parameters/Path.SubscrId'
      responses:
        '204':
          $ref: '#/components/responses/204'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'subscriptions'
  /subscriptions/distance:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Retrieves all active subscriptions to distance change notifications'
      description: 'This operation is used for retrieving all active subscriptions to a distance change notifications.'
      operationId: distanceSubListGET
      responses:
        '200':
          description: 'Response to retrieve area subscriptions'
          content:
            application/json:
              schema:
                type: object
                required:
                  - notificationSubscriptionList
                properties:
                  notificationSubscriptionList:
                    $ref: '#/components/schemas/NotificationSubscriptionList'
                example:
                  notificationSubscriptionList:
                    distanceNotificationSubscription:
                    - clientCorrelator: '0123'
                      callbackReference:
                        callbackData: '1234'
                        notifyURL: 'http://clientApp.example.com/location_notifications/123456'
Michel Roy's avatar
Michel Roy committed
                      monitoredAddress:
Michel Roy's avatar
Michel Roy committed
                      - 'acr:10.0.0.1'
                      - 'acr:10.0.0.2'
                      checkImmediate: true
                      criteria: 'AllWithinDistance'
                      distance: 100
                      frequency: 10
                      referenceAddress: 'acr:10.0.0.3'
                      trackingAccuracy: 10
                      resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/distance/sub123'
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/distance'
    post:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Creates a subscription for distance change notification'
      description: 'Creates a subscription to the Location Service for a distance change notification.'
      operationId: distanceSubPOST
      requestBody:
        description: 'Subscription to be created'
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                distanceNotificationSubscription:
                  $ref: '#/components/schemas/DistanceNotificationSubscription'
              example:
                distanceNotificationSubscription:
                  clientCorrelator: '0123'
                  callbackReference:
                    callbackData: '1234'
                    notifyURL: 'http://clientApp.example.com/location_notifications/123456'
Michel Roy's avatar
Michel Roy committed
                  monitoredAddress:
Michel Roy's avatar
Michel Roy committed
                  - 'acr:10.0.0.1'
                  - 'acr:10.0.0.2'
                  checkImmediate: true
                  criteria: 'AllWithinDistance'
                  distance: 100
                  frequency: 10
                  referenceAddress: 'acr:10.0.0.3'
                  trackingAccuracy: 10
      responses:
        '201':
          description: 'Successful subscription'
          content:
            application/json:
              schema:
                type: object
                properties:
                  distanceNotificationSubscription:
                    $ref: '#/components/schemas/DistanceNotificationSubscription'
                example:
                  distanceNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
Michel Roy's avatar
Michel Roy committed
                    monitoredAddress:
Michel Roy's avatar
Michel Roy committed
                    - 'acr:10.0.0.1'
                    - 'acr:10.0.0.2'
                    checkImmediate: true
                    criteria: 'AllWithinDistance'
                    distance: 100
                    frequency: 10
                    referenceAddress: 'acr:10.0.0.3'
                    trackingAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      callbacks:
        notification:
          '{$request.body#/distanceNotificationSubscription.callbackReference.notifyURL}':
            post:
Michel Roy's avatar
Michel Roy committed
              summary: 'Callback POST used to send a notification'
              description: 'Notification from Location service, content based on subscription type'
              operationId: distanceNotificationPOST
              requestBody:
Michel Roy's avatar
Michel Roy committed
                description: 'Subscription notification'
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        subscriptionNotification:
                          $ref: '#/components/schemas/SubscriptionNotification'
                      example:
                        subscriptionNotification:
                          distanceCriteria: 'AllWithinDistance'
                          isFinalNotification: false,
Michel Roy's avatar
Michel Roy committed
                          link:
Michel Roy's avatar
Michel Roy committed
                            rel: DistanceNotificationSubscription
                            href: 'http://meAppServer.example.com/location/v2/subscriptions/distance/sub123'
                          terminalLocation:
                            - address: 'acr:10.0.0.1'
                              currentLocation:
                                accuracy: 100
                                altitude: 1001.0
                                latitude: -80.86302
                                longitude: 41.277306
                                timestamp:
                                  seconds: 1483231138
                                  nanoSeconds": 0
                              locationRetrievalStatus: 'Retrieved'
                            - address: 'acr:10.0.0.2'
                              currentLocation:
                                accuracy: 100
                                altitude: 1001.0
                                latitude: -80.86301
                                longitude: 41.277306
                                timestamp:
                                  seconds: 1483231138
                                  nanoSeconds": 0
                              locationRetrievalStatus: 'Retrieved'
              responses:
                '204':
                  $ref: '#/components/responses/204'
      x-swagger-router-controller: "subscriptions"
  /subscriptions/distance/{subscriptionId}:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Retrieve subscription information'
      description: 'Get subscription information.'
      operationId: distanceSubGET
      parameters:
        - $ref: '#/components/parameters/Path.SubscrId'
      responses:
        '200':
          description: 'Subscription information regarding subscription notifications'
          content:
            application/json:
              schema:
                type: object
                required:
                  - distanceNotificationSubscription
                properties:
                  distanceNotificationSubscription:
                    $ref: '#/components/schemas/DistanceNotificationSubscription'
                example:
                  distanceNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
Michel Roy's avatar
Michel Roy committed
                    monitoredAddress:
Michel Roy's avatar
Michel Roy committed
                    - 'acr:10.0.0.1'
                    - 'acr:10.0.0.2'
                    checkImmediate: true
                    criteria: 'AllWithinDistance'
                    distance: 100
                    frequency: 10
                    referenceAddress: 'acr:10.0.0.3'
                    trackingAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'subscriptions'
    put:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Updates a subscription information'
      description: 'Updates a subscription.'
      operationId: distanceSubPUT
      requestBody:
        description: 'Subscription to be modified'
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                distanceNotificationSubscription:
                  $ref: '#/components/schemas/DistanceNotificationSubscription'
              example:
                distanceNotificationSubscription:
                  clientCorrelator: '0123'
                  callbackReference:
                    callbackData: '1234'
                    notifyURL: 'http://clientApp.example.com/location_notifications/123456'
Michel Roy's avatar
Michel Roy committed
                  monitoredAddress:
Michel Roy's avatar
Michel Roy committed
                  - 'acr:10.0.0.1'
                  - 'acr:10.0.0.2'
                  checkImmediate: true
                  criteria: 'AllWithinDistance'
                  distance: 100
                  frequency: 10
                  referenceAddress: 'acr:10.0.0.3'
                  trackingAccuracy: 10
                  resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123'
      parameters:
        - $ref: '#/components/parameters/Path.SubscrId'
      responses:
        '200':
          description: 'Successful subscription to response to subscription notifications'
          content:
            application/json:
              schema:
                type: object
                properties:
                  distanceNotificationSubscription:
                    $ref: '#/components/schemas/DistanceNotificationSubscription'
                example:
                  distanceNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
Michel Roy's avatar
Michel Roy committed
                    monitoredAddress:
Michel Roy's avatar
Michel Roy committed
                    - 'acr:10.0.0.1'
                    - 'acr:10.0.0.2'
                    checkImmediate: true
                    criteria: 'AllWithinDistance'
                    distance: 100
                    frequency: 10
                    referenceAddress: 'acr:10.0.0.3'
                    trackingAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'subscriptions'
    delete:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Cancel a subscription'
      description: 'Method to delete a subscription.'
      operationId: distanceSubDELETE
      parameters:
        - $ref: '#/components/parameters/Path.SubscrId'
      responses:
        '204':
          $ref: '#/components/responses/204'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'subscriptions'
  /subscriptions/periodic:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Retrieves all active subscriptions to periodic notifications'
      description: 'This operation is used for retrieving all active subscriptions to periodic notifications.'
      operationId: periodicSubListGET
      responses:
        '200':
          description: 'Response to retrieve area subscriptions'
          content:
            application/json:
              schema:
                type: object
                required:
                  - notificationSubscriptionList
                properties:
                  notificationSubscriptionList:
                    $ref: '#/components/schemas/NotificationSubscriptionList'
                example:
                  notificationSubscriptionList:
                    periodicNotificationSubscription:
                    - clientCorrelator: '0123'
                      callbackReference:
                        callbackData: '1234'
                        notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                      address: 'acr:10.0.0.1'
                      frequency: 10
                      requestedAccuracy: 10
                      resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123'
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/periodic'
    post:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Creates a subscription for periodic notification'
      description: 'Creates a subscription to the Location Service for a periodic notification.'
      operationId: periodicSubPOST
      requestBody:
        description: Subscription to be created
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                periodicNotificationSubscription:
                  $ref: '#/components/schemas/PeriodicNotificationSubscription'
              example:
                periodicNotificationSubscription:
                  clientCorrelator: '0123'
                  callbackReference:
                    callbackData: '1234'
                    notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                  address: 'acr:10.0.0.1'
                  frequency: 10
                  requestedAccuracy: 10
      responses:
        '201':
          description: 'Successful subscription'
          content:
            application/json:
              schema:
                type: object
                properties:
                  periodicNotificationSubscription:
                    $ref: '#/components/schemas/PeriodicNotificationSubscription'
                example:
                  periodicNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                    address: 'acr:10.0.0.1'
                    frequency: 10
                    requestedAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      callbacks:
        notification:
          '{$request.body#/periodicNotificationSubscription.callbackReference.notifyURL}':
            post:
Michel Roy's avatar
Michel Roy committed
              summary: 'Callback POST used to send a notification'
              description: 'Notification from Location service, content based on subscription type'
              operationId: periodicNotificationPOST
              requestBody:
Michel Roy's avatar
Michel Roy committed
                description: 'Subscription notification'
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        subscriptionNotification:
                          $ref: '#/components/schemas/SubscriptionNotification'
                      example:
                        subscriptionNotification:
                          isFinalNotification: false,
Michel Roy's avatar
Michel Roy committed
                          link:
Michel Roy's avatar
Michel Roy committed
                            rel: PeriodicNotificationSubscription
                            href: 'http://meAppServer.example.com/location/v2/subscriptions/periodic/sub123'
                          terminalLocation:
                            address: 'acr:10.0.0.1'
                            currentLocation:
                              accuracy: 100
                              altitude: 1001.0
                              latitude: -80.86302
                              longitude: 41.277306
                              timestamp:
                                seconds: 1483231138
                                nanoSeconds": 0
                            locationRetrievalStatus: 'Retrieved'
              responses:
                '204':
                  $ref: '#/components/responses/204'
      x-swagger-router-controller: 'subscriptions'
  /subscriptions/periodic/{subscriptionId}:
    get:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Retrieve subscription information'
      description: 'Get subscription information.'
      operationId: periodicSubGET
      parameters:
        - $ref: '#/components/parameters/Path.SubscrId'
      responses:
        '200':
          description: 'Subscription information regarding subscription notifications'
          content:
            application/json:
              schema:
                type: object
                required:
                  - periodicNotificationSubscription
                properties:
                  periodicNotificationSubscription:
                    $ref: '#/components/schemas/PeriodicNotificationSubscription'
                example:
                  periodicNotificationSubscription:
                    clientCorrelator: '0123'
                    callbackReference:
                      callbackData: '1234'
                      notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                    address: 'acr:10.0.0.1'
                    frequency: 10
                    requestedAccuracy: 10
                    resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: 'subscriptions'
    put:
      tags:
Michel Roy's avatar
Michel Roy committed
      - 'location'
Michel Roy's avatar
Michel Roy committed
      summary: 'Updates a subscription information'
      description: 'Updates a subscription.'
      operationId: periodicSubPUT
      requestBody:
        description: 'Subscription to be modified'
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                periodicNotificationSubscription:
                  $ref: '#/components/schemas/PeriodicNotificationSubscription'
              example:
                periodicNotificationSubscription:
                  clientCorrelator: '0123'
                  callbackReference:
                    callbackData: '1234'
                    notifyURL: 'http://clientApp.example.com/location_notifications/123456'
                  address: 'acr:10.0.0.1'
                  frequency: 10
                  requestedAccuracy: 10
                  resourceURL: 'http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123'
      parameters: