LocationAPI.json 152 KB
Newer Older
Michel Roy's avatar
Michel Roy committed
1
{
Muhammad Hamza's avatar
Muhammad Hamza committed
2
  "openapi": "3.1.0",
Michel Roy's avatar
Michel Roy committed
3
  "info": {
Michel Roy's avatar
Michel Roy committed
4
5
6
    "contact": {
      "url": "https://forge.etsi.org/rep/mec/gs013-location-api"
    },
Michel Roy's avatar
Michel Roy committed
7
    "title": "ETSI GS MEC 013 - Location API",
8
    "version": "2.2.1",
Michel Roy's avatar
Michel Roy committed
9
    "description": "The ETSI MEC ISG MEC013 Location API described using OpenAPI.",
Michel Roy's avatar
Michel Roy committed
10
11
12
13
14
15
    "license": {
      "name": "BSD-3-Clause",
      "url": "https://forge.etsi.org/legal-matters"
    }
  },
  "externalDocs": {
16
17
    "description": "ETSI MEC013 V2.2.1 Location API",
    "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/02.02.01_60/gs_mec013v020201p.pdf"
Michel Roy's avatar
Michel Roy committed
18
19
20
  },
  "servers": [
    {
Michel Roy's avatar
Michel Roy committed
21
22
23
24
25
26
      "url": "https://localhost/location/v2"
    }
  ],
  "tags": [
    {
      "name": "location"
Michel Roy's avatar
Michel Roy committed
27
28
29
30
31
    }
  ],
  "paths": {
    "/queries/distance": {
      "get": {
32
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
        "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": {
90
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
        "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": {
145
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
        "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": {
189
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
        "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": {
238
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
        "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": {
290
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
        "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": {
342
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
343
344
345
346
347
348
349
350
351
352
        "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",
353
                  "required": ["notificationSubscriptionList"],
Michel Roy's avatar
Michel Roy committed
354
355
356
357
358
                  "properties": {
                    "notificationSubscriptionList": {
                      "$ref": "#/components/schemas/NotificationSubscriptionList"
                    }
                  },
Muhammad Hamza's avatar
Muhammad Hamza committed
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
                  "examples": [
                    {
                      "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"
                      }
Michel Roy's avatar
Michel Roy committed
382
                    }
Muhammad Hamza's avatar
Muhammad Hamza committed
383
                  ]
Michel Roy's avatar
Michel Roy committed
384
385
386
387
388
389
390
                }
              }
            }
          }
        }
      },
      "post": {
391
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
        "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"
                  }
                },
Muhammad Hamza's avatar
Muhammad Hamza committed
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
                "examples": [
                  {
                    "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
                    }
Michel Roy's avatar
Michel Roy committed
424
                  }
Muhammad Hamza's avatar
Muhammad Hamza committed
425
                ]
Michel Roy's avatar
Michel Roy committed
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "circleNotificationSubscription": {
                      "$ref": "#/components/schemas/CircleNotificationSubscription"
                    }
                  },
Muhammad Hamza's avatar
Muhammad Hamza committed
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
                  "examples": [
                    {
                      "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"
                      }
Michel Roy's avatar
Michel Roy committed
460
                    }
Muhammad Hamza's avatar
Muhammad Hamza committed
461
                  ]
Michel Roy's avatar
Michel Roy committed
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
                }
              }
            }
          },
          "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
489
490
491
                "summary": "Callback POST used to send a notification",
                "description": "Notification from Location service, content based on subscription type",
                "operationId": "circleNotificationPOST",
Michel Roy's avatar
Michel Roy committed
492
493
494
495
496
497
498
499
500
501
502
503
                "requestBody": {
                  "description": "Subscription notification",
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "subscriptionNotification": {
                            "$ref": "#/components/schemas/SubscriptionNotification"
                          }
                        },
Muhammad Hamza's avatar
Muhammad Hamza committed
504
505
506
507
508
509
510
511
                        "examples": [
                          {
                            "subscriptionNotification": {
                              "enteringLeavingCriteria": "Entering",
                              "isFinalNotification": "false,",
                              "link": {
                                "rel": "CircleNotificationSubscription",
                                "href": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/sub123"
Michel Roy's avatar
Michel Roy committed
512
                              },
Muhammad Hamza's avatar
Muhammad Hamza committed
513
514
515
516
517
518
519
520
521
522
523
524
525
526
                              "terminalLocation": {
                                "address": "acr:10.0.0.1",
                                "currentLocation": {
                                  "accuracy": 100,
                                  "altitude": 1001,
                                  "latitude": -80.86302,
                                  "longitude": 41.277306,
                                  "timestamp": {
                                    "seconds": 1483231138,
                                    "nanoSeconds\"": 0
                                  }
                                },
                                "locationRetrievalStatus": "Retrieved"
                              }
Michel Roy's avatar
Michel Roy committed
527
528
                            }
                          }
Muhammad Hamza's avatar
Muhammad Hamza committed
529
                        ]
Michel Roy's avatar
Michel Roy committed
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
                      }
                    }
                  }
                },
                "responses": {
                  "204": {
                    "$ref": "#/components/responses/204"
                  }
                }
              }
            }
          }
        },
        "x-swagger-router-controller": "subscriptions"
      }
    },
    "/subscriptions/area/circle/{subscriptionId}": {
      "get": {
548
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
        "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",
564
                  "required": ["circleNotificationSubscription"],
Michel Roy's avatar
Michel Roy committed
565
566
567
568
569
                  "properties": {
                    "circleNotificationSubscription": {
                      "$ref": "#/components/schemas/CircleNotificationSubscription"
                    }
                  },
Muhammad Hamza's avatar
Muhammad Hamza committed
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
                  "examples": [
                    {
                      "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"
                      }
Michel Roy's avatar
Michel Roy committed
588
                    }
Muhammad Hamza's avatar
Muhammad Hamza committed
589
                  ]
Michel Roy's avatar
Michel Roy committed
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
                }
              }
            }
          },
          "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": {
616
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
        "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"
                  }
                },
Muhammad Hamza's avatar
Muhammad Hamza committed
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
                "examples": [
                  {
                    "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"
                    }
Michel Roy's avatar
Michel Roy committed
650
                  }
Muhammad Hamza's avatar
Muhammad Hamza committed
651
                ]
Michel Roy's avatar
Michel Roy committed
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
              }
            }
          }
        },
        "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"
                    }
                  },
Muhammad Hamza's avatar
Muhammad Hamza committed
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
                  "examples": [
                    {
                      "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"
                      }
Michel Roy's avatar
Michel Roy committed
691
                    }
Muhammad Hamza's avatar
Muhammad Hamza committed
692
                  ]
Michel Roy's avatar
Michel Roy committed
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
                }
              }
            }
          },
          "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": {
725
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
        "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": {
756
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
757
758
759
760
761
762
763
764
765
766
        "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",
767
                  "required": ["notificationSubscriptionList"],
Michel Roy's avatar
Michel Roy committed
768
769
770
771
772
                  "properties": {
                    "notificationSubscriptionList": {
                      "$ref": "#/components/schemas/NotificationSubscriptionList"
                    }
                  },
Muhammad Hamza's avatar
Muhammad Hamza committed
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
                  "examples": [
                    {
                      "notificationSubscriptionList": {
                        "distanceNotificationSubscription": [
                          {
                            "clientCorrelator": "0123",
                            "callbackReference": {
                              "callbackData": "1234",
                              "notifyURL": "http://clientApp.example.com/location_notifications/123456"
                            },
                            "monitoredAddress": [
                              "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"
                      }
Michel Roy's avatar
Michel Roy committed
798
                    }
Muhammad Hamza's avatar
Muhammad Hamza committed
799
                  ]
Michel Roy's avatar
Michel Roy committed
800
801
802
803
804
805
806
                }
              }
            }
          }
        }
      },
      "post": {
807
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
        "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"
                  }
                },
Muhammad Hamza's avatar
Muhammad Hamza committed
823
824
825
826
827
828
829
830
                "examples": [
                  {
                    "distanceNotificationSubscription": {
                      "clientCorrelator": "0123",
                      "callbackReference": {
                        "callbackData": "1234",
                        "notifyURL": "http://clientApp.example.com/location_notifications/123456"
                      },
831
                      "monitoredAddress": ["acr:10.0.0.1", "acr:10.0.0.2"],
Muhammad Hamza's avatar
Muhammad Hamza committed
832
833
834
835
836
837
838
                      "checkImmediate": true,
                      "criteria": "AllWithinDistance",
                      "distance": 100,
                      "frequency": 10,
                      "referenceAddress": "acr:10.0.0.3",
                      "trackingAccuracy": 10
                    }
Michel Roy's avatar
Michel Roy committed
839
                  }
Muhammad Hamza's avatar
Muhammad Hamza committed
840
                ]
Michel Roy's avatar
Michel Roy committed
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "distanceNotificationSubscription": {
                      "$ref": "#/components/schemas/DistanceNotificationSubscription"
                    }
                  },
Muhammad Hamza's avatar
Muhammad Hamza committed
857
858
859
860
861
862
863
864
                  "examples": [
                    {
                      "distanceNotificationSubscription": {
                        "clientCorrelator": "0123",
                        "callbackReference": {
                          "callbackData": "1234",
                          "notifyURL": "http://clientApp.example.com/location_notifications/123456"
                        },
865
                        "monitoredAddress": ["acr:10.0.0.1", "acr:10.0.0.2"],
Muhammad Hamza's avatar
Muhammad Hamza committed
866
867
868
869
870
871
872
873
                        "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"
                      }
Michel Roy's avatar
Michel Roy committed
874
                    }
Muhammad Hamza's avatar
Muhammad Hamza committed
875
                  ]
Michel Roy's avatar
Michel Roy committed
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
                }
              }
            }
          },
          "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
903
904
905
                "summary": "Callback POST used to send a notification",
                "description": "Notification from Location service, content based on subscription type",
                "operationId": "distanceNotificationPOST",
Michel Roy's avatar
Michel Roy committed
906
907
908
909
910
911
912
913
914
915
916
917
                "requestBody": {
                  "description": "Subscription notification",
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "subscriptionNotification": {
                            "$ref": "#/components/schemas/SubscriptionNotification"
                          }
                        },
Muhammad Hamza's avatar
Muhammad Hamza committed
918
919
920
921
922
923
924
925
                        "examples": [
                          {
                            "subscriptionNotification": {
                              "distanceCriteria": "AllWithinDistance",
                              "isFinalNotification": "false,",
                              "link": {
                                "rel": "DistanceNotificationSubscription",
                                "href": "http://meAppServer.example.com/location/v2/subscriptions/distance/sub123"
Michel Roy's avatar
Michel Roy committed
926
                              },
Muhammad Hamza's avatar
Muhammad Hamza committed
927
928
929
930
931
932
933
934
935
936
937
938
939
940
                              "terminalLocation": [
                                {
                                  "address": "acr:10.0.0.1",
                                  "currentLocation": {
                                    "accuracy": 100,
                                    "altitude": 1001,
                                    "latitude": -80.86302,
                                    "longitude": 41.277306,
                                    "timestamp": {
                                      "seconds": 1483231138,
                                      "nanoSeconds\"": 0
                                    }
                                  },
                                  "locationRetrievalStatus": "Retrieved"
Michel Roy's avatar
Michel Roy committed
941
                                },
Muhammad Hamza's avatar
Muhammad Hamza committed
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
                                {
                                  "address": "acr:10.0.0.2",
                                  "currentLocation": {
                                    "accuracy": 100,
                                    "altitude": 1001,
                                    "latitude": -80.86301,
                                    "longitude": 41.277306,
                                    "timestamp": {
                                      "seconds": 1483231138,
                                      "nanoSeconds\"": 0
                                    }
                                  },
                                  "locationRetrievalStatus": "Retrieved"
                                }
                              ]
                            }
Michel Roy's avatar
Michel Roy committed
958
                          }
Muhammad Hamza's avatar
Muhammad Hamza committed
959
                        ]
Michel Roy's avatar
Michel Roy committed
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
                      }
                    }
                  }
                },
                "responses": {
                  "204": {
                    "$ref": "#/components/responses/204"
                  }
                }
              }
            }
          }
        },
        "x-swagger-router-controller": "subscriptions"
      }
    },
    "/subscriptions/distance/{subscriptionId}": {
      "get": {
978
        "tags": ["location"],
Michel Roy's avatar
Michel Roy committed
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
        "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",
994
                  "required": ["distanceNotificationSubscription"],
Michel Roy's avatar
Michel Roy committed
995
996
997
998
999
                  "properties": {
                    "distanceNotificationSubscription": {
                      "$ref": "#/components/schemas/DistanceNotificationSubscription"
                    }
                  },
Muhammad Hamza's avatar
Muhammad Hamza committed
1000
                  "examples": [
For faster browsing, not all history is shown. View entire blame