-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswagger.yaml
More file actions
2699 lines (2699 loc) · 81.8 KB
/
swagger.yaml
File metadata and controls
2699 lines (2699 loc) · 81.8 KB
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
---
swagger: "2.0"
info:
description: "This is the full local API for Agent DVR. You can find out more about\
\ AgentDVR at [https://www.ispyconnect.com](https://www.ispyconnect.com)\
\ This interface uses the default API endpoint of http://localhost:8090. You will need Agent DVR installed and running to use it. Many of the commands below take an Object ID and an Object Type ID. The Object ID is displayed in Agent's UI when you edit the device at the top left. For example if it says 1: Home Cam then your Object ID is 1. The Object Type ID is 1 for Microphones and 2 for cameras. You can also provide a group parameter instead of object id and type id - this will then apply the command to all devices that are in that group (on the General tab when you edit the device). Some commands can be called with neither id or group and will then apply to every device on the system."
title: 'Agent DVR'
version: "7.1.8.0"
termsOfService: "https://www.ispyconnect.com/terms.aspx"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "localhost:8090"
basePath: "/"
consumes:
- "application/json"
definitions:
Alert:
properties:
ot:
type: integer
oid:
type: integer
reason:
type: string
msg:
type: string
time:
type: string
id:
type: string
read:
type: boolean
tags:
type: string
AlertsResponse:
properties:
alerts:
items:
$ref: '#/definitions/Alert'
type: array
Event:
properties:
Ago:
type: integer
Ident:
type: string
Type:
type: string
paths:
/alerts.json:
get:
summary: Returns collection of the current alerts
operationId: alerts.json
produces:
- application/json
responses:
"200":
description: Returns collection of the current alerts
schema:
$ref: '#/definitions/AlertsResponse'
tags:
- Alerts
/audio.mp3:
get:
summary: Returns live audio from the specified microphone in mp3 format
operationId: audio.mp3
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
produces:
- audio/mpeg
responses:
"200":
description: Returns live audio from the specified microphone in mp3 format
tags:
- Audio
/audio.ogg:
get:
summary: Returns live audio from the specified microphone in ogg format
operationId: audio.ogg
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
produces:
- application/ogg
responses:
"200":
description: Returns live audio from the specified microphone in ogg format
tags:
- Audio
/command/addfolder:
get:
summary: Add existing files from the devices folder to the database
operationId: /command/addfolder
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Copy files into the devices folder (available via the storage tab) and then call this command to scan the folder and add the recordings to the database so they are available in the UI. Agent will generate missing data like thumbnails and duration. v5.5.5.0+
tags:
- Commands
/command/addrecording:
get:
summary: Add an existing recording to a device
operationId: /command/addrecording
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
- description: Local path to the file
in: query
name: path
required: true
type: string
- description: Target filename. Will generate a filename if not specified
in: query
name: name
required: false
type: string
- description: Timestamp in UTC javascript ticks. Will use file creation time if not specified
in: query
name: timestamp
required: false
type: integer
- description: Convert the file to mp4 (or mp3 if audio) (false)
in: query
name: convert
required: false
type: boolean
- description: Move the file (false)
in: query
name: move
required: false
type: boolean
- description: Tag the recording in the database (csv)
in: query
name: tags
required: false
type: string
produces:
- application/json
responses:
"200":
description: use the optional fields to customise the data
tags:
- Commands
/command/alert:
get:
summary: Trigger alert on the device.
operationId: /command/alert
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
- description: Tag (will tag be stored with any associated recording)
in: query
name: tag
required: false
type: string
- description: AIJSON - any JSON you want passed onto other alert based actions. The presence of AIJSON will also tag the recording and alert as being AI generated.
in: query
name: aijson
required: false
type: string
- description: Message - any human readable message you want passed onto other alert based actions
in: query
name: message
required: false
type: string
produces:
- application/json
responses:
"200":
description: alert
tags:
- Commands
/command/alertOff:
get:
summary: Turn alerts off for the device.
operationId: /command/alertOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn alerts off for the device.
tags:
- Commands
/command/alertOn:
get:
summary: Turn alerts on for the device.
operationId: /command/alertOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn alerts on for the device.
tags:
- Commands
/command/allOff:
get:
summary: allOff
operationId: /command/allOff
produces:
- application/json
responses:
"200":
description: allOff
tags:
- Commands
/command/allOn:
get:
summary: allOn
operationId: /command/allOn
produces:
- application/json
responses:
"200":
description: allOn
tags:
- Commands
/command/appendtimestamp:
get:
summary: Appends text to the devices default timestamp
operationId: /command/appendtimestamp
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
- description: text to append
in: query
name: text
required: true
type: string
produces:
- application/json
responses:
"200":
description: alert
tags:
- Commands
/command/applySchedule:
get:
summary: Apply schedule to all devices.
operationId: /command/applySchedule
produces:
- application/json
responses:
"200":
description: Apply schedule to all devices.
tags:
- Commands
/command/applyScheduleToDevice:
get:
summary: Apply schedule to device.
operationId: /command/applyScheduleToDevice
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Apply schedule to device.
tags:
- Commands
/command/arm:
get:
summary: Arm the system.
operationId: /command/arm
produces:
- application/json
responses:
"200":
description: Arm the system.
tags:
- Commands
/command/armgroups:
get:
summary: Arm system and groups of devices (enable alerts)
operationId: /command/armGroups
parameters:
- description: group names (csv)
in: query
name: groups
required: true
type: string
produces:
- application/json
responses:
"200":
description: Arm the system and enable alerts on groups of devices
tags:
- Commands
/command/disarmgroups:
get:
summary: Disarm groups of devices (disable alerts)
operationId: /command/disarmGroups
parameters:
- description: group names (csv)
in: query
name: groups
required: true
type: string
produces:
- application/json
responses:
"200":
description: Disarm the system and enable alerts on groups of devices
tags:
- Commands
/command/armProfile:
get:
summary: Arm the system and apply the specified profile.
operationId: /command/armprofile
parameters:
- description: profile index
in: query
name: ind
required: true
type: integer
- description: Optionally disarm after a delay (minutes)
in: query
name: disarmdelay
required: false
type: integer
produces:
- application/json
responses:
"200":
description: Armed the system and applied the specified profile.
tags:
- Commands
/command/disarmProfile:
get:
summary: Disarm the system and apply the specified profile.
operationId: /command/disarmProfile
parameters:
- description: profile index
in: query
name: ind
required: true
type: integer
- description: Optionally arm the system after a delay (minutes)
in: query
name: armdelay
required: false
type: integer
produces:
- application/json
responses:
"200":
description: Disarmed and applied the specified profile.
tags:
- Commands
/command/blockExternal:
get:
summary: Block external access to the system.
operationId: /command/blockExternal
produces:
- application/json
responses:
"200":
description: Block external access to the system.
tags:
- Commands
/command/checkRemote:
get:
summary: Check the status of the remote (web) connection
operationId: /command/checkRemote
produces:
- application/json
responses:
"200":
description: returns json, status online or offline. v6.6.8.0+
tags:
- Commands
/command/cloudPhotosOff:
get:
summary: Turn cloud photos off for the device.
operationId: /command/cloudPhotosOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn cloud photos off for the device.
tags:
- Commands
/command/cloudPhotosOn:
get:
summary: Turn cloud photos on for the device.
operationId: /command/cloudPhotosOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn cloud photos on for the device.
tags:
- Commands
/command/cloudRecordingsOff:
get:
summary: Turn cloud recordings off for the device.
operationId: /command/cloudRecordingsOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn cloud recordings off for the device.
tags:
- Commands
/command/cloudRecordingsOn:
get:
summary: Turn cloud recordings on for the device.
operationId: /command/cloudRecordingsOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn cloud recordings on for the device.
tags:
- Commands
/command/detect:
get:
summary: Trigger detection for the device.
operationId: /command/detect
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Trigger detection for the device.
tags:
- Commands
/command/disarm:
get:
summary: Disarm the system.
operationId: /command/disarm
produces:
- application/json
responses:
"200":
description: Disarm the system.
tags:
- Commands
/command/facedetecton:
get:
summary: Turn facial recognition on
operationId: /command/faceDetectOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn facial recognition on for the device.
tags:
- Commands
/command/facedetectoff:
get:
summary: Turn facial recognition off
operationId: /command/faceDetectOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn facial recognition off for the device.
tags:
- Commands
/command/ftpFrame:
get:
summary: Send a live frame via FTP.
operationId: /command/ftpFrame
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Send a live frame via FTP.
tags:
- Commands
/command/ftpPhotosOff:
get:
summary: Turn FTP photos off for the device.
operationId: /command/ftpPhotosOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn FTP photos off for the device.
tags:
- Commands
/command/ftpPhotosOn:
get:
summary: Turn FTP photos on for the device.
operationId: /command/ftpPhotosOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn FTP photos on for the device.
tags:
- Commands
/command/ftpRecordingsOff:
get:
summary: Turn FTP recordings off for the device.
operationId: /command/ftpRecordingsOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn FTP recordings off for the device.
tags:
- Commands
/command/ftpRecordingsOn:
get:
summary: Turn FTP recordings on for the device.
operationId: /command/ftpRecordingsOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn FTP recordings on for the device.
tags:
- Commands
/command/getObject:
get:
summary: Get object by ID.
operationId: /command/getObject
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Get object by ID.
tags:
- Commands
/command/getObjects:
get:
summary: getObjects
operationId: /command/getObjects
produces:
- application/json
responses:
"200":
description: getObjects
tags:
- Commands
/command/getProfiles:
get:
summary: getProfiles
operationId: /command/getProfiles
produces:
- application/json
responses:
"200":
description: getProfiles
tags:
- Commands
/command/getStatus:
get:
summary: getStatus
operationId: /command/getStatus
produces:
- application/json
responses:
"200":
description: getStatus
tags:
- Commands
/command/getSystemStats:
get:
summary: Return the system usage stats
operationId: /command/getsystemstats
produces:
- application/json
responses:
"200":
description: cpu/ memory and disk space
tags:
- Commands
/command/lpron:
get:
summary: Turn LPR on
operationId: /command/lprOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn lpr on for the device.
tags:
- Commands
/command/lproff:
get:
summary: Turn lpr off
operationId: /command/lprOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn lpr off for the device.
tags:
- Commands
/command/objectdetecton:
get:
summary: Turn object recognition on
operationId: /command/objectDetectOn
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn object recognition on for the device.
tags:
- Commands
/command/objectdetectoff:
get:
summary: Turn object recognition off
operationId: /command/objectDetectOff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Turn object recognition off for the device.
tags:
- Commands
/command/ping:
get:
summary: ping
operationId: /command/ping
produces:
- application/json
responses:
"200":
description: ping
tags:
- Commands
/command/ptzscheduleon:
get:
summary: enable the ptz scheduler or enable a specific ptz schedule entry (5.9.4.0+)
operationId: /command/ptzscheduleon
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1
- 2
in: query
name: ot
required: true
type: integer
- description: Identifier of the PTZ Schedule entry (from the copy button on the PTZ Schedule list in the UI)
in: query
name: ident
required: false
type: string
produces:
- application/json
responses:
"200":
description: Enables the PTZ Scheduler or a specific entry
tags:
- Commands
/command/ptzscheduleoff:
get:
summary: disable the ptz scheduler or disable a specific ptz schedule entry (5.9.4.0+)
operationId: /command/ptzscheduleoff
parameters:
- description: Object ID
in: query
name: oid
required: true
type: integer
- description: Object TypeID
enum:
- 1