-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreolink-camera-api-openapi.yaml
More file actions
8898 lines (8608 loc) · 285 KB
/
reolink-camera-api-openapi.yaml
File metadata and controls
8898 lines (8608 loc) · 285 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
openapi: 3.0.3
info:
title: Reolink Camera HTTP API
description: |
HTTP and HTTPS based application programming interface for Reolink IPC and NVR products.
This API covers the following modules:
- System: Device information, time, maintenance, upgrades
- Security: Authentication, user management
- Network: Network configuration, email, FTP, push notifications
- Video Input: Image settings, OSD, ISP, masking
- Encoding: Video encoding configuration
- Recording: Recording configuration and playback
- PTZ: Pan-Tilt-Zoom control and presets
- Alarm: Motion detection and alarm configuration
- LED: LED and light control
- AI: AI detection and tracking
## Authentication
The API supports two authentication methods:
1. **Long Session (Token-based)**: First obtain a token via the Login endpoint, then include it in subsequent requests
2. **Short Session**: Include username and password in each request URL
## Request Format
All requests use POST method to `/cgi-bin/api.cgi` with JSON payload.
Request structure:
```json
[{
"cmd": "CommandName",
"action": 0 or 1,
"param": {
"field": "value"
}
}]
```
Where `action`:
- 0: Get only current values
- 1: Get initial values, ranges, and current values
## Response Format
Response structure:
```json
[{
"cmd": "CommandName",
"code": 0,
"value": {
"field": "value"
}
}]
```
Where `code`:
- 0: Success
- Non-zero: Error (see error codes)
## Video Streaming / Preview
Reolink cameras support RTSP, RTMP, and FLV video streaming protocols.
**Note**: RTMP and FLV only support H.264 encoding. RTSP supports both H.264 and H.265.
### RTSP Streaming
The RTSP port (default 554) must be enabled in camera settings before use.
**Current URL Format (Recommended)**:
**Main Stream**:
```
rtsp://{username}:{password}@{ip_address}:554/Preview_{channel}_main
```
**Sub Stream**:
```
rtsp://{username}:{password}@{ip_address}:554/Preview_{channel}_sub
```
**Important**: Channel numbers start from **01** (e.g., 01, 02, 03) for RTSP URLs.
**Example**: `rtsp://admin:password@192.168.1.100:554/Preview_01_main`
**Legacy URL Formats (Still Compatible)**:
These historical formats are no longer recommended but still supported:
**Main Stream (H.264)**:
```
rtsp://{username}:{password}@{ip_address}:554/h264Preview_{channel}_main
```
**Main Stream (H.265)**:
```
rtsp://{username}:{password}@{ip_address}:554/h265Preview_{channel}_main
```
**Sub Stream (H.264)**:
```
rtsp://{username}:{password}@{ip_address}:554/h264Preview_{channel}_sub
```
### RTMP Streaming
The RTMP port must be enabled in camera settings before use. Only H.264 encoding is supported.
**Main Stream URL**:
```
rtmp://{ip_address}/bcs/channel{channel_id}_main.bcs?channel={channel_id}&stream=0&user={username}&password={password}
```
**Ext Stream URL**:
```
rtmp://{ip_address}/bcs/channel{channel_id}_ext.bcs?channel={channel_id}&stream=0&user={username}&password={password}
```
**Sub Stream URL**:
```
rtmp://{ip_address}/bcs/channel{channel_id}_sub.bcs?channel={channel_id}&stream=1&user={username}&password={password}
```
**Important**: Channel IDs start from **0** (e.g., 0, 1, 2) for RTMP URLs.
**Example**: `rtmp://192.168.1.100/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=password`
### FLV Streaming
Only H.264 encoding is supported.
**Main Stream URL**:
```
https://{ip_address}/flv?port=1935&app=bcs&stream=channel{channel_id}_main.bcs&user={username}&password={password}
```
**Ext Stream URL**:
```
https://{ip_address}/flv?port=1935&app=bcs&stream=channel{channel_id}_ext.bcs&user={username}&password={password}
```
**Sub Stream URL**:
```
https://{ip_address}/flv?port=1935&app=bcs&stream=channel{channel_id}_sub.bcs&user={username}&password={password}
```
**Important**: Channel IDs start from **0** (e.g., 0, 1, 2) for FLV URLs.
**Example**: `https://192.168.1.100/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password`
version: "8.0"
contact:
name: Reolink
license:
name: Proprietary
servers:
- url: https://{camera_ip}
description: HTTPS endpoint (recommended)
variables:
camera_ip:
default: 192.168.1.100
description: IP address of the camera or NVR
- url: http://{camera_ip}
description: HTTP endpoint (must be enabled in camera settings)
variables:
camera_ip:
default: 192.168.1.100
description: IP address of the camera or NVR
security:
- tokenAuth: []
- basicAuth: []
components:
securitySchemes:
tokenAuth:
type: apiKey
in: query
name: token
description: Token obtained from Login endpoint (valid for 3600 seconds)
basicAuth:
type: http
scheme: basic
description: Username and password for short session access
responses:
ErrorResponse:
description: Error response
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
code:
type: integer
enum: [0]
error:
$ref: '#/components/schemas/ErrorDetail'
examples:
parameterError:
value:
- cmd: GetDevInfo
code: 0
error:
rspCode: -4
detail: param error
loginRequired:
value:
- cmd: GetDevInfo
code: 0
error:
rspCode: -6
detail: please login first
notSupported:
value:
- cmd: SomeCommand
code: 0
error:
rspCode: -9
detail: not support
parameters:
cmdParam:
name: cmd
in: query
required: true
schema:
type: string
description: Command name to execute
tokenParam:
name: token
in: query
required: false
schema:
type: string
description: Authentication token (for long session)
userParam:
name: user
in: query
required: false
schema:
type: string
description: Username (for short session)
passwordParam:
name: password
in: query
required: false
schema:
type: string
description: Password (for short session)
schemas:
# Common request/response structures
BaseRequest:
type: array
items:
type: object
required:
- cmd
properties:
cmd:
type: string
description: Command name
action:
type: integer
enum: [0, 1]
description: "0: get value only, 1: get initial, range, and value"
param:
type: object
description: Command-specific parameters
BaseResponse:
type: array
items:
type: object
required:
- cmd
- code
properties:
cmd:
type: string
description: Command name
code:
type: integer
description: Response code (0 = success, non-zero = error)
value:
type: object
description: Response data (present when code = 0)
error:
$ref: '#/components/schemas/ErrorDetail'
initial:
type: object
description: Initial/default values (when action = 1)
range:
type: object
description: Valid ranges/options (when action = 1)
ErrorDetail:
type: object
properties:
rspCode:
type: integer
description: |
Detailed error code:
**General Errors (-1 to -49):**
* -1: Missing parameters
* -2: Used up memory
* -3: Check error
* -4: Parameters error
* -5: Reached the max session number
* -6: Login required
* -7: Login error
* -8: Operation timeout
* -9: Not supported
* -10: Protocol error
* -11: Failed to read operation
* -12: Failed to get configuration
* -13: Failed to set configuration
* -14: Failed to apply for memory
* -15: Failed to created socket
* -16: Failed to send data
* -17: Failed to receiver data
* -18: Failed to open file
* -19: Failed to read file
* -20: Failed to write file
* -21: Token error
* -22: The length of the string exceeds the limitation
* -23: Missing parameters
* -24: Command error
* -25: Internal error
* -26: Ability error
* -27: Invalid user
* -28: User already exist
* -29: Reached the maximum number of users
* -30: The version is identical to the current one
* -31: Ensure only one user can upgrade (busy)
* -32: Modify IP conflicted with used IP
* -34: Cloud login need bind email first
* -35: Cloud login unbind camera
* -36: Cloud login get information out of time
* -37: Cloud login password error
* -38: Cloud bind camera uid error
* -39: Cloud login user doesn't exist
* -40: Cloud unbind camera failed
* -41: The device doesn't support cloud
* -42: Cloud login server failed
* -43: Cloud bind camera failed
* -44: Cloud unknown error
* -45: Cloud bind camera need verify code
* -46: Digest authentication failed
* -47: Digest authentication Nonce expires
* -48: Snap a picture failed
* -49: Channel is invalid
* -99: Device offline
* -100: Test Email/Ftp/Wifi failed
**Upgrade Errors (-101 to -105):**
* -101: Upgrade checking firmware failed
* -102: Upgrade download online failed
* -103: Upgrade get upgrade status failed
* -105: Frequent logins, please try again later
**Video Recording Errors (-220 to -222):**
* -220: Error downloading video file
* -221: Busy video recording task
* -222: The video file does not exist
**Authentication Errors (-301, -310):**
* -301: Digest Authentication nonce error
* -310: AES decryption failure
**FTP Errors (-451 to -454):**
* -451: FTP test login failed
* -452: Create FTP directory failed
* -453: Upload FTP file failed
* -454: Cannot connect FTP server
**Email Errors (-480 to -485):**
* -480: Email undefined error (some undefined errors)
* -481: Cannot connect email server
* -482: Email auth user failed
* -483: Email network error
* -484: Something wrong with email server
* -485: Something wrong with memory
**Login Errors (-500 to -507):**
* -500: The number of IP addresses reaches the upper limit
* -501: The user does not exist
* -502: Password error
* -503: Login deny
* -505: Login not init
* -506: Login locked
* -507: The number of logins reached the upper limit
enum: [-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, -34, -35, -36, -37, -38, -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -99, -100, -101, -102, -103, -105, -220, -221, -222, -301, -310, -451, -452, -453, -454, -480, -481, -482, -483, -484, -485, -500, -501, -502, -503, -505, -506, -507]
detail:
type: string
description: Error description text
example: param error
# Common data structures
Channel:
type: object
properties:
channel:
type: integer
minimum: 0
description: Channel number (0-based)
Schedule:
type: object
description: |
Weekly schedule configuration.
**Schedule Table Format:**
- The table is a string with length of **168 characters** (7 days × 24 hours)
- Each character represents one hour
- '0' = feature disabled for that hour
- Non-zero (typically '1') = feature enabled for that hour
- Characters are ordered: Sunday hour 0-23, Monday hour 0-23, ..., Saturday hour 0-23
**Example:** A string of 168 '1's means enabled 24/7
properties:
enable:
type: integer
enum: [0, 1]
description: "0: schedule disabled, 1: schedule enabled"
table:
type: string
minLength: 168
maxLength: 168
pattern: '^[0-9]{168}$'
description: |
Schedule table string (168 characters).
Each character represents one hour of the week.
example: "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
StreamConfig:
type: object
properties:
vType:
type: string
enum: [h264, h265]
description: Video codec type
size:
type: string
description: Resolution (e.g., "3840*2160")
width:
type: integer
description: Video width in pixels
height:
type: integer
description: Video height in pixels
frameRate:
type: integer
description: Frames per second
bitRate:
type: integer
description: Bitrate in kbps
gop:
type: integer
description: Group of pictures interval
profile:
type: string
enum: [Base, Main, High]
description: H.264/H.265 profile
DeviceInfo:
type: object
description: Device information
properties:
B485:
type: integer
description: "0: no RS485, 1: has RS485"
IOInputNum:
type: integer
description: Number of IO input ports
IOOutputNum:
type: integer
description: Number of IO output ports
audioNum:
type: integer
description: Number of audio channels
buildDay:
type: string
description: Build date
cfgVer:
type: string
description: Configuration version
channelNum:
type: integer
description: Number of channels
detail:
type: string
description: Detailed device information
diskNum:
type: integer
description: Number of disks (USB/SD card)
exactType:
type: string
description: Exact product type
firmVer:
type: string
description: Firmware version
frameworkVer:
type: integer
description: Framework/architecture version
hardVer:
type: string
description: Hardware version
model:
type: string
description: Device model
name:
type: string
description: Device name
pakSuffix:
type: string
description: Firmware package suffix
serial:
type: string
description: Serial number
type:
type: string
description: Device type (IPC/NVR)
wifi:
type: integer
description: "0: no WiFi, 1: has WiFi"
DstConfig:
type: object
description: Daylight Saving Time configuration
properties:
enable:
type: integer
enum: [0, 1]
description: "0: disabled, 1: enabled"
offset:
type: integer
minimum: 1
maximum: 2
description: Time offset in hours
startMon:
type: integer
minimum: 1
maximum: 12
description: DST start month (1-12)
startWeek:
type: integer
minimum: 1
maximum: 5
description: DST start week of month (1-5)
startWeekday:
type: integer
minimum: 0
maximum: 6
description: DST start day of week (0-6, 0=Sunday)
startHour:
type: integer
minimum: 0
maximum: 23
description: DST start hour (0-23)
startMin:
type: integer
minimum: 0
maximum: 59
description: DST start minute (0-59)
startSec:
type: integer
minimum: 0
maximum: 59
description: DST start second (0-59)
endMon:
type: integer
minimum: 1
maximum: 12
description: DST end month (1-12)
endWeek:
type: integer
minimum: 1
maximum: 5
description: DST end week of month (1-5)
endWeekday:
type: integer
minimum: 0
maximum: 6
description: DST end day of week (0-6, 0=Sunday)
endHour:
type: integer
minimum: 0
maximum: 23
description: DST end hour (0-23)
endMin:
type: integer
minimum: 0
maximum: 59
description: DST end minute (0-59)
endSec:
type: integer
minimum: 0
maximum: 59
description: DST end second (0-59)
TimeConfig:
type: object
description: System time configuration
properties:
year:
type: integer
minimum: 1900
maximum: 2100
description: Year (1900-2100)
mon:
type: integer
minimum: 1
maximum: 12
description: Month (1-12)
day:
type: integer
minimum: 1
maximum: 31
description: Day of month (1-31)
hour:
type: integer
minimum: 0
maximum: 23
description: Hour (0-23)
min:
type: integer
minimum: 0
maximum: 59
description: Minute (0-59)
sec:
type: integer
minimum: 0
maximum: 59
description: Second (0-59)
timeZone:
type: integer
minimum: -46800
maximum: 43200
description: Time zone offset in seconds from UTC (-46800 to 43200)
timeFmt:
type: string
enum: ["MM/DD/YYYY", "YYYY/MM/DD", "DD/MM/YYYY"]
description: Date format
hourFmt:
type: integer
enum: [0, 1]
description: "0: 24-hour clock, 1: 12-hour clock"
paths:
# ==================== SYSTEM ENDPOINTS ====================
/api.cgi:
post:
tags:
- System
summary: Execute API commands
description: |
Main endpoint for all API commands. The specific command is determined by the `cmd` query parameter.
This documentation breaks down commands by functional area.
operationId: executeCommand
parameters:
- $ref: '#/components/parameters/cmdParam'
- $ref: '#/components/parameters/tokenParam'
- $ref: '#/components/parameters/userParam'
- $ref: '#/components/parameters/passwordParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BaseRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/BaseResponse'
# System Module Endpoints
/api.cgi?cmd=GetAbility:
post:
tags:
- System
summary: Get system abilities
description: |
Get system ability of appointed user to determine which features are supported.
**Important Notes:**
- Each domain corresponds to a functional module
- The `permit` field marks access rights using the least significant 3 bits:
- Bit 0 (value 1): Execute/Option permission
- Bit 1 (value 2): Write/Revision permission
- Bit 2 (value 4): Read permission
- Combined value 6 (4+2): Read and Write
- Combined value 7 (4+2+1): Read, Write, and Execute
- The `ver` field indicates version number:
- 0: Feature not supported in this version
- Non-zero: Feature supported (different versions may support different options)
**Key Capability Fields:**
- `abilityChn`: Array of per-channel capabilities (50+ fields including AI detection, PTZ, encoding, ISP settings, etc.)
- System-level capabilities: auth, time, network, storage, alarms, etc.
**Common abilityChn Fields:**
- `supportAi`, `supportAiPeople`, `supportAiVehicle`, `supportAiDogCat`, `supportAiFace`: AI detection capabilities
- `ptzCtrl`, `ptzPreset`, `ptzPatrol`: PTZ control capabilities
- `enc`, `live`: Encoding and streaming capabilities
- `image`, `isp`: Image and ISP parameter configuration
- `alarmMd`, `alarmAudio`: Motion detection and audio alarm
- `mask`, `osd`, `waterMark`: Privacy mask, OSD, watermark
- `recCfg`, `recSchedule`: Recording configuration
Refer to the PDF documentation for the complete list of 100+ capability fields and their meanings.
operationId: getAbility
security:
- tokenAuth: []
- basicAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
enum: [GetAbility]
param:
type: object
properties:
User:
type: object
properties:
userName:
type: string
maxLength: 32
description: User name (max 32 characters). If NULL, gets current user ability.
example:
- cmd: GetAbility
param:
User:
userName: admin
responses:
'200':
description: Successful response with ability information
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
example: GetAbility
code:
type: integer
example: 0
value:
type: object
properties:
Ability:
type: object
description: |
Comprehensive ability structure with 100+ capability fields.
Each field has `permit` (access rights) and `ver` (version/support) properties.
properties:
abilityChn:
type: array
description: Per-channel capabilities array
items:
type: object
description: Channel-specific capabilities (50+ fields)
auth:
type: object
properties:
permit:
type: integer
ver:
type: integer
time:
type: object
properties:
permit:
type: integer
ver:
type: integer
user:
type: object
properties:
permit:
type: integer
ver:
type: integer
additionalProperties:
type: object
description: Additional capability fields (see PDF for complete list)
/api.cgi?cmd=GetDevInfo:
post:
tags:
- System
summary: Get device information
description: Get device information including model, firmware version, hardware version, etc.
operationId: getDevInfo
security:
- tokenAuth: []
- basicAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
enum: [GetDevInfo]
example:
- cmd: GetDevInfo
responses:
'200':
description: Device information
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
code:
type: integer
value:
type: object
properties:
DevInfo:
$ref: '#/components/schemas/DeviceInfo'
/api.cgi?cmd=GetDevName:
post:
tags:
- System
summary: Get device name
description: Get the configured device name
operationId: getDevName
security:
- tokenAuth: []
- basicAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
enum: [GetDevName]
param:
type: object
required:
- channel
properties:
channel:
type: integer
description: Index of channel
example:
- cmd: GetDevName
param:
channel: 0
responses:
'200':
description: Device name
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
code:
type: integer
value:
type: object
properties:
DevName:
type: object
properties:
name:
type: string
/api.cgi?cmd=SetDevName:
post:
tags:
- System
summary: Set device name
description: Set the device name
operationId: setDevName
security:
- tokenAuth: []
- basicAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
enum: [SetDevName]
param:
type: object
properties:
DevName:
type: object
properties:
name:
type: string
example:
- cmd: SetDevName
param:
DevName:
name: camera101
responses:
'200':
description: Success response
/api.cgi?cmd=GetTime:
post:
tags:
- System
summary: Get time configuration
description: |
Get time and timezone configuration from device including DST (Daylight Saving Time) settings.
Use `action: 1` to get initial values, ranges, and current values.
Use `action: 0` to get only current values.
operationId: getTime
security:
- tokenAuth: []
- basicAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: object
properties:
cmd:
type: string
enum: [GetTime]
action:
type: integer
enum: [0, 1]
description: "0: get value only, 1: get initial, range, and value"
example:
- cmd: GetTime
action: 1
responses:
'200':
description: Time configuration with DST settings
content:
application/json:
schema:
type: array
items:
type: object