forked from mappls-api/mapmyindia-intouch-rest-apis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIoT-telematics-03032020.yaml
1368 lines (1360 loc) · 50.7 KB
/
IoT-telematics-03032020.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
90
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
145
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
189
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
238
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
290
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
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
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
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
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
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
725
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
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
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
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
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
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.1
info:
title: Intouch IoT Telematics APIs
description: >-
A set of powerful telematics APIs which users can use to get all the data
related to their devices such as live location,trails,alarms etc. These
telematics APIs are powered by MapmyIndia's own INTOUCH platform. MapmyIndia InTouch easily integrates into existing cloud services via our tracking & telematics APIs. The API & SDK libraries provide powerful, efficient and accurate positioning for the IoT devices on InTouch applications for Android, iOS and the web. You can
find out more about Intouch at
[http://mapmyindia.com/intouch](http://mapmyindia.com/intouch)
termsOfService: 'https://www.mapmyindia.com/about/terms-conditions'
contact:
email: apisupport@mapmyindia.com
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
version: 1.0.0
externalDocs:
description: More About Telematics APIs.
url: 'https://www.mapmyindia.com/intouch/#telematics-tracking'
servers:
- url: 'https://intouch.mapmyindia.com/iot/api'
tags:
# - name: Telematics APIs
# description: Everything about your Devices
# externalDocs:
# description: Find out more
# url: 'https://www.mapmyindia.com/intouch/#telematics-tracking'
- name: Intouch IoT Apps
description: Everything about IoT apps powered by Intouch
externalDocs:
description: Find out more
url: 'https://www.mapmyindia.com/intouch/'
paths:
/device:
get:
tags:
- devices
summary: Gets the live data of devices.
description: "This API returns accurate live location and related data of vehicles, assets & people with help of connected devices/sensors/mobiles to provide location awareness to users of your app. The API provides real-time visibility of your tracked objects, giving not just location information, but multiple additional fields which add value to your application. The API is capable of being used for multiple use cases: be it for transport - logistics or for personnel information services for all kinds of web or mobile development platforms."
operationId: getDeviceById
parameters:
- name: id
in: query
description: This is the device's ID, a non-mandatory parameter. If not passed then by default the API will return the list of all active devices in the account.
required: false
schema:
type: integer
format: int64
- name: includeInActive
in: query
description: Non mandatory boolean field. If this field is not sent then by default API response will send all active devices. If "true" then API reponse will have inactive devices along with active devices. If "false" then API will return only active devices
required: false
schema:
type: boolean
- name: ignoreBeacon
in: query
required: false
description: Non mandatory field. If set to true then API will return all devices except those whose device type is beacon(mobile).
schema:
type: boolean
- name: state
in: query
required: false
description: Non mandatory field. Input timestamp in this field to fetch only those live locations of devices which have come after the input timestamp. If "state" is sent then by default only active devices will be fetched irrespective of the status of "includeInActive" attribute.
schema:
type: number
responses:
'200':
description: OK - successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
'400':
description: Bad Request - Invalid device ID supplied or invalid data type. For example, input attribute "id" is integer but string value gets passed.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
'401':
description: Unauthorized Request. Access to API is forbidden.
#content:
# application/json:
# schema:
# $ref: '#/components/schemas/ApiResponse'
'404':
description: Not Found - URL Not Found
#content:
# application/json:
# schema:
# $ref: '#/components/schemas/ApiResponse'
'203':
description: Device Not Found
# security:
# - api_key: []
/device/drive:
get:
tags:
- drives
summary: Gets drive details of a device.
description: "This API is used to request the drive details of a vehicle in an account on our telematics platform. A vehicle can be a device/sensor connected to our telematics platform directly or via a third party data aggregator who utilises our telematics platform for tracking services. Drive is a list of reported geo-positions of any object (such as vehicles, assets or people) according to pre-defined conditions"
operationId: getDrives
parameters:
- name: deviceId
in: query
description: ID of the device for which the drives need to be fetched
required: true
schema:
type: integer
- name: startTime
in: query
description: The starting timsstamp from which the drives need to be fetched.
required: true
schema:
type: number
- name: endTime
in: query
description: The end timestamp till which the drives need to be fetched.
required: true
schema:
type: number
#- name: projection
# in: query
# required: false
# description: Input comma separated column values.
# schema:
# type: string
responses:
'200':
description: OK - successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceDrive'
'400':
description: Bad Request - Invalid device ID supplied or invalid data type. For example, input attribute "id" is integer but string value gets passed.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
'401':
description: Unauthorized Request. Access to API is forbidden.
#content:
# application/json:
# schema:
# $ref: '#/components/schemas/ApiResponse'
'404':
description: Not Found - URL Not Found
#content:
# application/json:
# schema:
# $ref: '#/components/schemas/ApiResponse'
'203':
description: Device Not Found
# security:
# - api_key: []
/device/{deviceId}/events:
get:
tags:
- events
summary: Gets the historical location events of a device.
description: "This API is used to get the historical location information as well as related additional information for a vehicle. This API can be used thus to create customized reports for users of your apps for different use cases, e.g.: plot the vehicle's past movements on map or get a historical graph of change in a vehicle's altitude."
operationId: getLocationEvents
parameters:
- name: deviceId
in: path
description: ID of the device for which the events need to be fetched
required: true
schema:
type: integer
- name: startTime
in: query
description: The starting timsstamp from which the events need to be fetched.
required: true
schema:
type: number
- name: endTime
in: query
description: The end timestamp till which the events need to be fetched.
required: true
schema:
type: number
- name: skipPeriod
in: query
example: 2
description: Defined in minitues. For example, if say 2 is passed then each returned data packet will have a minimum difference of 2 mins.
required: false
schema:
type: integer
#- name: projection
# in: query
# example: gpsFix, heading, speed
# description: User can pass a list of column names which he wants to fetch in the API response.
# required: false
# schema:
# type: string
responses:
'200':
description: OK - successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceEvents'
'400':
description: Bad Request - Invalid device ID supplied or invalid data type. For example, input attribute "id" is integer but string value gets passed.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
'401':
description: Unauthorized Request. Access to API is forbidden.
#content:
# application/json:
# schema:
# $ref: '#/components/schemas/ApiResponse'
'404':
description: Not Found - URL Not Found
#content:
# application/json:
# schema:
# $ref: '#/components/schemas/ApiResponse'
'203':
description: Device Not Found
/alarm:
post:
tags:
- alarm
summary: This API will create an alarm.
description: Based on the input parameters provided to this POST alarm API, a new alarm will get created for a single or multiple devices
operationId: createAlarm
requestBody:
description: Alarm object that needs to be added to the store
content:
application/form-data:
schema:
properties:
alarmType:
type: integer
example: 26
description: "Type of alarm to create. Following are the alarm types & their corresponding IDs.<br> IGNITION: 21, OVERSPEED: 22, UNPLUGGED: 23, PANIC: 24, GEOFENCE: 26, STOPPAGE: 27, IDLE: 28, TOWING: 29, GPRS CONNECTIVITY: 126, VEHICLE BATTERY: 129, MILEAGE: 133, GPS CONNECTIVITY: 146, DISTANCE COVERED: 151, INTERNAL BATTERY VOLTAGE:161"
deviceId:
type: array
items:
type: number
example: [1009,9090]
description: Device IDs of those devices for which the alarm configuration is done.
type:
type: integer
example: 1
description: "For Geofence(alarmType = 26), value of type are as follows:<br>2 - entry, 3 - Exit, 1 - Entry & Exit, 4 - long stay in geofence<br>For ignition(alarmType = 21), types values are as follows:<br>1 - Both ON & OFF, 2 - Ignition On, 3 - Ignition Off, 5 - Day's First Ignition ON<br> For mileage(alarmType = 133), value of type are as follows:<br> 0 - Daily, 1 - Monthly<br>For DIstance Covered(alarmType = 151), value of type are as follows:<br> 1 - At Least, 2 - At Most"
duration:
type: integer
example: 11
description: "Only required in case of overspeed, stoppage, idle, towing, GPRS connectivity, vehicle battery, GPS connectivity, distance covered, internal battery alarm"
limit:
type: integer
example: 55
description: "Only required in case of overspeed, vehicle battery, mileage, distance covered, internal battery alarm"
geofenceId:
type: array
items:
type: number
example: [23434,45454]
description: "Only required when alarmType is 26 (Geofence). You can pass a single geofence ID or multiple geofence IDs separated by comma"
severity:
type: integer
example: 0
description: "This basically defines the severity of the alarm. You can pass 0 for normal severity & 1 for high severity."
responses:
'201':
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
'203':
description: Device Not Found
#security:
# - api_key: []
get:
tags:
- alarm
summary: This API will get all the alarm configurations for a user.
description: Based on the passed token key, the API will return the list of all alarm configs.
parameters:
- name: id
in: query
example: 23889,89876
description: This is the alarm's ID, a non-mandatory parameter. If not passed then by default the API will return the list of all alarm configurations in the account. You can pass single value or comma separated alarm IDs for multiple values.
required: false
schema:
type: string
items:
type: number
- name: deviceId
in: query
example: 24567,10018
description: This is device ID. API will return data based on the configs set for the passed device IDs. You can pass a single device ID or comma seperated multiple device IDs.
required: false
schema:
type: string
items:
type: number
- name: alarmType
in: query
example: 177,90
description: This is alarm type. API will return data based on the passed alarm types. You can pass a single alarm type or comma seperated multiple alarm types.
required: false
schema:
type: string
items:
type: number
responses:
'200':
description: OK - successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/AlarmConfig'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
'203':
description: Device Not Found
/alarm/{id}:
post:
tags:
- alarm
summary: Updates An Alarm Config
parameters:
- name: id
in: path
description: Mandatory field. This is the ID of the alarm config which needs to be updated.
required: true
schema:
type: integer
requestBody:
description: Alarm object that needs to be added to the store
content:
application/form-data:
schema:
properties:
deviceId:
type: array
items:
type: number
example: [6678,9876]
description: ID of the device for which the alarm config has to be updated. If there are multiple devices then you can pass them separated by comma.
type:
type: integer
example: 1
description: "For Geofence(alarmType = 26), value of type are as follows:<br>2 - entry, 3 - Exit, 1 - Entry & Exit, 4 - long stay in geofence<br>For ignition(alarmType = 21), types values are as follows:<br>1 - Both ON & OFF, 2 - Ignition On, 3 - Ignition Off, 5 - Day's First Ignition ON<br> For mileage(alarmType = 133), value of type are as follows:<br> 0 - Daily, 1 - Monthly<br>For DIstance Covered(alarmType = 151), value of type are as follows:<br> 1 - At Least, 2 - At Most"
duration:
type: integer
example: 11
description: "Only required in case of overspeed, stoppage, idle, towing, GPRS connectivity, vehicle battery, GPS connectivity, distance covered, internal battery alarm"
limit:
type: integer
example: 55
description: "Only required in case of overspeed, vehicle battery, mileage, distance covered, internal battery alarm"
geofenceId:
type: array
items:
type: number
example: [23434,45454]
description: "Only required when alarmType is 26 (Geofence). You can pass a single geofence ID or multiple geofence IDs separated by comma"
severity:
type: integer
example: 0
description: "This basically defines the severity of the alarm. You can pass 0 for normal severity & 1 for high severity."
responses:
'200':
description: OK - successful operation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: URL Not Found
'403':
description: ID Not Found
delete:
tags:
- alarm
summary: Deletes An Alarm Config
parameters:
- name: id
in: path
description: id of the alarm config which you want to delete
required: true
schema:
type: integer
responses:
'200':
description: OK - successful operation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: URL Not Found
'204':
description: No Content Found
/alarm/alarmLog/:
get:
tags:
- alarm
summary: Gets The List Of Alarm Config(s)
parameters:
- name: deviceId
in: query
description: Not Mandatory field. This is the ID of the device for which the alarm log need to be fetched. You can pass single device ID or multiple device IDs separated by comma
required: false
example: 1909,2545
schema:
type: string
items:
type: number
- name: alarmType
in: query
description: "Not Mandatory field. This is the type of alarm for which the alarm log need to be fetched. You can pass single alarm type or multiple device IDs separated by comma.<br> Type of alarm to create. Following are the alarm types & their corresponding IDs.<br> IGNITION: 21, OVERSPEED: 22, UNPLUGGED: 23, PANIC: 24, GEOFENCE: 26, STOPPAGE: 27, IDLE: 28, TOWING: 29, GPRS CONNECTIVITY: 126, VEHICLE BATTERY: 129, MILEAGE: 133, GPS CONNECTIVITY: 146, DISTANCE COVERED: 151, INTERNAL BATTERY VOLTAGE:161"
required: false
example: 21,26
schema:
type: string
items:
type: integer
- name: startTime
in: query
description: Mandatory field. This is start timestamp in seconds
required: true
schema:
type: number
- name: endTime
in: query
description: Mandatory field. This is end timestamp in seconds
required: true
schema:
type: number
responses:
'200':
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/AlertObject'
description: OK - successful operation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
'203':
description: Device Not Found
/geofence/:
summary: Geofence APIs
description: "The geofence APIs allow you to manage virtual geographical areas or geofences for your account on MapmyIndia's telematics platform. Geographic areas are defined as geometries in the form of geographic polygons, circles, or points that are relevant for any connected device/sensor: The presence or absence (entry or exit) of a vehicle to such geographic areas needs to be monitored and/or events generated on the basis of such transitions. The events might be alarms or reports of vehicles entering or exiting such geofences. These Geofence APIs allow you to create/edit/assign/delink/update geofences."
get:
tags:
- geofence
summary: Gets All The Configured Geofence(s)
description: "This API returns the list of all the configured geofences "
parameters:
- name: ignoreGeometry
in: query
example: false
description: Flag to get geometry data.
required: false
schema:
type: boolean
responses:
'200':
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GeofenceObject'
description: OK - successful operation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
'203':
description: Device Not Found
post:
tags:
- geofence
summary: Create A New Geofence
description: "This API helps to create a new geofence"
requestBody:
content:
application/form-data:
schema:
properties:
name:
type: string
description: "Name of the geofence."
example: "market"
buffer:
type: integer
example: 1000
description: "Buffer is nothing but radius in meters. If passed then by default the system will create a circle geofence. If buffer is not passed then by default the system will create a 'point' type geofence with radius as 50 meters"
geometry:
type: string
example: {"type":"Point","coordinates":[77.2334,28.7676]}
description: "This is a geoJSON string. You can pass here either 'Point' or 'Polygon'. Point is used for circular geofence, and Polygon is used for a multiple point polygon geofence"
responses:
'201':
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
'203':
description: Device Not Found
/geofence/{id}:
get:
tags:
- geofence
summary: Get A Single Or Multiple Geofence(s).
description: "This API helps to fetch the details of a particular geofence"
parameters:
- name: id
in: path
description: geofence id. This path variable will take precedence even if multiple geofence ids are passed in the query param.
required: true
schema:
type: integer
- name: id
in: query
description: geofence id. Use this if you want to get details of specific multiple geofence IDs.
required: false
schema:
type: string
items:
type: number
example: 51777,89777
- name: ignoreGeometry
in: query
description: Non mandatory field, boolean value to fetch geometry details.
required: false
example: false
schema:
type: boolean
responses:
'200':
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GeofenceObject'
description: OK - successful operation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
'203':
description: Device Not Found
post:
tags:
- geofence
summary: Update A Geofence.
description: This API helps to update a particular geofence.
parameters:
- name: id
in: path
description: geofence id.
required: true
schema:
type: integer
requestBody:
description: Form data to be passed to update a geofence.
content:
application/form-data:
schema:
properties:
name:
type: string
description: "Name of the geofence."
example: "market"
buffer:
type: integer
example: 1000
description: "Buffer is nothing but radius in meters. If passed then by default the system will create a circle geofence. If buffer is not passed then by default the system will create a 'point' type geofence with radius as 50 meters"
geometry:
type: string
example: {"type":"Point","coordinates":[77.2334,28.7676]}
description: "This is a geoJSON string. You can pass here either 'Point' or 'Polygon'. Point is used for circular geofence, and Polygon is used for a multiple point polygon geofence"
responses:
'200':
description: OK - successful operation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
delete:
tags:
- geofence
summary: Delete A Geofence.
description: This API helps to delete a geofence.
parameters:
- name: id
in: path
description: geofence id.
required: true
schema:
type: integer
responses:
'200':
description: OK - successful operation
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
description: Bad Request - Invalid ID supplied or invalid data type.
'401':
description: Unauthorized Request. Access to API is forbidden.
'404':
description: Not Found - URL Not Found
components:
schemas:
DeviceEvents:
type: object
properties:
data:
type: object
properties:
drivingBehaviourCount:
type: object
properties:
haCount:
type: integer
example: 2
description: Harsh Acceleration Count
hbCount:
type: integer
example: 1
description: Harsh Breaking Count
hcCount:
type: integer
example: 3
description: Harsh Cornering Count
summary:
type: object
properties:
distance:
type: number
example: 23.67
description: Total Drive Distance in KMs
duration:
type: number
example: 300
description: Total drive duration in seconds
avgSpeed:
type: number
example: 45.54
description: Average speed in km/hr
startAddress:
type: string
example: >-
213, 1st Cross Road, HAL Stage 2, Indiranagar, Bengaluru,
Karnataka. 15 m from The Bodhi Tree pin-560038 (India)
endAddress:
type: string
example: >-
3645, 13th F Main Road, Dupanahalli, Indiranagar, Bengaluru,
Karnataka. 12 m from Meenakshi Enclave pin-560038 (India)
startTimestamp:
type: number
example: 1577644204
description: "Start time of the device i,e the time at which the data first came from the device for the selected day."
endTimestamp:
type: number
example: 1577684913
description: "End time of the device i,e the time at which the last data came from the device for the selected day."
positionList:
type: array
items:
$ref: '#/components/schemas/DeviceLocationEvents'
DeviceLocationEvents:
type: object
properties:
address:
type: string
example: >-
213, 1st Cross Road, HAL Stage 2, Indiranagar, Bengaluru, Karnataka.
15 m from The Bodhi Tree pin-560038 (India)
description: Address of the location event
timestamp:
type: number
example: 1574937348
longitude:
type: number
example: 77.74937348
latitude:
type: number
example: 55.74937348
heading:
type: number
example: 298
description: device heading direction in degrees from North.
speed:
type: number
example: 33.33
description: Device speed at this particular location
ignition:
type: number
example: 0
description: whether vehicle ignition is On or Off. 0 means ignition is OFF and 1 means ignition is ON.
powerSupplyVoltage:
type: number
example: 12769
description: battery voltage value in milli volts.
gpsFix:
type: boolean
example: true
description: GPS is fix or not for the device. true meanse GPS is fixed and false means GPS is not fixed.
validGPS:
type: boolean
example: true
description: Checks whether GPS is valid or not.
enum:
- true
- false
accOff:
type: boolean
description: checks for whether adaptive cruise control is enabled or not.
example: true
enum:
- true
- false
movementStatus:
type: integer
example: 1
description: "Checks the movement status of the device. 1:Moving 2:Idle 3:Stopped 4:Towing 5:No Data 6:Power Off 7:No Gps 8:On Trip 9:Free Vehicle"
durationTime:
type: number
example: 670
description: duration(in secsonds) time spent at current location
greenDriveType:
type: string
example: HA
description: 'HA(Harsh acceleration), HB(Harsh Breaking), HC(Harsh Cornering)'
tripStatus:
type: integer
example: 0
description: '0 - On Trip, 1 - Free Vehicle'
enum:
- On Trip
- Free Vehicle
mobileInfo:
type: object
properties:
locationSource:
type: number
example: 0
description: >-
1 - GPS connected, distanceaccuracy less that 50mtrs, 2 - GPRS
connected, distance accracy more than 50 mtr.
enum:
- GPS Connected
- GPRS Connected
mockLocation:
type: boolean
example: true
description: >-
true - mock location being sent by the user. false - real
location being sent by the user.
isAirplanemode:
type: boolean
example: true
description: >-
Checks whether mobile's airplane mode is ON(i,e true) or OFF(i,e
false)
callStatus:
type: number
example: 0
description: '0-CALL_STATE_IDLE, 1-CALL_STATE_RINGING, 2-CALL_STATE_OFFHOOK'
enum:
- CALL_STATE_IDLE
- CALL_STATE_RINGING
- CALL_STATE_OFFHOOK
deviceStatus:
type: integer
example: 0
description: >-
status of the device in the current location. Values as
mentioned in the below enum are possible.
enum:
- IN_VEHICLE
- ON_BICYCLE
- ON_FOOT
- STILL
- UNKNOWN
- TILTING
- WALKING
- RUNNING
phoneEvent:
type: integer
example: 5
description: >-
Checks the location permission that the user enables/disables in
the mobile phone.
enum:
- EVENT_LOCATION_PERMISSION_DENIED = 5
- EVENT_LOCATION_PROVIDER_OFF = 6
- EVENT_LOCATION_STOP_PROGRAMMATICALLY = 7
alerts:
$ref: '#/components/schemas/AlertObject'
DeviceDrive:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DriveData'
xml:
name: Device
DriveData:
type: object
properties:
deviceId:
type: number
example: 67790
description: Your Device's ID.
location:
type: object
properties:
startAddress:
type: string
example: >-
3605, 13th G Main Road, HAL Stage 2, Indiranagar, Bengaluru,
Karnataka. 35 m from Supraja Meru pin-560038 (India)
startTimestamp:
type: number
description: this is epoc timestamp
example: 1574913781
endAddress:
type: string
example: >-
1139, Sweth Ambara, 1st Cross Road, HAL Stage 2, Indiranagar,
Bengaluru, Karnataka. 32 m from AMC Cookware India Pvt Ltd
pin-560038
endTimestamp:
type: number
example: 1574914046
description: this is epoc timestamp
avgSpeed:
type: number
example: 45.34
description: speed in km/hr
movement:
type: object
properties:
duration:
type: number
description: duration in seconds
example: 265
distance:
type: number
example: 12.34
description: Distance im KMs
idleTime:
type: number
description: idle time in seconds
example: 265
movementTime:
type: number
description: movement time in seconds
example: 800
stoppageTime:
type: number
description: stoppage time in seconds
example: 1300
drivingBehaviourCount:
type: object
properties:
haCount:
type: integer
example: 2
description: Harsh Acceleration count
hbCount:
type: integer
example: 5
description: Harsh Breaking Count
hcCount:
type: integer
example: 1
description: Harsh Cornering Count
#alarmCount:
# type: object
# description: Will return the count of alarms w.r.t their corresponding alarm types.
Device:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DeviceData'
xml:
name: Device
DeviceData:
type: object
properties:
id:
type: integer
format: int64
active:
type: string
example: true
description: device active status
enum:
- true
- false
status:
type: integer
example: 1
description: "1 is Moving<br> 2 is idle<br> 3 is stopped<br>4 is towing<br>5 is No Data<br>6 is power off i,e the device's battery is disconnected from the vehicle battery<br>7 is No GPS<br>12 is Activation Pending i,e the device is not yet active and is yet to send the first ping."
vehicleBattery:
type: number
example: 13568.98
location:
type: object
properties:
gpsTime:
type: number
example: 1574736922
description: "time at which the device captures the packet"
gprsTime:
type: number