Functional Spec - Surveillance Station Web API
File info: application/pdf · 562 pages · 2.34MB
Functional Spec - Surveillance Station Web API
Synology Surveillance Station Web API
2012/04/24 Rename to "Synology Surveillance Station Web API." Sheldon Lin ... Indicating if the caller is from cam list.
Full PDF Document
If the inline viewer fails, it will open the original document in compatibility mode automatically. You can also open the file directly.
Extracted Text
Synology Surveillance Station Web API
ver: 3.10
THIS DOCUMENT CONTAINS PROPRIETARY TECHNICAL INFORMATION WHICH IS THE PROPERTY OF SYNOLOGY INCORPORATED AND SHALL NOT BE DISCLOSED TO OTHERS IN WHOLE OR IN PART, REPRODUCED, COPIED, OR USED AS THE BASIS FOR DESIGN, MANUFACTURING, OR SALE OF APPARATUS WITHOUT WRITTEN PERMISSION OF SYNOLOGY INCORPORATED
Synology Surveillance Station Web API
VERSION 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0.8
0.9
0.10
0.11
0.12
1.0 1.1 1.2
1.3 1.4
1.5
DATE 2012/03/07 2012/04/18 2012/04/23 2012/04/24 2012/04/25 2012/04/25 2012/05/25
REVISION HISTORY DESCRIPTION
Creation of this document. Add "SYNO.SurveillanceStation.Info". Document format modification. Rename to "Synology Surveillance Station Web API." 'offset', 'limit' parameters as optional. More info in "SYNO.SurveillanceStation.Info". Error code, VS status in Device API.
2012/05/30 info.cgi for non-login users.
2012/05/31 Modify SYNO.API.Auth.
2012/06/01 Modify SYNO.Surveillance.Event Audio Format.
2012/07/19 Merge Chad's modification, rephrase, RecTime.
2012/08/08 Add SYNO.API.Auth version = 2.
2012/09/11 Version 1 as official release. 2012/09/17 Add SYNO.SurveillanceStation.Emap. 2012/10/01 Implement SYNO.SurveillanceStation.Emap.
2013/11/04 2014/04/28
2014/05/20
Error Code Update.
1. Update SYNO.Surveillance.Info 2. Add privilege parameter for List, ListGroup in SYNO.Surveillance.Camera
1. SYNO.Surveillance.Camera - Add method Enable, Disable, GetCapabilityByCamId 2. SYNO.Surveillance.Event - Add mode: None, Edge recording - Add method DeleteMulti, DeleteAll, DeletFilter - Update Query method with ownerDsId and camId
NAME Wai Chi Kan Sheldon Lin Sheldon Lin Sheldon Lin Sheldon Lin Sheldon Lin
Claire Huang Claire Huang Claire Huang Claire Huang Claire Huang Claire Huang Sheldon Lin Sheldon Lin Chih-Pei Yang Kai Wang Pei-Wen Wu
Pei-Wen Wu
1.6
2014/05/21 Replace"SS"with"Surveillance Station"
1.7
2014/06/12 1. Add sections
- SYNO.SurveillanceStation.AudioStream
- SYNO.SurveillanceStation.VideoStream
- SYNO.SurveillanceStation.Notification
2. Add methods of
- SYNO.SurveillanceStation.PTZ
(Focus, Iris, AutoFocus, AbsPtz)
3. Modify parameters
- SYNO.SurveillanceStation.PTZ
Kai Wang Pei-Wen Wu
Copyright � Synology Inc. All rights Reserved.
1
Synology Surveillance Station Web API
- SYNO.SurveillanceStation.Device
- SYNO.SurveillanceStation.Camera
4. Replace "Slave DS" with "DS"
1.8
2014/8/14 Fix typo in example of Camera Enable and Disable
1.9
2014/12/26 1. Remove "Motion Detection and Alarm Recording"
2. Add "Custom Recording"
3. Add audio out caps in GetCapability and
GetCapabilityByCamId
2.0
2015/3/13 Add Document of Following APIs
Door
Camera.Event
Camera
Event
Camera.Wizard
ActionRule
CMS.SlavedsWizard
CMS.GetDsStatus
Camera.Import
CMS
DigitalOutput
LogPTZ
StreamEvent.Export
Event.Mount
Notification
Notification.Email
Notification.SMS
Notification.SMS.ServiceProvider
Notification.PushService
Notification.Filter
Notification.Schedule
Snapshot
VisualStation
Analytics
AddOn
Analytics_Setting
2.1
2015/10/16 Update calling examples using entry.cgi
Request
Info
Camera Enable
External Recording
Addons GetUpdateInfo
2.2
2015/12/16 Update calling example which refer to _sid
Add Document the API "External Event"
2.3
2016/3/9 Correct old version webapi path
Add example of PTZ webapi GoPreset method
Pei-Wen Wu Josh Lin
Chuan-Che Yen
Bismarck Hsu
Ben Tsai
Chuan-Che Yen
Chuan-Che Yen
Septem Hsu
Copyright � Synology Inc. All rights Reserved.
2
Synology Surveillance Station Web API Update description of Camera webapi SaveOptimizeParam method
2.4
16/3/23 Add document of following APIs
� IOModule
� IOModule.search
Add document of following methods
� SYNO.SurveillanceStation.Camera
GetStmUrlPath
� SYNO.SurveillanceStation.Notification
SetAdvSetting
GetAdvSetting
� SYNO.SurveillanceStation.Log
GetSetting
SetSetting
2.5
16/7/28 Rename following APIs
� Event Recording
� Analytics Alert
Chuan-Che Yen
Septem Hsu David Lai
Jack
Add document of following APIs � SYNO.SurveillanceStation.Camera.Status � SYNO.SurveillanceStation.PTZ.Preset � SYNO.SurveillanceStation.PTZ.Patrol � SYNO.SurveillanceStation.Camera.Search
Add document of following methods
� SYNO.SurveillanceStation.Recording
CheckEventValid
EventFlushHeader
� SYNO.SurveillanceStation.PTZ
Home
AutoPan
ObjTracking
� SYNO.API.Auth
2.6
17/1/11 Rename following methods
� SYNO.SurveillanceStation.Camera
GetStmUrlPath GetLiveViewPath
� SYNO.SurveillanceStation.Recording
DeleteMulti Delete
Modify request/response parameter of following
methods
� SYNO.SurveillanceStation.Camera
List
Enable
Disable
Delete
Terry
Copyright � Synology Inc. All rights Reserved.
3
Synology Surveillance Station Web API
GetSnapshot
� SYNO.SurveillanceStation.Recording
List
Lock
Unlock
Download
Add document of following methods
� SYNO.SurveillanceStation.Camera
Save
� SYNO.SurveillanceStation.Recording
Stream
Remove following methods
� SYNO.SurveillanceStation.Recording
EventFlushHeader
2.7
17/9/8 Add document of following APIs
� SYNO.SurveillanceStation.HomeMode
GetInfo
Switch
� SYNO.SurveillanceStation.Transactions.Device
Enum
� SYNO.SurveillanceStation.Transactions.Transac
tion
Enum
Lock
Unlock
Delete
Begin
Complete
Cancel
AppendData
2.8
18/7/5 Add document of following methods
� SYNO.SurveillanceStation.Emap.Image
Load
� SYNO.SurveillanceStation.CMS.SlavedsList
Load
Modify document of following methods
� SYNO.SurveillanceStation.Emap
List
Load
� SYNO.SurveillanceStation.Camera
GetInfo
ListGroup
GetCapabilityByCamId
MigrationEnum
Migrate
CountByCategory
RecountEventSize
James Chan Kayle Chang
Blake Lin
Copyright � Synology Inc. All rights Reserved.
4
Synology Surveillance Station Web API
SaveOptimizeParam
GetOccupiedSize
CheckCamValid
MigrationCancel
Remove following methods
� SYNO.SurveillanceStation.AudioStream
Stream
Query
Open
Close
� SYNO.SurveillanceStation.VideoStream
Stream
Query
� SYNO.SurveillanceStation.Device
ListVS
ListCMS
GetServiceSetting
� SYNO.SurveillanceStation.Streaming
LiveStream
EventStream
2.9
18/11/16 Add document of following methods
� SYNO.SurveillanceStation.Archiving.Pull
SaveTask
DeleteTask
ListTask
EnableTask
DisableTask
BatchEditTask
GetBatchEditProgress
BatchEditProgressDone
LoginSourceDS
3
18/12/28 Modify document of following methods
� SYNO.SurveillanceStation.SnapShot
List
� SYNO.SurveillanceStation.Camera
MDParamSave
� SYNO.SurveillanceStation.License
Load
hungchengl Saipher
3.1
19/1/9 Add document of following methods
� SYNO.SurveillanceStation.YoutubeLive
Load
Save
CloseLive
3.2
19/5/27 Modify document of following methods
� SYNO.SurveillanceStation.Recording
Download
Saipher Saipher
Copyright � Synology Inc. All rights Reserved.
5
Synology Surveillance Station Web API
3.3
19/7/10 Modify document of following methods
� SYNO.SurveillanceStation.Notification.Email
SetSetting
Add document of following methods
� SYNO.SurveillanceStation.Recording
DeleteFilter
CountByCategory
LockFilter
UnLockFilter
� SYNO.SurveillanceStation.Notification.Email
GetSetting
Remove following methods
� SYNO.SurveillanceStation.Camera.Wizard
CamSaveAll
*Please use
SYNO.SurveillanceStation.Camera Save
method V9 instead.
3.4
20/3/17 Add document of following APIs
� SYNO.SurveillanceStation.IVA
ListTask
GetCount
3.5
20/3/23 Add document of following APIs
� SYNO.SurveillanceStation.Recording
RangeExport
GetRangeExportProgress
OnRangeExportDone
3.6
20/10/28 Modify document of following methods
� SYNO.API.Auth
login
logout
3.7
21/5/31 Add document of of following APIs
� SYNO.SurveillanceStation.Face
� SYNO.SurveillanceStation.Face.Result
3.8
21/6/2 Modify document of following APIs
� SYNO.SurveillanceStation.IVA
� SYNO.SurveillanceStation.IVA.Report
Add document of of following APIs
� SYNO.SurveillanceStation.IVA.Recording
� SYNO.SurveillanceStation.IVA.TaskGroup
3.9
21/6/4 Add document of of following APIs
� SYNO.SurveillanceStation.Recording.Bookmark
SaveBookmark
DeleteBookmark
Add document of how to list bookmarks in
� SYNO.SurveillanceStation.Recording
List
Alan Lyu
Star Chen David Lai Ruby Lin Septem Hsu Leon Luo Star Chen
Copyright � Synology Inc. All rights Reserved.
6
Synology Surveillance Station Web API
3.10
21/6/22 Add request parameter "recordSchedule" of following
method
� SYNO.SurveillanceStation.Camera
Save
Tom Chueh
Copyright � Synology Inc. All rights Reserved.
7
Synology Surveillance Station Web API
Table of Contents
1. Overview...........................................................................................................................................21
2. Surveillance Station Web API Specification......................................................................................22
2.1 Concept..................................................................................................................................22
2.1.1 API Definition...............................................................................................................22
2.1.2 Operation flow............................................................................................................23
2.2 Request & Response Structure..............................................................................................24
2.2.1 Request........................................................................................................................24
2.2.2 Response.....................................................................................................................24
2.2.3 Common API Error Code.............................................................................................25
2.3 API List....................................................................................................................................26
2.3.1 SYNO.API.Info..............................................................................................................27
2.3.1.1 Query method......................................................................................................27
2.3.2 SYNO.API.Auth.............................................................................................................30
2.3.2.1 login method........................................................................................................30
2.3.2.2 logout method.....................................................................................................32
2.3.2.3 API Error Code......................................................................................................32
2.3.3 SYNO.SurveillanceStation.Info....................................................................................34
2.3.3.1 GetInfo method...................................................................................................34
2.3.3.2 API Error Code......................................................................................................35
2.3.4 SYNO.SurveillanceStation.Camera..............................................................................37
2.3.4.1 Save method........................................................................................................37
2.3.4.2 List method..........................................................................................................41
2.3.4.3 GetInfo method...................................................................................................45
2.3.4.4 ListGroup method................................................................................................57
2.3.4.5 GetSnapshot method...........................................................................................58
2.3.4.6 Enable method.....................................................................................................59
2.3.4.7 Disable method....................................................................................................60
2.3.4.8 GetCapabilityByCamId method...........................................................................60
2.3.4.9 MigrationEnum method......................................................................................61
2.3.4.10 Migrate method.................................................................................................62
2.3.4.11 CountByCategory method.................................................................................63
2.3.4.12 RecountEventSize method.................................................................................65
2.3.4.13 SaveOptimizeParam method.............................................................................65
2.3.4.14 GetOccupiedSize method..................................................................................67
2.3.4.15 CheckCamValid method.....................................................................................67
2.3.4.16 MigrationCancel method...................................................................................68
Copyright � Synology Inc. All rights Reserved.
8
Synology Surveillance Station Web API
2.3.4.17 Delete method...................................................................................................68
2.3.4.18 GetLiveViewPath method..................................................................................69
2.3.4.19 API Error Code....................................................................................................70
2.3.5 SYNO.Surveillance.Camera.Event................................................................................71
2.3.5.1 AudioEnum method.............................................................................................71
2.3.5.2 AlarmEnum method.............................................................................................72
2.3.5.3 TamperingEnum method.....................................................................................73
2.3.5.4 MDParamSave method........................................................................................74
2.3.5.5 MotionEnum method..........................................................................................75
2.3.5.6 ADParamSave method.........................................................................................77
2.3.5.7 DIParamSave method..........................................................................................77
2.3.5.8 AlarmStsPolling method......................................................................................78
2.3.5.9 TDParamSave method.........................................................................................79
2.3.5.10 API Error Code....................................................................................................80
2.3.6 SYNO.SurveillanceStation.Camera.Group...................................................................81
2.3.6.1 Enum method......................................................................................................81
2.3.6.2 Save method........................................................................................................83
2.3.6.3 Delete method.....................................................................................................84
2.3.6.4 API Error Code......................................................................................................84
2.3.7 SYNO.SurveillanceStation.Camera.Import..................................................................85
2.3.7.1 Save method........................................................................................................85
2.3.7.2 ArchiveCamEnum method...................................................................................90
2.3.7.3 ArchiveEnum method..........................................................................................91
2.3.7.4 API Error Code......................................................................................................91
2.3.8 SYNO.SurveillanceStation.Camera.Wizard..................................................................93
2.3.8.1 CheckSDCardSize method....................................................................................93
2.3.8.2 CheckQuota method............................................................................................94
2.3.8.3 CamBarAddSaveAll method.................................................................................94
2.3.8.4 FormatSDCard method........................................................................................96
2.3.8.5 QuickCreate method............................................................................................96
2.3.8.6 API Error Code....................................................................................................102
2.3.9 SYNO.SurveillanceStation.PTZ...................................................................................103
2.3.9.1 Move method....................................................................................................103
2.3.9.2 Zoom method....................................................................................................104
2.3.9.3 ListPreset method..............................................................................................104
2.3.9.4 GoPreset method...............................................................................................105
2.3.9.5 ListPatrol method..............................................................................................106
2.3.9.6 RunPatrol method..............................................................................................107
2.3.9.7 Focus method....................................................................................................108
Copyright � Synology Inc. All rights Reserved.
9
Synology Surveillance Station Web API
2.3.9.8 Iris method.........................................................................................................108
2.3.9.9 AutoFocus method.............................................................................................109
2.3.9.10 AbsPtz method.................................................................................................109
2.3.9.11 Home method..................................................................................................110
2.3.9.12 AutoPan method..............................................................................................110
2.3.9.13 ObjTracking method........................................................................................110
2.3.9.14 API Error Code..................................................................................................111
2.3.10 SYNO.SurveillanceStation.ExternalRecording.........................................................112
2.3.10.1 Record method................................................................................................112
2.3.10.2 API Error Code..................................................................................................112
2.3.11 SYNO.SurveillanceStation.Recording......................................................................113
2.3.11.1 List method......................................................................................................113
2.3.11.2 Delete method.................................................................................................115
2.3.11.3 DeleteFilter method.........................................................................................116
2.3.11.4 DeleteAll method.............................................................................................117
2.3.11.5 ApplyAdvanced method..................................................................................118
2.3.11.6 CountByCategory method...............................................................................118
2.3.11.7 Keepalive method............................................................................................121
2.3.11.8 Trunc method..................................................................................................121
2.3.11.9 LoadAdvanced method....................................................................................122
2.3.11.10 LockFilter method..........................................................................................122
2.3.11.11 UnLock method..............................................................................................123
2.3.11.12 UnLockFilter method.....................................................................................124
2.3.11.13 Lock method..................................................................................................125
2.3.11.14 Download method.........................................................................................125
2.3.11.15 CheckEventValid method...............................................................................126
2.3.11.16 Stream method..............................................................................................127
2.3.11.17 RangeExport method.....................................................................................129
2.3.11.18 GetRangeExportProgress method.................................................................129
2.3.11.19 OnRangeExportDone method........................................................................130
2.3.11.20 API Error Code................................................................................................130
2.3.12 SYNO.SurveillanceStation.Recording.Export...........................................................132
2.3.12.1 Load method....................................................................................................132
2.3.12.2 CheckName method........................................................................................133
2.3.12.3 CamEnum method...........................................................................................134
2.3.12.4 CheckAvailableExport method.........................................................................135
2.3.12.5 Save method....................................................................................................136
2.3.12.6 GetEvtExpInfo method.....................................................................................137
2.3.12.7 API Error Code..................................................................................................138
Copyright � Synology Inc. All rights Reserved.
10
Synology Surveillance Station Web API
2.3.13 SYNO.SurveillanceStation.Recording.Mount..........................................................139
2.3.13.1 Load method....................................................................................................139
2.3.13.2 API Error Code..................................................................................................143
2.3.14 SYNO.SurveillanceStation.CMS...............................................................................144
2.3.14.1 Redirect method..............................................................................................144
2.3.14.2 ModifySharePriv method.................................................................................145
2.3.14.3 ApplyOption method.......................................................................................145
2.3.14.4 GetInfo method...............................................................................................147
2.3.14.5 DoSyncData method........................................................................................149
2.3.14.6 CheckSambaEnabled method..........................................................................150
2.3.14.7 BatCheckSambaService method......................................................................151
2.3.14.8 GetMDSnapshot method.................................................................................151
2.3.14.9 GetCMSStatus method....................................................................................152
2.3.14.10 EnableSamba method....................................................................................152
2.3.14.11 NotifyCMSBreak method...............................................................................153
2.3.14.12 LockSelf method............................................................................................153
2.3.14.13 API Error Code................................................................................................154
2.3.15 SYNO.SurveillanceStation.CMS.GetDsStatus..........................................................155
2.3.15.1 EnableCMS method.........................................................................................155
2.3.15.2 UnPair method.................................................................................................156
2.3.15.3 GetFreeSpace method.....................................................................................157
2.3.15.4 Lock method....................................................................................................157
2.3.15.5 Test method.....................................................................................................159
2.3.15.6 Logout method................................................................................................160
2.3.15.7 Pair method.....................................................................................................161
2.3.15.8 Login method...................................................................................................163
2.3.15.9 API Error Code..................................................................................................166
2.3.16 SYNO.SurveillanceStation.CMS.SlavedsWizard.......................................................167
2.3.16.1 Save method....................................................................................................167
2.3.16.2 API Error Code..................................................................................................168
2.3.17 SYNO.SurveillanceStation.CMS.SlavedsList.............................................................169
2.3.17.1 Load method....................................................................................................169
2.3.17.2 API Error Code..................................................................................................175
2.3.18 SYNO.SurveillanceStation.Log.................................................................................176
2.3.18.1 CountByCategory method...............................................................................176
2.3.18.2 Clear method...................................................................................................179
2.3.18.3 List method......................................................................................................180
2.3.18.4 GetSetting method..........................................................................................184
2.3.18.5 SetSetting method...........................................................................................185
Copyright � Synology Inc. All rights Reserved.
11
Synology Surveillance Station Web API
2.3.18.6 API Error Code..................................................................................................186
2.3.19 SYNO.SurveillanceStation.License...........................................................................187
2.3.19.1 Load method....................................................................................................187
2.3.19.2 CheckQuota method........................................................................................188
2.3.19.3 API Error Code..................................................................................................189
2.3.20 SYNO.SurveillanceStation.Stream...........................................................................190
2.3.20.1 EventStream method.......................................................................................190
2.3.20.2 API Error Code..................................................................................................190
2.3.21 SYNO.SurveillanceStation.ActionRule.....................................................................191
2.3.21.1 Save method....................................................................................................191
2.3.21.2 DownloadHistory method...............................................................................195
2.3.21.3 SendData2Player method................................................................................195
2.3.21.4 DeleteHistory method.....................................................................................195
2.3.21.5 List method......................................................................................................196
2.3.21.6 Disable method................................................................................................197
2.3.21.7 Enable method.................................................................................................198
2.3.21.8 ListHistory method...........................................................................................198
2.3.21.9 Delete method.................................................................................................200
2.3.21.10 API Error Code................................................................................................200
2.3.22 SYNO.SurveillanceStation.Emap.............................................................................201
2.3.22.1 List method......................................................................................................201
2.3.22.2 Load method....................................................................................................205
2.3.22.3 API Error Code..................................................................................................210
2.3.23 SYNO.SurveillanceStation.Emap.Image..................................................................211
2.3.23.1 Load method....................................................................................................211
2.3.23.2 API Error Code..................................................................................................211
2.3.24 SYNO.SurveillanceStation.Notification....................................................................212
2.3.24.1 GetRegisterToken method...............................................................................212
2.3.24.2 SetCustomizedMessage method.....................................................................213
2.3.24.3 GetCustomizedMessage method....................................................................213
2.3.24.4 SetVariables method........................................................................................214
2.3.24.5 GetVariables method.......................................................................................214
2.3.24.6 SetAdvSetting method.....................................................................................215
2.3.24.7 GetAdvSetting method....................................................................................215
2.3.24.8 API Error Code..................................................................................................216
2.3.25 SYNO.SurveillanceStation.Notification.SMS...........................................................217
2.3.25.1 SendTestMessage method..............................................................................217
2.3.25.2 GetSetting method..........................................................................................218
2.3.25.3 SetSetting method...........................................................................................219
Copyright � Synology Inc. All rights Reserved.
12
Synology Surveillance Station Web API
2.3.25.4 API Error Code..................................................................................................221
2.3.26 SYNO.SurveillanceStation.Notification.PushService...............................................222
2.3.26.1 SendTestMessage method..............................................................................222
2.3.26.2 GetSetting method..........................................................................................223
2.3.26.3 SetSetting method...........................................................................................224
2.3.26.4 SendVerificationMail method..........................................................................225
2.3.26.5 ListMobileDevice method................................................................................225
2.3.26.6 UnpairMobileDevice method..........................................................................226
2.3.26.7 API Error Code..................................................................................................226
2.3.27 SYNO.SurveillanceStation.Notification.Schedule....................................................227
2.3.27.1 GetAccessControlControllerSchedule method................................................227
2.3.27.2 GetCameraAlarmSchedule method.................................................................229
2.3.27.3 GetSystemDEpendentSchedule method.........................................................230
2.3.27.4 SetBatchSchedule method...............................................................................232
2.3.27.5 GetAccessControlDoorSchedule method........................................................233
2.3.27.6 GetCameraSchedule method...........................................................................234
2.3.27.7 SetSystemDependentSchedule method..........................................................235
2.3.27.8 SetAccessControlSchedule method.................................................................237
2.3.27.9 SetCameraSchedule method...........................................................................238
2.3.27.10 API Error Code................................................................................................240
2.3.28 SYNO.SurveillanceStation.Notification.Email..........................................................241
2.3.28.1 GetSetting method..........................................................................................241
2.3.28.2 SendTestMail method......................................................................................242
2.3.28.3 SetSetting method...........................................................................................243
2.3.28.4 API Error Code..................................................................................................244
2.3.29 SYNO.SurveillanceStation.Notification.Filter..........................................................245
2.3.29.1 Set method.......................................................................................................245
2.3.29.2 Get method......................................................................................................245
2.3.29.3 API Error Code..................................................................................................248
2.3.30 SYNO.SurveillanceStation.Notification.SMS.ServiceProvider.................................249
2.3.30.1 Create method.................................................................................................249
2.3.30.2 Set method.......................................................................................................250
2.3.30.3 List method......................................................................................................250
2.3.30.4 Delete method.................................................................................................251
2.3.30.5 API Error Code..................................................................................................252
2.3.31 SYNO.SurveillanceStation.Addons..........................................................................253
2.3.31.1 GetUpdateInfo method...................................................................................253
2.3.31.2 Enable method.................................................................................................254
2.3.31.3 CheckUpdateInfo method...............................................................................255
Copyright � Synology Inc. All rights Reserved.
13
Synology Surveillance Station Web API
2.3.31.4 GetInfo method...............................................................................................256
2.3.31.5 List method......................................................................................................257
2.3.31.6 Update method................................................................................................260
2.3.31.7 CheckEnableDone method..............................................................................261
2.3.31.8 Disable method................................................................................................262
2.3.31.9 SetAutoUpdate method...................................................................................263
2.3.31.10 API Error Code...............................................................................................263
2.3.32 SYNO.SurveillanceStation.Alert...............................................................................264
2.3.32.1 RecServerClear method...................................................................................264
2.3.32.2 EventCount method.........................................................................................265
2.3.32.3 ClearSelected method.....................................................................................266
2.3.32.4 Clear method...................................................................................................266
2.3.32.5 Enum method..................................................................................................267
2.3.32.6 RecServerEnum method..................................................................................271
2.3.32.7 Unlock method................................................................................................273
2.3.32.8 Trigger method................................................................................................275
2.3.32.9 EventFlushHeader method..............................................................................275
2.3.32.10 Lock method..................................................................................................276
2.3.32.11 RecServerEventCount method......................................................................277
2.3.32.12 API Error Code................................................................................................278
2.3.33 SYNO.SurveillanceStation.Alert.Setting..................................................................279
2.3.33.1 Save method....................................................................................................279
2.3.33.2 API Error Code..................................................................................................280
2.3.34 SYNO.SurveillanceStation.SnapShot.......................................................................281
2.3.34.1 ChkFileExist method........................................................................................281
2.3.34.2 Edit method.....................................................................................................282
2.3.34.3 CountByCategory method...............................................................................285
2.3.34.4 ChkContainLocked method..............................................................................287
2.3.34.5 UnlockFiltered method....................................................................................288
2.3.34.6 List method......................................................................................................289
2.3.34.7 Unlock method................................................................................................294
2.3.34.8 TakeSnapshot method.....................................................................................295
2.3.34.9 GetSetting method..........................................................................................296
2.3.34.10 DeleteFiltered method..................................................................................297
2.3.34.11 LoadSnapshot method...................................................................................298
2.3.34.12 Lock method..................................................................................................298
2.3.34.13 Download method.........................................................................................299
2.3.34.14 LockFiltered method......................................................................................299
2.3.34.15 SaveSetting method.......................................................................................300
Copyright � Synology Inc. All rights Reserved.
14
Synology Surveillance Station Web API
2.3.34.16 Save method..................................................................................................301
2.3.34.17 ChkSnapshotValid method............................................................................303
2.3.34.18 Delete method...............................................................................................304
2.3.34.19 API Error Code................................................................................................304
2.3.35 SYNO.SurveillanceStation.VisualStation.................................................................305
2.3.35.1 Enable method.................................................................................................305
2.3.35.2 ReqNetConfig method.....................................................................................306
2.3.35.3 Edit method.....................................................................................................307
2.3.35.4 Lock method....................................................................................................308
2.3.35.5 Enum method..................................................................................................309
2.3.35.6 Unlock method................................................................................................311
2.3.35.7 Disable method................................................................................................312
2.3.35.8 Delete method.................................................................................................313
2.3.35.9 API Error Code..................................................................................................313
2.3.36 SYNO.SurveillanceStation.VisualStation.Layout.....................................................314
2.3.36.1 Enum method..................................................................................................314
2.3.36.2 Save method....................................................................................................317
2.3.36.3 Delete method.................................................................................................319
2.3.36.4 API Error Code..................................................................................................320
2.3.37 SYNO.SurveillanceStation.VisualStation.Search.....................................................321
2.3.37.1 Start method....................................................................................................321
2.3.37.2 SearchIP method..............................................................................................322
2.3.37.3 Stop method....................................................................................................323
2.3.37.4 InfoGet method...............................................................................................324
2.3.37.5 API Error Code..................................................................................................327
2.3.38 SYNO.SurveillanceStation.AxisAcsCtrler.................................................................328
2.3.38.1 GetUpdateInfo method...................................................................................328
2.3.38.2 CountByCategoryCardHolder method.............................................................329
2.3.38.3 EnumLogConfig method..................................................................................330
2.3.38.4 GetCardholderPhoto method..........................................................................331
2.3.38.5 CountByCategoryLog method..........................................................................332
2.3.38.6 EnumCardHolder method................................................................................334
2.3.38.7 RetrieveLastCard method................................................................................336
2.3.38.8 EnableCtrler method........................................................................................337
2.3.38.9 AckAlarm method............................................................................................338
2.3.38.10 SaveLogConfig method..................................................................................339
2.3.38.11 Save method..................................................................................................339
2.3.38.12 DownloadLog method...................................................................................340
2.3.38.13 GetDoorNames method................................................................................341
Copyright � Synology Inc. All rights Reserved.
15
Synology Surveillance Station Web API
2.3.38.14 TestConnect method.....................................................................................342
2.3.38.15 Enum method................................................................................................343
2.3.38.16 SaveCardHolder method................................................................................348
2.3.38.17 ListDoor method............................................................................................349
2.3.38.18 ClearLog method............................................................................................350
2.3.38.19 ListPrivilege method......................................................................................351
2.3.38.20 DoorControl method.....................................................................................353
2.3.38.21 SavePrivilege method....................................................................................353
2.3.38.22 ListLog method..............................................................................................354
2.3.38.23 Delete method...............................................................................................359
2.3.38.24 Retrieve method............................................................................................360
2.3.38.25 BlockCardHolder method..............................................................................360
2.3.38.26 CountByCategory method.............................................................................361
2.3.38.27 API Error Code................................................................................................361
2.3.39 SYNO.SurveillanceStation.AxisAcsCtrler.Search.....................................................363
2.3.39.1 Start method....................................................................................................363
2.3.39.2 InfoGet method...............................................................................................363
2.3.39.3 API Error Code..................................................................................................364
2.3.40 SYNO.SurveillanceStation.DigitalOutput.................................................................365
2.3.40.1 Enum method..................................................................................................365
2.3.40.2 Save method....................................................................................................366
2.3.40.3 PollState method.............................................................................................367
2.3.40.4 API Error Code..................................................................................................367
2.3.41 SYNO.SurveillanceStation.ExternalEvent................................................................368
2.3.41.1 Trigger method................................................................................................368
2.3.41.2 API Error Code..................................................................................................368
2.3.42 SYNO.SurveillanceStation.IOModule......................................................................369
2.3.42.1 Enum method..................................................................................................369
2.3.42.2 EnumPort method...........................................................................................375
2.3.42.3 EnumVendorModel method............................................................................380
2.3.42.4 Save method....................................................................................................381
2.3.42.5 Enable method.................................................................................................383
2.3.42.6 Disable method................................................................................................383
2.3.42.7 Delete method.................................................................................................383
2.3.42.8 TestConn method............................................................................................384
2.3.42.9 GetCap method................................................................................................384
2.3.42.10 PortSetting method.......................................................................................387
2.3.42.11 PollingDI method...........................................................................................388
2.3.42.12 PollingDO method..........................................................................................389
Copyright � Synology Inc. All rights Reserved.
16
Synology Surveillance Station Web API
2.3.42.13 GetDevNumOfDs method..............................................................................390
2.3.42.14 CountByCategory method.............................................................................391
2.3.42.15 API Error Code................................................................................................392
2.3.43 SYNO.SurveillanceStation.IOModuleSearch...........................................................393
2.3.43.1 Start method....................................................................................................393
2.3.43.2 InfoGet method...............................................................................................393
2.3.43.3 API Error Code..................................................................................................394
2.3.44 SYNO.SurveillanceStation.Camera.Status...............................................................395
2.3.44.1 OneTime method.............................................................................................395
2.3.44.2 API Error Code..................................................................................................396
2.3.45 SYNO.SurveillanceStation.PTZ.Preset.....................................................................397
2.3.45.1 Enum method..................................................................................................397
2.3.45.2 GetInfo method...............................................................................................398
2.3.45.3 SetPreset method............................................................................................400
2.3.45.4 DelPreset method............................................................................................400
2.3.45.5 Execute method...............................................................................................401
2.3.45.6 SetHome method.............................................................................................401
2.3.45.7 API Error Code..................................................................................................402
2.3.46 SYNO.SurveillanceStation.PTZ.Patrol......................................................................403
2.3.46.1 Enum method..................................................................................................403
2.3.46.2 EnumPartial method........................................................................................404
2.3.46.3 Load method....................................................................................................405
2.3.46.4 Save method....................................................................................................406
2.3.46.5 Delete method.................................................................................................408
2.3.46.6 Excute method.................................................................................................408
2.3.46.7 Stop method....................................................................................................409
2.3.46.8 API Error Code..................................................................................................409
2.3.47 SYNO.SurveillanceStation.Camera.Search..............................................................410
2.3.47.1 Start method....................................................................................................410
2.3.47.2 GetInfo method...............................................................................................410
2.3.47.3 API Error Code..................................................................................................411
2.3.48 SYNO.SurveillanceStation.HomeMode...................................................................412
2.3.48.1 Switch method.................................................................................................412
2.3.48.2 GetInfo method...............................................................................................412
2.3.48.3 API Error Code..................................................................................................414
2.3.49 SYNO.SurveillanceStation.Transactions.Device......................................................415
2.3.49.1 Enum................................................................................................................415
2.3.49.2 API Error Code..................................................................................................418
2.3.50 SYNO.SurveillanceStation.Transactions.Transaction..............................................419
Copyright � Synology Inc. All rights Reserved.
17
Synology Surveillance Station Web API
2.3.50.1 Enum................................................................................................................419
2.3.50.2 Lock..................................................................................................................423
2.3.50.3 Unlock..............................................................................................................424
2.3.50.4 Delete...............................................................................................................426
2.3.50.5 Begin................................................................................................................427
2.3.50.6 Complete..........................................................................................................427
2.3.50.7 Cancel...............................................................................................................428
2.3.50.8 AppendData.....................................................................................................429
2.3.50.9 API Error Code..................................................................................................429
2.3.51 SYNO.SurveillanceStation.Archiving.Pull.................................................................430
2.3.51.1 SaveTask...........................................................................................................431
2.3.51.2 LoginSourceDS.................................................................................................432
2.3.51.3 DeleteTask.......................................................................................................443
2.3.51.4 ListTask.............................................................................................................444
2.3.51.5 EnableTask.......................................................................................................447
2.3.51.6 DisableTask......................................................................................................447
2.3.51.7 BatchEditTask...................................................................................................448
2.3.51.8 GetBatchEditProgress......................................................................................449
2.3.51.9 BatchEditProgressDone...................................................................................449
2.3.51.10 API Error Code................................................................................................450
2.3.52 SYNO.SurveillanceStation.YoutubeLive...................................................................451
2.3.52.1 Load..................................................................................................................452
2.3.52.2 Save..................................................................................................................453
2.3.52.3 CloseLive..........................................................................................................453
2.3.53 SYNO.SurveillanceStation.IVA.................................................................................455
2.3.53.1 ListTask.............................................................................................................455
2.3.53.2 SaveTask...........................................................................................................461
2.3.53.3 DeleteTask.......................................................................................................469
2.3.53.4 EnableTask.......................................................................................................470
2.3.53.5 DisableTask......................................................................................................471
2.3.53.6 ResetPplCntCounter.........................................................................................471
2.3.53.7 API Error Code..................................................................................................472
2.3.54 SYNO.SurveillanceStation.IVA.Report.....................................................................473
2.3.54.1 GetCount..........................................................................................................473
2.3.54.2 GetReport........................................................................................................474
2.3.55 SYNO.SurveillanceStation.IVA.Recording................................................................477
2.3.55.1 List....................................................................................................................477
2.3.55.2 Delete...............................................................................................................480
2.3.55.3 GetAnalyticsResult...........................................................................................481
Copyright � Synology Inc. All rights Reserved.
18
Synology Surveillance Station Web API
2.3.55.4 Lock..................................................................................................................489
2.3.55.5 Unlock..............................................................................................................489
2.3.56 SYNO.SurveillanceStation.IVA.TaskGroup...............................................................491
2.3.56.1 List....................................................................................................................491
2.3.56.2 Create...............................................................................................................493
2.3.56.3 Edit...................................................................................................................494
2.3.56.4 Delete...............................................................................................................496
2.3.56.5 Enable..............................................................................................................496
2.3.56.6 Disable..............................................................................................................497
2.3.56.7 GetPeopleCount...............................................................................................498
2.3.56.8 ResetPeopleCount...........................................................................................498
2.3.57 SYNO.SurveillanceStation.Face...............................................................................500
2.3.57.1 ListTask.............................................................................................................500
2.3.57.2 SaveTask...........................................................................................................504
2.3.57.3 DeleteTask.......................................................................................................508
2.3.57.4 EnableTask.......................................................................................................509
2.3.57.5 DisableTask......................................................................................................509
2.3.57.6 ListPlayableTask...............................................................................................510
2.3.57.7 CreateFaceGroup.............................................................................................511
2.3.57.8 DeleteFaceGroup.............................................................................................512
2.3.57.9 EditFaceGroup.................................................................................................514
2.3.57.10 ListFaceGroup................................................................................................515
2.3.57.11 CountFaceGroup............................................................................................517
2.3.57.12 DetectImageFace...........................................................................................518
2.3.57.13 CreateRegisteredFace....................................................................................525
2.3.57.14 DeleteRegisteredFace....................................................................................529
2.3.57.15 EditRegisteredFace........................................................................................530
2.3.57.16 ListRegisteredFace.........................................................................................533
2.3.57.17 CountRegisteredFace.....................................................................................535
2.3.57.18 SearchRegisteredFace....................................................................................536
2.3.57.19 API Error Code................................................................................................538
2.3.58 SYNO.SurveillanceStation.Face.Result....................................................................539
2.3.58.1 List....................................................................................................................539
2.3.58.2 Delete...............................................................................................................542
2.3.58.3 Lock..................................................................................................................544
2.3.58.4 Unlock..............................................................................................................545
2.3.58.5 GetEventInfo....................................................................................................546
2.3.58.6 GetAnalyticsResult...........................................................................................549
2.3.58.7 Correct.............................................................................................................551
Copyright � Synology Inc. All rights Reserved.
19
Synology Surveillance Station Web API 2.3.58.8 MarkAsStanger.................................................................................................553 2.3.58.9 API Error Code..................................................................................................554
2.3.59 SYNO.SurveillanceStation.Recording.Bookmark.....................................................556 2.3.59.1 SaveBookmark.................................................................................................556 2.3.59.2 DeleteBookmark..............................................................................................557 2.3.59.3 List....................................................................................................................557
3. Resources........................................................................................................................................560 Appendix: Valid values........................................................................................................................561
Copyright � Synology Inc. All rights Reserved.
20
Synology Surveillance Station Web API
1. Overview
Surveillance Station provides a programmable interface allowing the 3rd party integrator/installer to develop application that is highly integrated with Surveillance Station. This interface is called "Surveillance Station Web API", refer to Figure 1-1 for the entire structure:
3rrdd Party Application
HTTP
Web API
Surveillance Station
Figure 1-1 Surveillance Station Web API architecture Surveillance Station Web API is based on HTTP protocol, including functions like camera configuration, PTZ control, live view streaming, video playback, and ... etc.
Copyright � Synology Inc. All rights Reserved.
21
Synology Surveillance Station Web API
2. Surveillance Station Web API Specification
2.1 Concept
Surveillance Station Web API provides a set of API interface allowing the 3rd party application to interact with Surveillance Station via HTTP Request/Response call.
2.1.1
API Definition
Every API will define the following items:
Name It will go after "SYNO.XXX.YYY". XXX will represent the application name, YYY will represent the feature category. For example, SYNO.SurveillanceStation.Camera, SurveillanceStation means the API is provided by the Surveillance Station, Camera means this API will retrieve the camera configurations.
URL path Surveillance Station Web API does not preserve a constant URL for every API. Instead, 3rd party applications need to use the command SYNO.API.Info to retrieve every API's URL path. SYNO.API.Info is the only API with constant URL, and it does not need authorization, its path is /webapi/query.cgi
Method Every method is unique in its own API, and it has to be defined when you use the API. For example, SYNO.SurveillanceStation.Camera API, call the method GetInfo will retrieve some camera configurations.
Version Surveillance Station Web API will require you designate an API version to ensure the result is within the expectation. SYNO.API.Info will return every API's supported versions. "Not supported version" will be returned if API is not supported. We may drop the support on the old API version, make sure you keep this in mind.
Copyright � Synology Inc. All rights Reserved.
22
Synology Surveillance Station Web API
2.1.2
Operation flow
Ensure your application has followed the protocols below to interact with Surveillance Station via Surveillance Station Web API:
3rrdd party application
Surveillance Station
1. Query APIs' information (request SYNO.API.Info)
2. Session login (request SYNO.API.Auth)
3. Send API request and get response
4. Session logout (request SYNO.API.Auth)
Figure 2-1 Operation flow of Web API
Step 1. Query APIs' information Surveillance Station Web API will require you to log in a session before sending any API request. However, the URL of SYNO.API.Auth remains unknown until you have queried it using Query in SYNO.API.Info. All the others' API URL, versions will also be retrieved in this step.
Step 2. Session login After retrieving the URL for SYNO.API.Auth from step 1, your application can call Login method to complete the login process. A HTTP Session Cookie will be returned for authentication after you have successfully log in.
Step 3. Send API request and get response Your application may now start calling any API requests to interact with Surveillance Station, like retrieving camera configurations, live view streaming, or search recorded clips.
Step 4. Session logout When the communication is over, your application should call Logout method in SYNO.API.Auth to end the session.
Copyright � Synology Inc. All rights Reserved.
23
Synology Surveillance Station Web API
2.2 Request & Response Structure
Surveillance Station Web API is based on HTTP protocol, and Request/Response as the communication structure.
2.2.1
Request
Use HTTP Get/Post to send the request with API's URL.
Usage: GET /webapi/<URL_PATH>? api=<API>&method=<METHOD>&version=<VERSION>[&_sid=<SESSION_ID>][&<PARAM_LIST>]
Tag <URL_PATH> <API> <METHOD > <VERSION> <SESSION_ID> <PARAM_LIST>
Description API's URL path Name of the API Name of the API method The version of API Optional, the designate session ID. See 2.3.2 Optional, the parameters of the API method
An Example to retrieve the camera list:
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.Camera&method=List&version=1&start=10&limit=3&_sid="Jn5dZ9aS95wh2"
<URL_PATH>: entry.cgi <API>: SYNO.SurveillanceStation.Camera <METHOD >: List <VERSION>: 1 <PARAM_LIST>: start=10&limit=3 <SESSION_ID> : "Jn5dZ9aS95wh2", should be quoted by ""
To get more detail of session ID, please refer to SYNO.API.Auth.
2.2.2
Response
After receiving the request, API will return the response to the 3rd party application in JSON format.
JSON Containers:
Attribute
Value
success <boolean>
Description Whether this request is successful or not.
Copyright � Synology Inc. All rights Reserved.
24
Synology Surveillance Station Web API
data error
<Result Object> <Error Object>
Optional. It will return data info if this request is successful, for more details please refer to chapters for each API method.
Optional. It will return the error info if this request fails.
<Error Object> Definitions:
Attribute
Value
code
<integer>
Description The error code defined in 2.2.3.
Example 1: Unable to retrieve the camera list when the API version is wrong
{ "success": false, "error": { "code": 104 }
}
Example 2: Retrieve the camera list successfully
{ "success": true, "data": { "total": 38, "offset": 10, "cameras": {...} }
}
2.2.3
Common API Error Code
The table shown below describes the general error codes which might be returned by all APIs. For customized error codes of each API, please refer to the corresponding API method sections to get more details.
Error Code 100 101 102 103 104 105 106 107
Description Unknown error Invalid parameters API does not exist Method does not exist This API version is not supported Insufficient user privilege Connection time out Multiple login detected
Copyright � Synology Inc. All rights Reserved.
25
Synology Surveillance Station Web API
2.3 API List
The following table is the overview of all APIs defined in this section:
API Name SYNO.API.Info SYNO.API.Auth SYNO.SurveillanceStation.Info
SYNO.SurveillanceStation.Camera SYNO.SurveillanceStation.PTZ SYNO.SurveillanceStation.ExternalRecording SYNO.SurveillanceStation.Recording SYNO.SurveillanceStation.Emap SYNO.SurveillanceStation.Emap.Image SYNO.SurveillanceStation.Notification
Description Discover all API information Perform session login and logout Retrieve Surveillance Station-related general information Retrieve camera-related information Perform camera PTZ actions Control external recording of cameras Query recording information Get information of defined E-Maps. Get Image of defined E-Maps. Get authorized token of DS.
Each API has its following definition:
Section 2.3.1 2.3.2 2.3.3
2.3.4 2.3.9 2.3.10 2.3.11 2.3.22 2.3.23 2.3.24
I. Basic Information i. Name: The API name to replace <API> in Web API request syntax. ii. Availability: The version of DSM or Surveillance Station which start to support this API. iii. Version: The current version of this API.
II. Methods i. Request: The request parameters of this method. ii. Response: The returned data object containing response keys.
Name of a method is in upper camel case, while name of a request parameter or a response key is in lower camel case for discrimination.
III. Error Code Corresponding error codes to each API.
Copyright � Synology Inc. All rights Reserved.
26
Synology Surveillance Station Web API
2.3.1
SYNO.API.Info
This is the starter API which has its fixed URL path /webapi/query.cgi. The 3rd party application must retrieve other APIs' information by calling "Query" method.
API Name SYNO.API.Info
Method Name Query
Version 1
Section 2.3.1.1
Availability DSM 3.1-1594
Availability 1 and onward
2.3.1.1 Query method
Discover available APIs and corresponding information.
Request
Parameter query
Value ALL, <string>
Description
Availability
ALL: Get information of all available APIs.
1 and onward
<string>: The list of <API Query Unit> to be queried
concatenated by ",".
<API Query Unit> definition:
Notation
Value
Description
Availability
<API Query Unit> <API Query Name>, Unit of API query target. It could be full name of an 1 and onward
<API Query Prefix> API, or prefix of APIs.
<API Query Name> <string>
Full name of API to be queried. Must be in "SYN- 1 and onward
O.XXX.YYY" format.
Ex: SYNO.API.Auth.
<API Query Prefix> <string>
Prefix of APIs to be queried. Must be in "SYNO.XX." 1 and onward format and ended with ".". Ex: "SYNO.SurveillanceStation." will return the information of APIs with this prefix such as "SYNO.SurveillanceStation.Camera", "SYNO.SurveillanceStation.PTZ", etc.
Example: Get information of SYNO.SurveillanceStation.Camera GET /webapi/query.cgi? api=SYNO.API.Info&method=Query&version=1&query=SYNO.SurveillanceStation.Camera
Get information of APIs with the prefix "SYNO.SurveillanceStation.". GET /webapi/query.cgi? api=SYNO.API.Info&method=Query&version=1&query=SYNO.SurveillanceStation.
Copyright � Synology Inc. All rights Reserved.
27
Synology Surveillance Station Web API
Get information of SYNO.API.Auth and the APIs with the prefix "SYNO.SurveillanceStation.". GET /webapi/query.cgi? api=SYNO.API.Info&method=Query&version=1&query=SYNO.API.Auth,SYNO.SurveillanceStation.
Response Object contains <API Description Objects> list of the requested API(s).
<API Description Object> definition:
Key key path minVersion maxVersion
Value <string> <string> <integer> <integer>
Description The string of API name The string of URL path The minimum supported API version The maximum supported API version
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Example: Return information of SYNO.API.Auth and the APIs with the prefix "SYNO.SurveillanceStation.".
{ "SYNO.API.Auth": { "path": "auth.cgi", "minVersion": 1, "maxVersion": 1 }, "SYNO.SurveillanceStation.Info": { "path": "entry.cgi", "minVersion": 1, "maxVersion": 1 }, "SYNO.SurveillanceStation.Camera": { "path": "entry.cgi", "minVersion": 1, "maxVersion": 2 }, "SYNO.SurveillanceStation.PTZ": { "path": "entry.cgi", "minVersion": 1, "maxVersion": 1 }, "SYNO.SurveillanceStation.ExternalRecording": { "path": "entry.cgi", "minVersion": 1, "maxVersion": 1 }, "SYNO.SurveillanceStation.Recording": { "path": "entry.cgi", "minVersion": 1, "maxVersion": 1 }, "SYNO.SurveillanceStation.Emap": { "path": "entry.cgi",
Copyright � Synology Inc. All rights Reserved.
28
Synology Surveillance Station Web API
"minVersion": 1, "maxVersion": 1 } }
Copyright � Synology Inc. All rights Reserved.
29
Synology Surveillance Station Web API
2.3.2
SYNO.API.Auth
API used to perform session login and logout.
API Name SYNO.API.Auth
Method Name login logout
2.3.2.1 login method
Version 1 2 3 4 5 6
Section 2.3.2.1 2.3.2.2
Availability DSM 3.2 DSM 4.1 DSM 4.2 DSM 5.2
DSM 6.0 beta 1 DSM 6.0 beta2
Availability 1 and onward 1 and onward
Create new login session. Different accounts have different privilege settings; accounts in DSM admin group will have the highest privilege to all camera, camera groups, and Slave DiskStations.
Request
Parameter account passwd session
Value <string> <string> <string>
enable_syno_token <string>
format
cookie, sid
otp_code
<integer>
enable_device_to <string> ken
Description
Availability
Login account name
1 and onward
Login account password
1 and onward
Optional.
1 and onward
Application session name.
User can assign "SurveillanceStation" to this
parameter to login SurveilllanceStation.
If not specified, default session is DSM, and
SurveillanceStation is also available.
Optional.
3 and onward
Return synotoken if value is "yes".
Optional.
2 and onward
If format is "cookie", session ID is included in
both response header and response json data.
If format is "sid", se ssion ID is not included in
response header, but response json data only.
User can append this session ID manually to get
access to any other Web API without
interrupting other logins.
If not specified, default login format is "cookie."
Optional.
3 and onward
6-digit OTP code.
Optional.
6 and onward
yes or no, default to no.
Copyright � Synology Inc. All rights Reserved.
30
Synology Surveillance Station Web API
device_id device_name
<string> <string>
Optional. Device id (max: 255).
Optional. Device name (max: 255).
6 and onward 6 and onward
Example1:
GET /webapi/auth.cgi? api=SYNO.API.Auth&method=login&version=1&account=admin&passwd=123456&session=SurveillanceStat ion
Example2:
GET /webapi/auth.cgi? api=SYNO.API.Auth&method=login&version=2&account=admin&passwd=123456&session=SurveillanceStat ion&format=sid
Response Name
sid
did synotoken
is_portal_port
Value <string>
<string> <string>
<boolean>
Description
Availability
Session ID, pass this value by HTTP argument 2 and onward
"_sid" or Cookie argument.
Device id, use to skip OTP checking.
6 and onward
If CSRF enabled in DSM, pass this value by 3 and onward
HTTP argument "SynoToken"
Login through app portal
4 and onward
Example:
{ "sid":"Jn5dZ9aS95wh2", "is_portal_port":false
}
If login format is "cookie", server will deliver header information including Cookie ID.
HTTP/1.1 200 OK Date: Thu, 31 May 2012 09:40:43 GMT Server: Apache/2.2.22 (Unix) P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT" Set-Cookie: id=Jn5dZ9aS95wh2;path=/ Vary: Accept-Encoding Content-Encoding: gzip Content-Length: 37 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/plain; charset="UTF-8"
If the login format is "sid", user should append the returned sid in any webapi request.
Copyright � Synology Inc. All rights Reserved.
31
Synology Surveillance Station Web API
Example: GET /webapi/camera.cgi? api=SYNO.SurveillanceStation.Camera&method=List&version=1&_sid="Jn5dZ9aS95wh2"
By sid format login and appending _sid to other webapi, the sessions would not affect each others and different privilege settings can be applied simultaneously.
2.3.2.2 logout method
Destroy current login session.
Request
Name session
Value <string>
Description
Optional. Application session name. User can assign "SurveillanceStation" to this parameter to logout SurveillanceStation. If not specified, default session is DSM.
Availability 2 and onward
Example1: GET /webapi/auth.cgi? api=SYNO.API.Auth&method=logout&version=1&session=SurveillanceStation
Example2: GET /webapi/auth.cgi? api=SYNO.API.Auth&method=logout&version=2&session=SurveillanceStation&_sid="Jn5dZ9aS95wh2"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.2.3 API Error Code
Code 100 101 400 401 402
403
404
405
406
407
Description Unknown error. The account parameter is not specified. Invalid password. Guest or disabled account. Permission denied. One time password not specified. One time password authenticate failed. App portal incorrect. OTP code enforced. Max Tries (if auto blocking is set to true).
Copyright � Synology Inc. All rights Reserved.
32
Synology Surveillance Station Web API
408
Password Expired Can not Change.
409
Password Expired.
410
Password must change (when first time use or after reset password by admin).
411
Account Locked (when account max try exceed).
Copyright � Synology Inc. All rights Reserved.
33
Synology Surveillance Station Web API
2.3.3
SYNO.SurveillanceStation.Info
This API provides a method to acquire Surveillance Station related information such as package version, package UI path, and the total number of camera and installed licenses.
API Name SYNO.SurveillanceStation.Info
Method Name GetInfo
2.3.3.1 GetInfo method
Version 1 4 5
Section 2.3.3.1
Availability Surveillance Station 6.0-2337 Surveillance Station 6.3-3316 Surveillance Station 7.0-3718
Availability 1 and onward
Get Surveillance Station related general information. If the user is logged in, the complete information is provided. Otherwise only version and path information is sent.
Request No parameter is required.
Example: GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.Info&method=GetInfo&version=1
Response
Name version
Value <Version Object>
path
<string>
customizedPortHttp <integer>
customizedPortHttps <integer>
cameraNumber
<integer>
licenseNumber
<integer>
maxCameraSupport <integer>
serial
<string>
Description
Availability
Version object to represent package version of 1 and onward
Surveillance Station.
For all users.
UI path to Surveillance Station.
1 and onward
For all users.
Optional.
1 and onward
Customized port of Surveillance Station (HTTP).
For Surveillance-login users only.
Optional.
1 and onward
Customized port of Surveillance Station (HTTPS).
For Surveillance-login users only.
The total number of installed cameras.
1 and onward
For Surveillance-login users only.
The total number of installed licenses.
1 and onward
For Surveillance-login users only.
Maximum number of camera support for this DS. 1 and onward
For Surveillance-login users only.
DS serial number
2 and onward
Copyright � Synology Inc. All rights Reserved.
34
Synology Surveillance Station Web API
isAdmin userPriv
<boolean> <integer>
For Surveillance-login users only.
Login user is admin or not. For Surveillance-login users only.
PRIV_AUTH_NO_ACCESS = 0x00 PRIV_AUTH_ADMIN = 0x01 PRIV_AUTH_MANAGER = 0x02 PRIV_AUTH_VIEWER= 0x04 PRIV_AUTH_ALL = 0xFF
2 and onward 3 and onward
isLicenseEnough allowSnapshot allowManualRec
<boolean> <boolean> <boolean>
allowDeleteRec
<boolean>
For Surveillance-login users only.
Is license enough or not. For Surveillance-login users only.
If user has privilege to take snapshot or not. For Surveillance-login users only.
If user has privilege to do manual recording or not. For Surveillance-login users only.
If user has privilege to delete recordings or not. For Surveillance-login users only.
3 and onward 4 and onward 4 and onward
4 and onward
<Version Object> definition:
Name major minor build
Value <integer> <integer> <integer>
Description Major version of Surveillance Station. Minor version of Surveillance Station. Build number of Surveillance Station.
Availability 1 and onward 1 and onward 1 and onward
Example:
{ "version": { "major": 6, "minor": 0, "build": 2250 }, "path": "/webman/3rdparty/SurveillanceStation", "customizedPortHttp": 9900, "customizedPortHttps": 9901, "cameraNumber": 20, "licenseNumber": 30, "maxCameraSupport": 40, "serial":"A1CDE23456", "userPriv":1, "isLicenseEnough": 1, "allowSnapshot": true, "allowManualRec": true, "alllowDeleteRec": true
}
2.3.3.2 API Error Code
Code
Description
Copyright � Synology Inc. All rights Reserved.
35
Synology Surveillance Station Web API
400
Execution failed.
Copyright � Synology Inc. All rights Reserved.
36
Synology Surveillance Station Web API
2.3.4
SYNO.SurveillanceStation.Camera
This API provides a set of methods to acquire camera-related information and to enable/disable cameras.
API Name SYNO.SurveillanceStation.Camera
Method Name Save List
GetInfo ListGroup GetSnapshot
Enable Disable GetCapabilityByCamId MigrationEnum Migrate CountByCategory RecountEventSize SaveOptimizeParam GetOccupiedSize CheckCamValid MigrationCancel Delete GetLiveViewPath
Version 1 2 6 9
Section 2.3.4.1 2.3.4.2 2.3.4.3 2.3.4.4 2.3.4.5 2.3.4.6 2.3.4.7 2.3.4.8 2.3.4.9 2.3.4.10 2.3.4.11 2.3.4.12 2.3.4.13 2.3.4.14 2.3.4.15 2.3.4.16 2.3.4.17 2.3.4.18
Availability Surveillance Station 6.0-2337
Surveillance Station 6.1 Surveillance Station 6.3 Surveillance Station 8.0
Availability 9 and onward 9 and onward From 1 to 8 From 1 to 8 9 and onward 3 and onward 3 and onward From 4 to 8 From 7 to 8 From 7 to 8 From 7 to 8 From 7 to 8 From 7 to 8 From 7 to 8 From 7 to 8 From 7 to 8 7 and onward 9 and onward
2.3.4.1 Save method
Add new camera or edit existing camera setting.
Request Parameter
id
name
Value
Description
Availability
<CAMERA_ID> Optional.
9 and onward
Camera id to be edited.
If equal to 0, add new camera according to
request parameter.
<string>
Optional.
9 and onward
Camera name to be edited. Note that this
parameter is only valid when "id" is not specified
and "dsId" is specified.
Copyright � Synology Inc. All rights Reserved.
37
Synology Surveillance Station Web API
dsId
<integer>
Optional. Camera owner ds id.
9 and onward
newName
<string>
Optional (Needed when add case). Camera new name.
9 and onward
ip
<string>
Optional (Needed when add case).
9 and onward
Camera ip.
port
<integer>
Optional (Needed when add case).
9 and onward
Camera port.
vendor
<string>
Optional (Needed when add case). Camera vendor.
9 and onward
model
<string>
Optional (Needed when add case). Camera model.
9 and onward
userName
<string>
Optional (Needed when add case). Camera login user name.
9 and onward
password
<string>
Optional (Needed when add case). Camera login password.
9 and onward
videoCodec audioCodec tvStandard
<integer> <integer> <integer>
Optional.
9 and onward
Camera video codec.
� 0 - Unknown
� 1 - MJPEG
� 2 - MPEG4
� 3 - H264
� 5 - MXPEG
� 6 - H265
� 7 - H264+
Optional.
9 and onward
Camera audio codec.
� 0 - Unknown
� 1 - PCM
� 2 - G711
� 3 - G726
� 4 - AAC
� 5 - AMR
� 6 - UserDefine (use only with user define
camera)
Optional.
9 and onward
Camera tv standard.
� 1 - NTSC
� 2 - PAL
Copyright � Synology Inc. All rights Reserved.
38
Synology Surveillance Station Web API
channel
<string>
Optional. Camera channel.
9 and onward
userDefinePath fov
<string> <string>
Optional (Needed when add user define camera). 9 and onward
Camera streaming path.
This parameter only valid when camera vendor is
"User" and model is "Define".
Optional.
9 and onward
Camera field of view.
highProfileStreamNo
<integer>
Optional.
9 and onward
The used stream number of high quality profile.
mediumProfileStreamNo <integer>
Optional. The used stream number of balanced profile.
9 and onward
lowProfileStreamNo streamXX
<integer>
Optional. The used stream number of low bandwidth profile.
<Stream
Optional.
Setting object> XX � Stream number.
9 and onward 9 and onward
recordTime
<integer>
Optional. The recording length in minute.
9 and onward
preRecordTime
<integer>
postRecordTime
<integer>
enableRecordingKeepDays <boolean>
recordingKeepDays
<integer>
enableRecordingKeepSize <boolean>
recordingKeepSize
<integer>
enableLowProfile
<boolean>
Optional. Extra recording time before the start of each recording in second. Optional. Extra recording time after the end of each recording in second. Optional. Does the rotation occur when the limit time is reached. Optional. The upper bound indicating how long a file can be store before rotation. Optional. Does the rotation occur when the limit space is reached. Optional. The upper bound that total file size can reach before rotation. Optional. Does low bandwidth profile enabled.
9 and onward 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward
Copyright � Synology Inc. All rights Reserved.
39
Synology Surveillance Station Web API
recordSchedule
Array of <integer>
Optional. A string consists of 48*7 digits to represent the scheduling. Note that each digit stands for the schedule type of half-hour: 0: No scheduled plan 1: Continuous Recording 2: Motion Detection Recording 3: Custom Detection 1 4: Custom Detection 2
9 and onward
<Stream Setting Object> definition:
Key fps
Value <integer>
resolution
<string>
bitrateCtrl
<integer>
quality
<integer>
constantBitrate
<integer>
Description
Availability
Optional.
9 and onward
Frames per second of the stream
Optional.
9 and onward
Denoted as width * height
Optional.
9 and onward
The bitrate control type.
� 0 - None
� 1 - Variable bitrate
� 2 - Constant bitrate
Optional.
9 and onward
An integer ranged from 1 to 5 to indicate the
quality of the stream.
This parameter only valid when using
variable bitrate.
Optional.
9 and onward
The constant bitrate value.
This parameter only valid when using
constant bitrate.
Example1: Adding camera with specific vendor, model.
http://192.168.1.1:5000/webapi/entry.cgi? api=SYNO.SurveillanceStation.Camera&method="Save"&version=9&newName="test"&vendor="ABUS"&m odel="TVIP72500"&ip="192.168.1.2"&port=80&userName="admin"&password="123456"
Example2: Edit stream 1 resolution and fps of a local camera named "test".
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&method="Save"&version=9&name="test"&dsId=0&stream1={"res olution":"1920x1080","fps":15}
Response Key
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
40
Synology Surveillance Station Web API
id camera
<CAMERA_ID> <Camera List object>
The add/edit camera id. The detail information of add/edit camera.
9 and onward 9 and onward
2.3.4.2 List method
Get the list of all cameras.
Request Parameter
idList
offset
limit
blFromCamList
Value <string>
<integer>
<integer>
<boolean>
Description
Availability
Optional.
9 and onward
The list of <CAMERA_ID> to be queried concatenated by
",".
Optional.
9 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
Optional.
9 and onward
Number of cameras to be returned.
If not specified, return cameras to the end of camera list.
Optional Indicating if the caller is from cam list Set to be false if not specified.
9 and onward
blIncludeDeletedCam <boolean> Optional Indicating if deleted cameras should be listed or not set to be false if not specified
privCamType
basic streamInfo
0 ... 15
<boolean> <boolean>
Weighted sum indicated the types of the camera 0x00: NONE 0x01: LIVEVIEW 0x02: PLAYBACK 0x04: LENS 0x08: AUDIO Optional Indicating to show basic settings or not set to be false if not specified
Optional Indicating to show streaming information or not set to be false if not specified
blPrivilege camStm
<boolean>
0, 1, 2
Optional Indicating if the user privilege should be checked or not set to be false if not specified
Stream number of the camera live view � 0: Live stream � 1: Recording stream � 2: Mobile stream (default value)
9 and onward 9 and onward
9 and onward 9 and onward 9 and onward 9 and onward
Example: List 2 cameras starting from offset 10 with all additional information.
Copyright � Synology Inc. All rights Reserved.
41
Synology Surveillance Station Web API
http://192.168.1.1:5000/webapi/entry.cgi? privCamType=3&version="8"&blIncludeDeletedCam=true&streamInfo=true&blPrivilege=false&start=10&a pi="SYNO.SurveillanceStation.Camera"&limit=2&basic=true&blFromCamList=true&camStm=1&method="Li st"
Response
Key total cameras
Value
<integer>
Array of <Camera List Object>
Description
Availability
The number of total installed cameras. 9 and onward
The list of queried cameras.
9 and onward
<Camera List Object> definition:
Key
Value
Description
Availability
DONum
<integer>
Digital output number
9 and onward
DINum
<integer>
Digital input number
9 and onward
audioCodec
<integer>
Camera audio codec. � 0 - Unknown � 1 - PCM � 2 - G711 � 3 - G726 � 4 - AAC � 5 - AMR � 6 - UserDefine (use only with user define camera)
9 and onward
channel
<string>
Camera channel id
9 and onward
dsId
<integer>
The id of the owner of this camera
9 and onward
enableLowProfile
<boolean>
Does low bandwidth profile enabled.
9 and onward
fov highProfileStreamNo
<string> <integer>
Field of view of the camera
The used stream number of high quality profile.
9 and onward 9 and onward
mediumProfileStreamNo <integer>
The used stream number of balanced profile. 9 and onward
lowProfileStreamNo
<integer>
The used stream number of low bandwidth 9 and onward profile.
streamXX
<Stream Setting XX � Stream number. object>
9 and onward
status
1 ... 18
Indicating the camera status � 1: Normal � 2: Deleted � 3: Disconnected � 4: Unavailable � 5: Ready � 6: Inaccessible � 7: Disabled � 8: Unrecognized � 9: Setting � 10: Server disconnected � 11: Migrating � 12: Others
9 and onward
Copyright � Synology Inc. All rights Reserved.
42
Synology Surveillance Station Web API
ip
<string>
id
<CAMERA_ID>
enableRecordingKeepDays <boolean>
model name port recordingKeepDays recordingKeepSize tvStandard
<string> <string> <integer> <integer> <string> <integer>
videoCodec
<integer>
vendor
<string>
� 13: Storage removed � 14: Stopping � 15: Connect hist failed � 16: Unauthorized � 17: RTSP error � 18: No video
IP address of the camera
Camera ID
Does the rotation occur when the limit time is reached.
Model name of the Camera
Name of the camera
Port of the camera
The parameter for replacement strategy
The parameter for replacement strategy
Indicating the TV Standard � 0: None � 1: NTSC � 2: PAL Optional. Camera video codec.
� 0 - Unknown � 1 - MJPEG � 2 - MPEG4 � 3 - H264 � 5 - MXPEG � 6 - H265 � 7 - H264+
Vendor of the camera
9 and onward 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward
9 and onward
9 and onward
Example:
{ "cameras": [ { "DINum":0, "DONum":0, "stream1": { "bitrateCtrl":1, "constantBitrate":"1000", "fps":10, "quality":"5", "resolution":"640x480" }, "audioCodec":0, "channel":"1", "dsId":0, "enableLowProfile":false, "enableRecordingKeepDays":false, "enableRecordingKeepSize":true,
Copyright � Synology Inc. All rights Reserved.
43
Synology Surveillance Station Web API
"fov":"", "highProfileStreamNo":1, "id":144, "ip":"10.13.22.37", "mediumProfileStreamNo":1, "model":"TVIP72500", "newName":"ABUS � TVIP72500", "port":80, "postRecordTime":5, "preRecordTime":5, "recordTime":30, "recordingKeepDays":30, "recordingKeepSize":"10", "status":1, "tvStandard":0, "vendor":"ABUS", "videoCodec":3 }, { "DINum":2, "DONum":0, "stream1":
{ "bitrateCtrl":1, "constantBitrate":"1000", "fps":10, "quality":"5", "resolution":"1280x720"
}, "stream2":
{ "bitrateCtrl":1, "constantBitrate":"0", "fps":10, "quality":"5", "resolution":"704x480"
}, "audioCodec":2, "channel":"1", "dsId":0, "enableLowProfile":false, "enableRecordingKeepDays":false, "enableRecordingKeepSize":true, "fov":"", "highProfileStreamNo":1, "id":154, "ip":"10.13.23.15", "mediumProfileStreamNo":2, "model":"Generic_ONVIF",
Copyright � Synology Inc. All rights Reserved.
44
Synology Surveillance Station Web API
"newName":"ONVIF", "port":80, "postRecordTime":5, "preRecordTime":5, "recordTime":30, "recordingKeepDays":30, "recordingKeepSize":"10", "status":1, "tvStandard":0, "vendor":"ONVIF", "videoCodec":3 }
2.3.4.3 GetInfo method
Get specific camera settings.
Request
Parameter
Value
Description
Availability
cameraIds
<string> The list of <CAMERA_ID> to be queried concatenated by From 1 to 8 ",".
privCamType
0 ... 15 Optional.
Weighted sum indicated the types of the camera
� 0x00: NONE
� 0x01: LIVEVIEW
� 0x02: PLAYBACK
� 0x04: LENS
� 0x08: AUDIO
blIncludeDeletedCam <boolean> Optional.
Is deleted cameras included
From 1 to 8 From 4 to 8
basic
<boolean> Optional.
Is basic information included
From 4 to 8
streamInfo
<boolean> Optional. Is stream information included
From 4 to 8
optimize
<boolean> Optional. Is optimization information included
From 4 to 8
ptz
<boolean> Optional.
Is PTZ information included
From 4 to 8
eventDetection
<boolean> Optional. Is event detection information included
From 4 to 8
deviceOutCap
<boolean> Optional.
From 4 to 8
Is information of device output capability included
fisheye
<boolean> Optional. Is fisheye information included
From 4 to 8
camAppInfo
<boolean> Optional. Is information of camera Application included
From 4 to 8
Copyright � Synology Inc. All rights Reserved.
45
Synology Surveillance Station Web API
Example: Get camera information http://192.168.1.1:5000/webapi/entry.cgi? version="8"&cameraIds="89"&blIncludeDeletedCam=true&deviceOutCap=true&streamInfo=true&method ="GetInfo"&api="SYNO.SurveillanceStation.Camera"&ptz=true&basic=true&privCamType=3&camAppInfo=t rue&optimize=true&fisheye=true&eventDetection=true
Response
Key cameras
Value Array of <Camera Information Object>
Description The list of all queried cameras.
Availability From 1 to 8
<Camera Information Object> definition:
Key
Value
ADCap DINum DONum
<integer> <integer> <integer>
MDCap TDCap
<integer> <integer>
analyticsBeep
<boolean>
analyticsDirection 0, 1
analyticsDwellTime <integer>
analyticsFrame analyticsHeight
<boolean> <integer>
analyticsLine analyticsObjSize
<boolean> <integer>
analyticsRegion analyticsSens
analyticsType
<string>
1, 2, 3
1 ... 9
analyticsVirtualFence <boolean>
analyticsWidth
<integer>
audioCap audioOut audioType autoFocus
<boolean> <boolean> <integer> <boolean>
Description Audio detection capability
Digital input number Digital output number
Which codec has MD capability Tamper detection capability
Point out that beep or not � 0 : one way � 1 : two way Analytics dwellTime for ANALYTICS_TYPE_LOITERING Point out that show frame or not
Parameter for the live detection(no longer relevent)
Point out that show line or not Analytics objSize for ANALYTICS_TYPE_FOREIGN_OBJ Analytics region
� 1: LOW � 2: MEDIUM � 3: HIGH � 1: NONE � 2: MOTION � 3: MISSING_OBJ � 4: FOREIGN_OBJ � 5: CAM_OCCLUSION � 6: FOCUS_LOST � 7: LOITERING � 8: OBJ_COUNTING � 9: VIRTUAL_FENCE
Point out that show virtual fence or not Parameter for the live detection(no longer relevent) Audio capability
Does the camera support audioOut Audio type
Auto focus
Availability From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
From 4 to 8
From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8
From 4 to 8
From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
Copyright � Synology Inc. All rights Reserved.
46
Synology Surveillance Station Web API
autoPan blLiveviewPriv blPresetSpeed camIdOnRecServer camLiveMode
<integer>
<boolean> <boolean>
<integer> 0, 1
camMountType
0,
1,
2
camPath camStatus
<string> 0 ... 4
channel_id daybegin
dayend
deleted detailInfo
deviceType
<string> <integer>
<integer>
<boolean> <Camera DerailInfo Object> 1 ... 15
dsIp dsPort enabled exposure_control
<string> <integer> <boolean> 0 ... 6
exposure_mode
0 ... 4
feRegionList
Array of <Fisheye Region Object>
Auto pan
From 4 to 8
live view privilege
From 4 to 8
Can speed pre-setted
From 4 to 8
Camera ID on recording server
From 4 to 8
Determing the source of live view
From 4 to 8
� 0: DS
� 1: Camera
How camera is mounted
From 4 to 8
� 0: CEILING
� 1: WALL
� 2: FLOOR
Camera Path
From 4 to 8
Indicating the camera status
From 4 to 8
� 0: Normal
� 1: Disconnected
� 2: Disabled
� 3: Deleted
� 4: Others
Camera channel id
From 4 to 8
Camera optimization exposure mode day From 4 to 8
begin time
Camera optimization exposure mode day end From 4 to 8
time
Is deleted
From 4 to 8
Detail information of the camera
From 4 to 8
Using weighted sum to verify the device
type � 0x01: CAMERA � 0x02: VIDEO_SERVER � 0x04: PTZ � 0x08: FISHEYE
IP of the DS
Port of the DS
Is the camera enabled?
Indicating type of exposure control � 0: AUTO � 1: 50HZ � 2: 60HZ � 3: HOLD � 4: OUTDOOR � 5: NONE � 6: UNKNOWN Indicating exposure mode � 0: AUTO � 1: DAY � 2: NIGHT � 3: SCHEDULE � 4: UNKNOWN List of fisheye camera regions
From 4 to 8
From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
From 4 to 8
From 4 to 8
Copyright � Synology Inc. All rights Reserved.
47
Synology Surveillance Station Web API
fisheyeDispMode fisheyeType folder fps hasCamParam host id imageEnhancement
isStatusUnrecognized is_rotated_by_date
<string> <integer> <string> <integer> <boolean> <string> <integer> <Image Enhancement Object> <boolean> <boolean>
is_rotated_by_space <boolean>
model multiDI mute name objTrack
<string> <boolean> <boolean> <string> <boolean>
osd_format
0 ... 3
osd_position osd_status ownerDsId param_chklist
<integer> <boolean> <integer> 0 ... 127
port presetNum
ptzCap ptzContinuous ptzDirection
quality recBitrateCtrl
<integer> <integer>
<integer> <integer> <integer>
<string> 0, 1, 2
The display mode of fisheye camera
From 4 to 8
The type of fisheye
From 4 to 8
Path to the recorded video
From 4 to 8
The fps of recording stream
From 4 to 8
True if the camera has parameter capability From 4 to 8
IP address of the camera
From 4 to 8
Camera ID
From 4 to 8
The parameters of the image enhancement From 4 to 8
Is status of the camera unrecognized
Indicating if the replacing strategy
"rotation_by_date" is enabled
Indicating if the replacing strategy
"rotation_by_space" is enabled
Model name of the Camera
Is there multi digital input Is the camera mute
Name of the camera
Is the camera with capability of object tracking Indicating the format of OSD is � 0: NON � 1: DATE � 2: TIME � 3: TEXT The position of osd Is the OSD on/off
The id of the owner of this camera
Weighted sum indicating the check list of parameters � 0x00: NONE � 0x01: TIME_SERVER � 0x02: VIDEO_MIRROR � 0x04: VIDEO_FLIP � 0x08: VIDEO_ROTATE � 0x10: EXPOSURE_CONTROL � 0x20: EXPOSURE_MODE � 0x40: OSD_TIMESTAMP
Port of the camera
The maximal number of preset regions for
the PTZ camera
Capability of PTZ camera
Is PTZ moving in continuous mode The number of directions PTZ camera supports
Quality of the recording stream
Indicating the bitrate of recording stream � 0: NONE � 1: VARIABLE � 2: CONSTANT
From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
Copyright � Synology Inc. All rights Reserved.
48
Synology Surveillance Station Web API
recCbrBitrate recStatus resolution rotation_by_date rotation_by_space rotation_option setDICap setDOCap singleStream snapshot_path status
status_flags stmFisheyeType
stm_info time_server tvStandard
type update_time vendor
<integer> <integer> <string> <integer> <string> <integer> <boolean>
<boolean>
<boolean> <string> <integer>
<integer>
A constant indicating the bitrate
Indicating the recording method
Resolution of the camera
The parameter for replacement strategy
The parameter for replacement strategy
The recording option when rotation occurs Does camera have the capability of digital input Does camera have the capability of digital output Does the camera provide only single stream The path for obtaining snapshop
Indicating the status of the camera � 0: ENABLED � 1: DISABLED � 2: ACCTIVATING � 3: DISABLING � 4: RESTARTING � 5: UNKNOWN Flags of the camera status
0 ... 18
Type of the Fisheye camera
� 0: NONE
� 1: VIVOTEK
� 2: MOBOTIX
� 3: PIXORD
� 4: AXIS
� 5: DLINK
� 6: GEOVISION
� 7: PANASONIC
� 8: BRICKCOM
� 9: ACTI
� 10: ACTI_KCM
� 11: ACTI_I51
� 12: SAMSUNG
� 13: 3S
� 14: SONY
� 15: ONCAMGRANDEYE
� 16: MOBOTIX_Q25M
� 17: A_MTK
� 18: SENTRY
Array of <Stream Information of each stream
Information Object>
<string>
The NTP server
0,
Indicating the TV Standard
1,
� 0: NTSC
2
� 1: PAL
� 2: NONE
<integer>
Type of the camera
<integer>
The last update time in timestamp
<string>
Vendor of the camera
From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8 From 4 to 8
Copyright � Synology Inc. All rights Reserved.
49
Synology Surveillance Station Web API
videoCapList
video_flip video_mirror video_rotation volume volume_space
Array of <Video Capability Object> <boolean>
<boolean> <integer>
<integer> <string>
From 4 to 8
<Camera DetailInfo Object> definition:
Key
Value
camAudioType
0 ... 5
camChannel camFolder camFov camFps camIP camIsRotByDate
<string> <string> <string> <integer> <string> <boolean>
camIsRotBySpace
<boolean>
camLiveBitrateCtrl 0, 1, 2
camLiveCbrBitrate camLiveFps camLiveMode
<integer>
<integer>
0, 1
camLiveQuality
<string>
camLiveResolution <string>
camLiveStreamNo <integer>
camMobileBitrateCtrl 0,
1,
2
camMobileCbrBitrate <integer>
camMobileFps
<integer>
camMobileQuality <string>
camMobileResolution <string>
camMobileStreamNo <integer>
camModel
<string>
camMountType
0,
List of the video capability
Is the video flip Is the video mirror Is the video rotated Size of the volume The size of the recorded videos of the camera
From 4 to 8
From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
Description
Availability
Indicating audio type
From 4 to 8
� 0: UNKNOWN
� 1: PCM
� 2: G711
� 3: G726
� 4: AAC
� 5: AMR
Channel of the output video
From 4 to 8
Folder to store configuration and video
From 4 to 8
Field of view of the camera
From 4 to 8
The fps of recording stream
From 4 to 8
IP address of the camera
From 4 to 8
Does the rotation occur when the limit time From 4 to 8
is reached
Does the rotation occur when the limit space From 4 to 8
is reached
Indicating the bitrate of live stream
From 4 to 8
� 0: NONE
� 1: Variable
� 2: Constant
A constant indicating the bitrate
From 4 to 8
The fps of live stream
From 4 to 8
Determining the source of live view
From 4 to 8
� 0: DS
� 1: Camera
The quality of live stream
From 4 to 8
The resolution of live stream
From 4 to 8
The stream number of live stream
From 4 to 8
Indicating the bitrate of mobile stream
From 4 to 8
� 0: NONE
� 1: Variable
� 2: Constant
A constant indicating the bitrate
From 4 to 8
The fps of mobile stream
From 4 to 8
The quality of mobile stream
From 4 to 8
The resolution of mobile stream
From 4 to 8
The stream number of mobile stream
From 4 to 8
Model name of the camera
From 4 to 8
How camera is mounted
From 4 to 8
Copyright � Synology Inc. All rights Reserved.
50
Synology Surveillance Station Web API
1, 2
camName camPassWord camPort camPostRecTime
<string> <string> <integer> <integer>
camPreRecTime
<integer>
camPrefix camQuality camRecBitrateCtrl
<string>
<string>
0, 1, 2
camRecCbrBitrate camRecStreamNo camRecTime camResolution camRotByDate
<integer> <integer> <integer> <string> <integer>
camRotBySpace
<integer>
camRotOption
<integer>
camRtspProtocol
0 ... 4
camSchedule
camServer camTvStandard
Array of <integer>
<integer> <integer>
camUserName camVendor camVideoType
<string> <string> <string>
customAlarmDetect <integer>
� 0: CEILING
� 1: WALL
� 2: FLOOR
Camera name
From 4 to 8
Password of the camera
From 4 to 8
Port of the camera
From 4 to 8
Extra recording time after the end of each From 4 to 8
recording
Extra recording time before the start of each From 4 to 8
recording
The prefix of the recording file name
From 4 to 8
The quality of recording stream
From 4 to 8
Indicating the bitrate of recording stream From 4 to 8
� 0: NONE
� 1: Variable
� 2: Constant
A constant indicating the bitrate
From 4 to 8
Stream number of recording stream
From 4 to 8
The recording length in minute
From 4 to 8
The resolution of recording stream
From 4 to 8
The upper bound indicating how long a file From 4 to 8
can be store before rotation
The upper bound that total file size can reach From 4 to 8
before rotation
Indicating the behavior when the space is From 4 to 8
full, rotate/stop
Indicating the protocol of RTSP
From 4 to 8
� 0: NONE
� 1: UDP
� 2: TCP
� 3: HTTP
� 4: Auto
This variable is actually a 2-dimension, 48*7 From 4 to 8
array indicating the recording schedule at
each half hour
The DS Id on which the camera is mounted From 4 to 8
Indicating the TV Standard
From 4 to 8
� 0: NTSC
� 1: PAL
� 2: NONE
User name to access the camera
From 4 to 8
Vendor of the camera
From 4 to 8
Indicating video type
From 4 to 8
� 0: UNKNOWN
� 1: MJPEG
� 2: MPEG4
� 3: H264
� 4: EMAP
� 5: MXPEG
Determining the type of alarm in the
From 4 to 8
schedule field
Copyright � Synology Inc. All rights Reserved.
51
Synology Surveillance Station Web API
customDetect
<integer>
edgeStgDownloadSch Array of <integer>
edgeStgEnabled edgeStgRecDays
edgeStgRecMode
<boolean> <integer>
1 ... 15
edgeStgRecStartTime <string>
edgeStgRecStopTime <string>
edgeStgRetrieveAction 0, 1, 2, 3
Determining the type of motion detection in From 4 to 8
the schedule field
This variable is actually a 2-dimension, 48*7 From 4 to 8
array indicating the recording schedule at
each half hour
Is the edge storage enabled
From 4 to 8
Using an weighted sum for verifying which From 4 to 8
day to record
A weighted sum indicating the recording From 4 to 8
mode
� 0x01: CONTINUOUS
� 0x02: MD
� 0x04: DI
� 0x08: AUDIO_DET
The start time of edge storage recording
From 4 to 8
The stop time of edge storage recording
From 4 to 8
Indicating the retrieve action is
From 4 to 8
� 0: NONE
� 1: DOWNLOAD
� 2: GET_LOST
� 3: NO_RETRIEVE
<Fisheye Region Object> definition:
Key camId id name posX posY regions
type
Value <integer> <integer> <string> <integer> <integer> Array of <Fisheye Sub-region Object> -1 ... 6
zoom
<integer>
Description Camera ID Region ID Name of the Region X-coordinate value of the dewarping region Y-coordinate value of the dewarping region List of sub regions of the camera
Type of fisheye region. � -1: FISHEYE_NOT_REGION � 0: FISHEYE_REGION � 1: FISHEYE_PANORAMA � 2: FISHEYE_DOUBLE_PANORAMA � 3: FISHEYE_TRIPLE_VIEW � 4: FISHEYE_QUAD_VIEW � 5: FISHEYE_SUB_REGION � 6: FISHEYE_SUB_PANORAMA Zoom value
Availability From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
From 4 to 8
<Fisheye Sub-region Object> definition:
Key
Value
camId id name
<integer> <integer> <string>
location posX
<integer> <integer>
Description Camera ID Region ID Name of the sub-region Location of the Region X-coordinate value of the dewarping region
Availability From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
Copyright � Synology Inc. All rights Reserved.
52
Synology Surveillance Station Web API
posY strSubRegionInfo
<integer> <string>
type
-1 ... 6
zoom
<integer>
Y-coordinate value of the dewarping region From 4 to 8
Information about sub-region
From 4 to 8
Type of fisheye region. � -1: FISHEYE_NOT_REGION � 0: FISHEYE_REGION � 1: FISHEYE_PANORAMA � 2: FISHEYE_DOUBLE_PANORAMA � 3: FISHEYE_TRIPLE_VIEW � 4: FISHEYE_QUAD_VIEW � 5: FISHEYE_SUB_REGION � 6: FISHEYE_SUB_PANORAMA
Zoom value
From 4 to 8 From 4 to 8
<Image Enhancement Object> definition:
Key
Value
brightness contrast
<integer> <integer>
saturation sharpness
<integer> <integer>
Description Brightness of images Degree of contrast of images
Saturation of images Sharpness of images
Availability From 4 to 8 From 4 to 8
From 4 to 8 From 4 to 8
Example: Get camera information response.
{ "camera": [ { "audioOut": true, "mute": false, "recStatus": 0, "analyticsType": 0, "ptzCap": 111, "audioType": 4, "ptzContinuous": 39, "is_rotated_by_date": false, "ADCap": 5, "blLiveviewPriv": true, "videoCapList": [ { "stList": [ "RTSP" ], "vt": "H.264" }, { "stList": [ "HTTP" ], "vt": "MJPEG" } ],
Copyright � Synology Inc. All rights Reserved.
53
Synology Surveillance Station Web API
"isStatusUnrecognized": false, "is_rotated_by_space": true, "osd_position": 6, "fisheyeType": 0, "recBitrateCtrl": 1, "video_mirror": true, "vendor": "AXIS", "video_rotation": 0, "stmFisheyeType": 0, "dsPort": 5000, "TDCap": 0, "camMountType": 0, "exposure_control": 6, "name": "P5415-E-0011", "ownerDsId": 0, "osd_status": true, "fisheyeDispMode": "", "channel_id": "1", "setDICap": false, "param_chklist": 0, "analyticsBeep": false, "status_flags": 32, "feRegionList": [], "objTrack": false, "port": 80, "video_flip": true, "osd_format": 0, "autoPan": 0, "deleted": false, "deviceType": 4, "hasCamParam": true, "DINum": 2, "snapshot_path": "/webapi/_______________________________________________________entry.cgi? api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&cameraId=70�tamp=142491912 9&preview=true", "dsIp": "", "host": "10.13.12.165", "rotation_by_date": 30, "autoFocus": true, "volume_space": "9.617", "analyticsHeight": 0, "MDCap": 5, "rotation_by_space": "10", "analyticsVirtualFence": false, "analyticsObjSize": 0, "analyticsDirection": 1, "analyticsRegion": "", "quality": "5", "multiDI": false, "type": 3,
Copyright � Synology Inc. All rights Reserved.
54
Synology Surveillance Station Web API
"stm_info": [ { "resolution": "800x450", "quality": "5", "fps": 10, "type": 0 }, { "resolution": "800x450", "quality": "5", "fps": 10, "type": 1 }, { "resolution": "800x450", "quality": "5", "fps": 10, "type": 2 }
], "camLiveMode": 0, "volume": 50, "ptzDirection": 32, "dayend": 18, "folder": "/var/services/surveillance/P5415-E-001", "tvStandard": 0, "singleStream": false, "imageEnhancement": {
"saturation": 0, "sharpness": 0, "contrast": 0, "brightness": 0 }, "audioCap": true, "camIdOnRecServer": 0, "detailInfo": { "camRecTime": 30, "edgeStgEnabled": false, "camIsRotByDate": false, "camRecStreamNo": 0, "camRotByDate": 30, "camTvStandard": 0, "camMountType": 0, "camRecCbrBitrate": 1000, "camIsRotBySpace": true, "camLiveResolution": "800x450", "camRecBitrateCtrl": 1, "camMobileStreamNo": 0, "camLiveQuality": "5", "edgeStgRecStopTime": "23:59", "camLiveStreamNo": 0,
Copyright � Synology Inc. All rights Reserved.
55
Synology Surveillance Station Web API
"camResolution": "800x450", "camMobileQuality": "5", "camLiveMode": 0, "camPreRecTime": 5, "camIP": "10.13.12.165", "camLiveBitrateCtrl": 1, "camModel": "P5415-E", "edgeStgRecStartTime": "00:00", "camPostRecTime": 5, "camLiveCbrBitrate": 1000, "camMobileResolution": "800x450", "camUserName": "root", "camFps": 10, "camVendor": "AXIS", "camMobileFps": 10, "camFov": "", "camMobileCbrBitrate": 1000, "camRotBySpace": 10, "edgeStgDownloadSch": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "customAlarmDetect": 3, "camLiveFps": 10, "camChannel": "1", "camRotOption": 0, "camQuality": "5", "camPrefix": "P5415-E-001", "edgeStgRetrieveAction": 2, "camSchedule": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1], "edgeStgRecMode": 2, "customDetect": 5, "camPassWord": "%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC %83%EF%BC%83%EF%BC%83", "camVideoType": "H.264", "camMobileBitrateCtrl": 1, "MdDetSrc": 0, "camServer": 0, "camFolder": "P5415-E-001", "edgeStgRecDays": 127, "camPort": 80, "camRtspProtocol": 4, "camName": "P5415-E-0011", "camAudioType": 4
Copyright � Synology Inc. All rights Reserved.
56
Synology Surveillance Station Web API
}, "enabled": true, "analyticsSens": 1, "analyticsWidth": 0, "recCbrBitrate": 1000, "blPresetSpeed": false, "DONum": 0, "id": 70, "setDOCap": false, "analyticsFrame": true, "analyticsLine": false, "daybegin": 8, "fps": 10, "status": 1, "update_time": 1424919129, "exposure_mode": 4, "time_server": "", "rotation_option": 0, "presetNum": 32, "camStatus": 9, "analyticsDwellTime": 5, "camPath": "cnRzcDovL3Jvb3Q6bmF0bWFzdGVyQDEwLjEzLjEyLjE2NTo1NTQvYXhpcy1tZWRpYS9tZWRpYS5hbXA/Y2FtZ XJhPTEmdmlkZW9jb2RlYz1oMjY0JnJlc29sdXRpb249ODAweDQ1MCZmcHM9MTAmdmlkZW9rZXlmcmFtZWl udGVydmFsPTEwJmNvbXByZXNzaW9uPTIw", "model": "P5415-E", "resolution": "800x450" } ] }
2.3.4.4 ListGroup method
Get all camera group information.
Request
Parameter offset
Value <integer>
limit
<integer>
Description
Availability
Optional.
From 1 to 8
The offset to be shifted in the total result.
If not specified, the offset will be 0.
Optional.
From 1 to 8
Number of camera groups to be returned.
If not specified, return camera groups to the end of
camera group list.
Example: http://192.168.1.1:5000/webapi/entry.cgi? method="ListGroup"&api="SYNO.SurveillanceStation.Camera"&limit=3&version="8"&offset=10
Copyright � Synology Inc. All rights Reserved.
57
Synology Surveillance Station Web API
Response
Key total offset cameraGroups
Value <integer> <integer> Array of <Camera Group Object>
Description The number of total camera groups. The shifted offset in the total result. The camera group list.
Availability From 1 to 8 From 1 to 8 From 1 to 8
<Camera Group Object> definition:
Key id name cameraIds description privilege
Value <CAMERA_GROUP_ID> <string> Array of <CAMERA_ID> <string> <integer>
Example:
Description
Unique camera group ID. Camera group name.
The list of camera ID within this group. The description of the camera group.
The user privilege about this camera group. Use bit operation to get the privilege. 0x01: liveview 0x02: playback 0x04: lens 0x08: audio
{ "total": 38, "offset": 10, "cameraGroups": [ { "id": 1, "name": "Group 1F", "cameraIds": [10,11,12], "description": "The camera group of 1F cameras", "privilege": 10 }, { "id": 2, "name": "Group 2F", "cameraIds": [13,14,15], "description": "The camera group of 2F cameras", "privilege": 3 }, { "id": 3, "name": "Group 3F", "cameraIds": [16,17], "description": "The camera group of 3F cameras", "privilege": 15 } ]
}
Availability From 1 to 8 From 1 to 8 From 1 to 8 From 1 to 8 From 4 to 8
2.3.4.5 GetSnapshot method
Get the up-to-date snapshot of the selected camera in JPEG format.
Copyright � Synology Inc. All rights Reserved.
58
Synology Surveillance Station Web API
Request
Parameter id name
Value <CAMERA_ID> <string>
dsId profileType
<integer> <integer>
Description
Availability
Unique camera ID.
9 and onward
Optional.
9 and onward
The name of queried camera.
This parameter only valid when "id" is not
specified and "dsId" is specified.
Optional.
9 and onward
The owner ds id of queried camera. Used only
combined with "name" parameter.
Optional.
9 and onward
Profile type of selected camera. Default value is
1.
� 0 - High quality
� 1 - Balanced
� 2 - Low bandwidth
Example:
http://192.168.1.1:5000/webapi/entry.cgi? version=9&id=18&api="SYNO.SurveillanceStation.Camera"&method="GetSnapshot"&profileType=0
Response The binary JPEG image data.
Example: HTTP response with image data HTTP/1.0 200 OK Content-Type: image/jpeg
<Binary JPEG image data>
2.3.4.6 Enable method
Enable cameras.
Request
Parameter idList
Value
Description
Availability
<string> The list of <CAMERA_ID> to be queried concatenated by ",". 9 and onward
Example: Enable cameras which ids are 2 and 10.
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&method="Enable"&version=9&idList="2,10"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
59
Synology Surveillance Station Web API
2.3.4.7 Disable method
Disable cameras.
Request
Parameter idList
Value
Description
Availability
<string> The list of <CAMERA_ID> to be queried concatenated by ",". 9 and onward
Example: Disable cameras which ids are 2 and 10. http://192.168.1.1:5000/webapi/entry.cgi? &api="SYNO.SurveillanceStation.Camera"&version=9&method="Disable"&idList="2,10"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.4.8 GetCapabilityByCamId method
Get capability of a specific camera by its camera Id.
Request
Parameter cameraId
Value <CAMERA_ID>
Description Unique camera ID.
Availability From 4 to 8
Example: Get capability of camera which id is 90 http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&version="8"&cameraId=90&method="GetCapabilityByCamId"
Response Key
ptzPan ptzTilt ptzZoom ptzHome ptzPresetNumber
ptzPan
Value <boolean> <boolean> <boolean> <boolean> <integer>
<integer>
ptzTilt
<integer>
ptzZoom
<integer>
ptzIris
<integer>
Description
Capability to perform pan action. Capability to perform tilt action.
Capability to perform zoom action. Capability to perform home action.
The maximum number of preset supported by the model. 0 stands for preset incapability.
0: doesn't support pan action. 1: support step operation 2: support continuous operation 0: doesn't support tilt action. 1: support step operation 2: support continuous operation
0: doesn't support zoom action. 1: support step operation 2: support continuous operation 0: doesn't support iris action. 1: support step operation
Availability From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8 From 4 to 8
From 5 to 8
From 5 to 8
From 5 to 8
From 5 to 8
Copyright � Synology Inc. All rights Reserved.
60
Synology Surveillance Station Web API
ptzFocus
ptzAbs ptzAutoFocus ptzDirection ptzSpeed audioOut
<integer>
<boolean> <boolean> <integer> <boolean> <boolean>
2: support continuous operation 0: doesn't support focus action. 1: support step operation 2: support continuous operation Capability to perform absolute PTZ action. Capability to perform auto focus action. The PTZ directions that camera support Capability to perform change speed. Capability to perform audio output to camera.
From 5 to 8
From 6 to 8 From 6 to 8 From 6 to 8 From 6 to 8 From 1 to 8
Example:
{ "ptzHome":false, "ptzPresetNumber":255, "ptzPan":2, "ptzTilt":2, "ptzZoom":2, "ptzIris":0, "ptzFocus":2, "ptzAbs":false, "ptzAutoFocus":false, "ptzDirection":8, "ptzSpeed":true,
"audioOut":true }
2.3.4.9 MigrationEnum method
Enumerates current status of migration
Request
Parameter start limit ownerDsId
Value <integer> <integer> <integer>
Description The beginning of the enumeration list Amount of the events for showing The source DS ID in the CMS table
Availability From 7 to 8 From 7 to 8 From 7 to 8
Example:
http://192.168.1.1:5000/webapi/entry.cgi? version="8"&ownerDsId=0&start=0&api="SYNO.SurveillanceStation.Camera"&limit=1&method="Migration Enum"
Response
Key camInfo
Value Array of <Migration Info Object>
Description Information of each listed migration event
Availability From 7 to 8
Copyright � Synology Inc. All rights Reserved.
61
Synology Surveillance Station Web API
total
<integer>
The total number of events in the database
From 7 to 8
<Migration Info Object> definition:
Key
Value
from
<integer>
id
<integer>
ip
<string>
is_rotated_by_space <boolean>
name
<string>
occupied
<string>
progress rotation_by_space status to
<float> <string> <integer> <integer>
Example:
{ "data": {
"total": 3, "camInfo": [
{ "status": -1, "to": 1, "rotation_by_space": "0", "from": 0, "name": "iPUX", "progress": 10.0, "ip": "10.13.11.195", "is_rotated_by_space": false, "occupied": "0", "id": 1
} ] }
Description
Availability
The source DS of the migration
From 7 to 8
ID of selected migration event
From 7 to 8
IP of camera
From 7 to 8
Replacement policy once the space is full
From 7 to 8
Name of the camera specified at the source DS From 7 to 8
Occupied space in the destination DS denoted From 7 to 8
in GB
The completeness of the event
From 7 to 8
Parameter of the replacement policy
From 7 to 8
Status of the migration event
From 7 to 8
The destination DS
From 7 to 8
2.3.4.10 Migrate method
Migrating Cameras and recorded video (optional) to specified DS
Request
Parameter serverId camIdList delMode
Value <integer> <string> <integer>
Description The destination of the migration
List of To-Be-Migrated cameras Choosing to preserve, remove or migrate recorded videos
Availability From 7 to 8 From 7 to 8 From 7 to 8
Copyright � Synology Inc. All rights Reserved.
62
Synology Surveillance Station Web API
Example: http://192.168.1.1:5000/webapi/entry.cgi? delMode=2&camIdList="45"&version="8"&api="SYNO.SurveillanceStation.Camera"&serverId=1&method=" Migrate"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.4.11 CountByCategory method
This method lists groups along with number of cameras which belong to according to specified criteria
Request
Parameter start limit
Value <integer> <integer>
Description The starting offset in the list of cameras The number of cameras to show
Availability From 7 to 8 From 7 to 8
Example: http://192.168.1.1:5000/webapi/entry.cgi? start=0&api="SYNO.SurveillanceStation.Camera"&limit=0&version="8"&method="CountByCategory"
Response Key
cam_brand
cam_device
cam_group
cam_status
server
total
Value
Description
Availability
Array of <Group Status List of camera counts categorized by brand
From 7 to 8
Object>
Array of <Group Status The list of camera counts categorized by devic From 7 to 8
Object>
Array of <Group Status The list of camera counts categorized by user From 7 to 8
Object>
defined groups
Array of <Group Status The list of camera counts categorized by camera From 7 to 8
Object>
status
Array of <Group Status The list of camera counts categorized by owner From 7 to 8
Object>
DS
<integer>
The amount of cameras
From 7 to 8
<Group Status Object> definition:
Key
Value
id
<string>
Description
Availability
The identifier of status in the selected group From 7 to 8
Example: {
"cam_brand": [
Copyright � Synology Inc. All rights Reserved.
63
Synology Surveillance Station Web API
{ "id": "-1: 2"
}, {
"id": "ABUS: 1" }, {
"id": "iPUX: 1" } ], "cam_group": [ {
"id": "-1: 2" }, {
"id": "1: 1" } ], "cam_status": [ {
"id": "-1: 2" }, {
"id": "1: 1" }, {
"id": "12: 0" }, {
"id": "2: 0" }, {
"id": "3: 0" }, {
"id": "7: 1" } ], "server": [ {
"id": "-1: 2" }, {
"id": "0: 2" }, {
"id": "1: 0" } ], "cam_device": [ {
Copyright � Synology Inc. All rights Reserved.
64
Synology Surveillance Station Web API
"id": "-1: 2" }, {
"id": "1: 1" }, {
"id": "2: 0" }, {
"id": "4: 1" }, {
"id": "8: 0" } ], "total": 2 }
2.3.4.12 RecountEventSize method
To activate the "getOccupiedSize" API for real-time size-calculating.
Request
Parameter camId
Value <integer>
Specified cam
Description
Availability From 7 to 8
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&camId=27&version="8"&method="RecountEventSize"
Response
Key size
Value <float>
Description The total size of the migrated data
Availability From 7 to 8
Example:
{ "size": 207.3548631668091
}
2.3.4.13 SaveOptimizeParam method
This API is able to save the configuration of Optimization panel
Copyright � Synology Inc. All rights Reserved.
65
Synology Surveillance Station Web API
Request
Parameter
Value
cameraIds
<integer>
camParamChkList <integer>
timeServer vdoMirror vdoFlip vdoRotation expCtrl expMode dayBegin
<string> <boolean> <boolean> <boolean> <integer> <integer> <integer>
dayEnd
<integer>
osdStatus osdFormat osdPosition
<boolean> <integer> <integer>
Description
Availability
Specified cam
From 7 to 8
Optional.
From 7 to 8
Record the overall bitwise OR operation status
of each checkbox.
� time server: 1
� video mirror: 2
� video mirror: 4
� video rotate: 8
� exposure control: 16
� exposure mode: 32
� osd timestamp: 64
Optional.
From 7 to 8
Specified NTP server
Optional.
From 7 to 8
1 for turning on while 0 for turning off
Optional.
From 7 to 8
1 for turning on while 0 for turning off
Optional.
From 7 to 8
1 for turning on while 0 for turning off
Optional.
From 7 to 8
Degree of exposure control
Optional.
From 7 to 8
Modes for days and nights respectively
Optional.
From 7 to 8
Determine the start hour for the schedule of
day mode
Optional.
From 7 to 8
Determine the end hour for the schedule of day
mode
Optional.
From 7 to 8
Specify whether osd is turned on/off
Optional.
From 7 to 8
Determine the format of osd if supported
Optional.
From 7 to 8
Determin the position of osd
Example:
http://192.168.1.1:5000/webapi/entry.cgi? vdoMirror=true&camParamChkList=1&version="8"&vdoRotation=false&vdoFlip=true&osdPosition=0&exp Mode=0&timeServer="pool.ntp.org"&cameraIds=28&api="SYNO.SurveillanceStation.Camera"&osdStatus=f alse&osdFormat=0&dayEnd=18&expCtrl=2&method="SaveOptimizeParam"&dayBegin=8
Response
Key id
Value <integer>
Description Return the camera id
Availability From 7 to 8
Copyright � Synology Inc. All rights Reserved.
66
Synology Surveillance Station Web API
Example:
{ "id": 28
}
2.3.4.14 GetOccupiedSize method
This method returns the occupied volume in GigaBytes
Request
Parameter camIdList
Value <string>
Description
The list of <CAMERA_ID> to be queried concatenated by ",".
Availability From 7 to 8
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&camIdList="46,48"&version="8"&method="GetOccupiedSize"
Response
Key ID
Value <string>
Description
This field is actually replaced by camera ID dynamically, as a consequence the result for example should be {"46":"0.260","48":"0.050"}
Availability From 7 to 8
Example:
{ "104":"9.961", "99":"9.955"
}
2.3.4.15 CheckCamValid method
Check if the shortcut item is valid
Request
Parameter cameraId
Value <CAMERA_ID>
Description Specified Cam ID
Availability From 7 to 8
Example:
Copyright � Synology Inc. All rights Reserved.
67
Synology Surveillance Station Web API http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&version="8"&cameraId=27&method="CheckCamValid"
Response
Key categEntryVal itemStatus
Value <string> integer
Description The mapped entry for specified camera Status of the shortcut
Availability From 7 to 8 From 7 to 8
Example:
{ "categEntryVal": "iPUX", "itemStatus": 0
}
2.3.4.16 MigrationCancel method
Deleting selected tasks
Request
Parameter taskIds
Value <string>
Description To-Be-Deleted tasks
Availability From 7 to 8
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&taskIds="1,4,7"&version="8"&method="MigrationCancel"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.4.17 Delete method
Deleting selected cameras
Request Parameter
idList
keepRecording
Value <string>
<boolean>
Response
Description
The list of <CAMERA_ID> to be queried concatenated by ",".
To delete recorded videos or not
Availability 9 and onward
9 and onward
Copyright � Synology Inc. All rights Reserved.
68
Synology Surveillance Station Web API This method has no specific response data. It returns an empty success response if it completes without error.
2.3.4.18 GetLiveViewPath method
Get live view url path by camera id.
Request
Parameter idList
Value <string>
Description The list of <CAMERA_ID> to be queried concatenated by ",".
Availability 9 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera"&method="GetLiveViewPath"&version=9&idList="14,15"
Response
Key data
Value
Array of <PathInfo Object>
Description Detail path information of quried cameras.
Availability 9 and onward
<PathInfo Object> definition:
Key
Value
id mjpegHttpPath
<integer> <string>
multicstPath
<string>
mxpegHttpPath rtspOverHttpPath
<string> <string>
rtspPath
<string>
Description ID of the camera. Mjpeg stream path(over http) of the camera Multi-cast path of the camera. mxpeg stream path of the camera. RTSP stream(over http) path of the camera. RTSP stream path of the camera.
Availability 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward 9 and onward
Example:
{ "data" : [ { "id" : 14, "mjpegHttpPath" : "http://10.13.13.9:5000/webapi/entry.cgi?
api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=14 &StmKey=\"faaa8c5e0d20b71038e35e7e3635b0ee\"",
"multicstPath" : "rtsp://admin:faaa8c5e0d20b71038e35e7e3635b0ee@10.13.13.9:554/Sms=14.multicast",
"mxpegHttpPath" : "http://10.13.13.9:5000/webapi/entry.cgi? api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mxpeg&cameraId=14 &StmKey=\"faaa8c5e0d20b71038e35e7e3635b0ee\"",
"rtspOverHttpPath" : "rtsp://10.13.13.9:5000/webman/3rdparty/SurveillanceStation/cgi/rtsp.cgi? Sms=14.unicast&DsId=0&StmKey=faaa8c5e0d20b71038e35e7e3635b0ee",
"rtspPath" : "rtsp://admin:faaa8c5e0d20b71038e35e7e3635b0ee@10.13.13.9:554/Sms=14.unicast"
Copyright � Synology Inc. All rights Reserved.
69
Synology Surveillance Station Web API
}, {
"id" : 15, "mjpegHttpPath" : "http://10.13.13.9:5000/webapi/entry.cgi? api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=15 &StmKey=\"faaa8c5e0d20b71038e35e7e3635b0ee\"", "multicstPath" : "rtsp://admin:faaa8c5e0d20b71038e35e7e3635b0ee@10.13.13.9:554/Sms=15.multicast", "mxpegHttpPath" : "http://10.13.13.9:5000/webapi/entry.cgi? api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mxpeg&cameraId=15 &StmKey=\"faaa8c5e0d20b71038e35e7e3635b0ee\"", "rtspOverHttpPath" : "rtsp://10.13.13.9:5000/webman/3rdparty/SurveillanceStation/cgi/rtsp.cgi? Sms=15.unicast&DsId=0&StmKey=faaa8c5e0d20b71038e35e7e3635b0ee", "rtspPath" : "rtsp://admin:faaa8c5e0d20b71038e35e7e3635b0ee@10.13.13.9:554/Sms=15.unicast" } ] }
2.3.4.19 API Error Code
Code 400 401 402
Execution failed. Parameter invalid. Camera disabled.
Description
Copyright � Synology Inc. All rights Reserved.
70
Synology Surveillance Station Web API
2.3.5
SYNO.Surveillance.Camera.Event
Event Detection related WebAPI. e.g. Enumerate detection parameters or long polling for alarm status or save detection parameters.
API Name SYNO.Surveillance.Camera.Event
Method Name AudioEnum AlarmEnum
TamperingEnum MDParamSave MotionEnum ADParamSave DIParamSave AlarmStsPolling TDParamSave
Version 1
Section 2.3.5.1 2.3.5.2 2.3.5.3 2.3.5.4 2.3.5.5 2.3.5.6 2.3.5.7 2.3.5.8 2.3.5.9
Availability Surveillance Station 7.0
Availability Surveillance Station 7.0 Surveillance Station 7.0 Surveillance Station 7.0 Surveillance Station 7.0 Surveillance Station 7.0 Surveillance Station 7.0 Surveillance Station 7.0 Surveillance Station 7.0 Surveillance Station 7.0
2.3.5.1 AudioEnum method
Enumerate audio detection parameters. e.g. keep setting, detect source, level(capability, minimum value, maximum value and current value).
Request
Parameter camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Event"&camId=280&version="1"&method="AudioEnum"
Response
Key ADParam
Value <ADParam Object>
Description The audio detection parameters.
Availability 4 and onward
<ADParam Object> Definition:
Key keep source
Value <boolean> <integer>
level
<Level Object>
Description
Define the keep the camera original setting. Define the detection source. e.g. -1:disable, 0:by_camera. The level's detail informations.
Availability 4 and onward 4 and onward
4 and onward
Copyright � Synology Inc. All rights Reserved.
71
Synology Surveillance Station Web API
<Level Object> Definition:
Key cap minValue maxValue value
Value <boolean> <integer> <integer> <integer>
Example:
{ "ADParam": { "source": 0, "level": { "cap": true, "maxValue": 100, "value": 50, "minValue": 0 }, "keep": true }
}
Description Define if support the level detection argument. Define the minimum value of level. Define the maximun value of level. Define the current value of level.
Availability 4 and onward 4 and onward 4 and onward 4 and onward
2.3.5.2 AlarmEnum method
Enumerate alarm setting list. e.g. normal and keep
Request
Parameter camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Event"&camId=280&version="1"&method="AlarmEnum"
Response
Key DIParam
Value
Array of <AlarmSettingList Object>
Description The updated alarm setting list.
Availability 4 and onward
<AlarmSettingList Object> Definition:
Key keep idx normal
Value <boolean> <integer> <integer>
Description Define the keep the camera original setting. The index of alarm. The normal state of this alarm. e.g. 0:open_circuit, 1:ground_circuit.
Availability 4 and onward 4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
72
Synology Surveillance Station Web API
Example: {
"DIParam": [ { "normal": 0, "idx": 0, "keep": true }
] }
2.3.5.3 TamperingEnum method
Enumerate tampering detection parameters. e.g. keep setting, detect source, duration(capability, minimum value, maximum value and current value).
Request
Parameter camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Event"&camId=280&version="1"&method="TamperingEnum"
Response
Key TDParam
Value <TDParam Object>
Description The tampering detection parameters.
Availability 4 and onward
<TDParam Object> Definition:
Key
Value
keep source
<boolean> <integer>
duration
<Duration Object>
Description Define the keep the camera original setting. Define the detection source. e.g. -1:disable, 0:by_camera. The duration's detail informations.
Availability 4 and onward 4 and onward
4 and onward
<Duration Object> Definition:
Key cap
Value <boolean>
minValue maxValue value
<integer> <integer> <integer>
Description Define if support the duration detection argument. Define the minimum value of duration. Define the maximun value of duration. Define the current value of duration.
Availability 4 and onward
4 and onward 4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
73
Synology Surveillance Station Web API
Example:
{ "TDParam": { "duration": { "cap": true, "maxValue": 100, "value": 50, "minValue": 0 }, "source": 0, "keep": true }
}
2.3.5.4 MDParamSave method
Save motion detection parameters. e.g. Sensitivity, Threshold, objectSize and percentage.
Request
Parameter camId source
Value <CAMERA_ID> <integer>
mode
<integer>
sensitivity threshold objectSize percentage
<integer> <integer> <integer> <integer>
Description
The selected camera id. Optional. Define the detection source. e.g. -1:disable, 0:by_camera and 1:by_surveillance.
Optional. Define the keep thie camera original setting. e.g. 0:keep camera setting and 1:not keep camera setting.
Optional. Define the sensitivity number.
Optional. Define the threshold number.
Optional. Define the object size you want to detect.
Optional. Define the percentage number.
Availability 4 and onward 4 and onward
4 and onward
4 and onward 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? objectSize=50&source=0&camId=16&version="1"&api="SYNO.SurveillanceStation.Camera.Event"&threshol d=20&sensitivity=90&percentage=50&method="MDParamSave"&mode=1
Response
Key camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
74
Synology Surveillance Station Web API
Example:
{ "data" : { "camId" : 16 }, "httpd_restart" : false, "success" : true
}
2.3.5.5 MotionEnum method
Enumerate motion detection parameters. e.g. keep setting, detect source, sensitivity, threshold, objectSize and percentage.
Request
Parameter camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Event"&camId=280&version="1"&method="MotionEnum"
Response
Key MDParam
Value <MDParam Object>
Description The motion detection parameters.
Availability 4 and onward
<MDParam Object> Definition:
Key keep source
Value <boolean> <integer>
sensitivity threshold objectSize percentage
<Sensitivity Object> <Threshold Object> <ObjectSize Object> <Percentage Object>
Description Define the keep the camera original setting. Define the detection source. e.g. -1:disable, 0:by_camera, 1:by_surveillance. The sensitivity's detail informations. The threshold's detail informations. The objectSize's detail informations. The percentage's detail informations.
Availability 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward 4 and onward
<Threshold Object> Definition:
Key camCap
Value <boolean>
ssCap
<boolean>
minValue
<integer>
Description
Define if camera support the threshold detection argument.
Define if surveillance station support the threshold detection argument.
Define the minimum value of threshold.
Availability 4 and onward
4 and onward
4 and onward
Copyright � Synology Inc. All rights Reserved.
75
Synology Surveillance Station Web API
maxValue value
<integer> <integer>
Define the maximun value of threshold. Define the current value of threshold.
<ObjectSize Object> Definition:
Key
Value
camCap
<boolean>
ssCap
<boolean>
minValue maxValue value
<integer> <integer> <integer>
Description Define if camera support the objectSize detection argument. Define if surveillance station support the objectSize detection argument. Define the minimum value of objectSize. Define the maximun value of objectSize. Define the current value of objectSize.
<Percentage Object> Definition:
Key camCap
Value <boolean>
ssCap
<boolean>
minValue maxValue value
<integer> <integer> <integer>
Description Define if camera support the percentage detection argument. Define if surveillance station support the percentage detection argument. Define the minimum value of percentage. Define the maximun value of percentage. Define the current value of percentage.
4 and onward 4 and onward
Availability 4 and onward
4 and onward
4 and onward 4 and onward 4 and onward
Availability 4 and onward
4 and onward
4 and onward 4 and onward 4 and onward
Example:
{ "MDParam": { "objectSize": { "camCap": true, "minValue": 0, "maxValue": 100, "value": 50, "ssCap": false }, "sensitivity": { "camCap": true, "minValue": 0, "maxValue": 100, "value": 50, "ssCap": true }, "keep": true, "source": 0, "threshold": { "camCap": false, "minValue": 0, "maxValue": 100, "value": 50,
Copyright � Synology Inc. All rights Reserved.
76
Synology Surveillance Station Web API
"ssCap": true }, "percentage": {
"camCap": true, "minValue": 0, "maxValue": 100, "value": 50, "ssCap": false } } }
2.3.5.6 ADParamSave method
Save motion detection parameters. e.g. Sensitivity, Threshold, objectSize and percentage.
Request
Parameter camId source
Value <CAMERA_ID> <integer>
keep
<boolean>
level
<integer>
Description
The selected camera id.
Optional. Define the detection source. e.g. -1:disable, 0:by_camera and 1:by_surveillance.
Optional. Define the keep thie camera original setting.
Optional. Define the level number.
Availability 4 and onward 4 and onward
4 and onward
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camId=280&version="1"&level=90&keep=true&source=0&api="SYNO.SurveillanceStation.Camera.Event"& method="ADParamSave"
Response
Key camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Example:
{ "camId": 280
}
2.3.5.7 DIParamSave method
Save digital input parameters. e.g. normal
Copyright � Synology Inc. All rights Reserved.
77
Synology Surveillance Station Web API
Request Parameter
camId idx keep
normal
Value <CAMERA_ID> <integer> <boolean>
<integer>
Description
The selected camera id. Define digital input index.
Optional. Define the keep thie camera original setting.
Optional. Define the normal status. e.g. 0:open_circuit, 1:ground_circuit
Availability 4 and onward 4 and onward 4 and onward
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camId=280&version="1"&idx=0&normal=0&keep=true&api="SYNO.SurveillanceStation.Camera.Event"&me thod="DIParamSave"
Response
Key camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Example:
{ "camId": 280
}
2.3.5.8 AlarmStsPolling method
Enumerate alarm trigger state list.
Request
Parameter camId timeOut
Value <CAMERA_ID> <integer>
list
Array of
<AlarmStateList>
Description
The selected camera id. Optional. Define the maximum waiting time for polling alarm trigger status if no changed.
Optional. Define the keep thie camera original setting.
Availability 4 and onward 4 and onward
4 and onward
< AlarmStateList Object> Definition:
Key idx trigger
Value <integer> <integer>
Description The index of alarm. The trigger state of this alarm. e.g. 0:untrigger, 1:triggered.
Availability 4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
78
Synology Surveillance Station Web API
Example: http://192.168.1.1:5000/webapi/entry.cgi?camId=280&version="1"&list=[{"trigger": 0, "idx": 0}]&api="SYNO.SurveillanceStation.Camera.Event"&timeOut=5000&method="AlarmStsPolling"
Response
Key list
Value Array of <AlarmStateList>
Description The updated alarm state list.
Availability 4 and onward
Example:
{ "list": [ { "trigger": 0, "idx": 0 } ]
}
2.3.5.9 TDParamSave method
Save tampering detection parameters. e.g. Duration
Request
Parameter camId source
Value <CAMERA_ID> <integer>
keep duration
<boolean> <integer>
Description
The selected camera id. Optional. Define the detection source. e.g. -1:disable, 0:by_camera.
Optional. Define the keep thie camera original setting.
Optional. Define the duration number.
Availability 4 and onward 4 and onward
4 and onward
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camId=280&api="SYNO.SurveillanceStation.Camera.Event"&keep=true&source=0&version="1"&duration= 90&method="TDParamSave"
Response
Key camId
Value <CAMERA_ID>
Description The selected camera id.
Availability 4 and onward
Example: {
Copyright � Synology Inc. All rights Reserved.
79
Synology Surveillance Station Web API "camId": 280
}
2.3.5.10 API Error Code
Code 400 401 402 407
Execution failed. Parameter invalid. Camera disabled. CMS closed.
Description
Copyright � Synology Inc. All rights Reserved.
80
Synology Surveillance Station Web API
2.3.6
SYNO.SurveillanceStation.Camera.Group
This API provides operations for camera groups
API Name SYNO.SurveillanceStation.Camera.Group
Method Name Enum Save Delete
2.3.6.1 Enum method
Version 1
Section 2.3.6.1 2.3.6.2 2.3.6.3
Availability Surveillance Station 7.0
Availability 4 and onward 4 and onward 4 and onward
Enumerate group information. e.g. Group list and camera list in the group.
Request
Parameter privCamType
Value <integer>
Description The privilege type in enumeration groups.
Availability 4 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Group"&privCamType=1&version="1"&method="Enum"
Response Key
allCamGrpInfo
data
Value Array of <allCamGrpInfo Object> Array of <data Object>
Description The list of all groups.
Availability 4 and onward
The group list in the seleted privilege and 4 and onward the camera list in this group.
<allCamGrpInfo Object> definition:
Key dsId id name uniqueId
<integer> <integer> <string> <string>
Value
Description The DS ID of the group. The group ID The name of the group. True unique ID of the group.
Availability 4 and onward 4 and onward 4 and onward 4 and onward
<data Object> definition:
Key CamList dsId
Value Array of <CamList Object> <integer>
Description The camera list of the group. The DS ID of the group.
Availability 4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
81
Synology Surveillance Station Web API
id name desc uniqueId
<integer> <string> <string> <string>
The group ID The name of the group. The description of the group. True unique ID of the group.
4 and onward 4 and onward 4 and onward 4 and onward
<CamList Object> definition:
Key
Value
dsId id name
<integer> <integer> <string>
camIdOnRecServer <integer>
dsName
<string>
dsStatus
<integer>
ip preview
<string> <string>
Resolution
<string>
Description The DS ID of the camera. The camera ID The name of the camera. True camera ID on the recording server. The DS name of the camera. The DS status of the camera. The IP address of the camera. The webAPI preview path of the camera. The resolution of the camera.
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Example:
{ "data": {
"allCamGrpInfo": [ { "dsId": 0, "id": 1, "uniqueId": "0 1", "name": "GrpName" }
], "data": [
{ "name": "GrpName", "uniqueId": "0 1", "camList": [ { "status": 1, "dsStatus": 0, "ip": "192.168.0.1", "camIdOnRecServer": 0, "dsName": "Local", "resolution": "640x480", "preview":
"/webapi/_______________________________________________________entry.cgi? api=SYNO.SurveillanceStation.Camera&method=GetSnapshot",
"dsId": 0, "id": 9, "name": "CameraName" } ], "dsId": 0,
Copyright � Synology Inc. All rights Reserved.
82
Synology Surveillance Station Web API
"id": 1, "desc": "GrpDesc" } ] }
2.3.6.2 Save method
Save the specific groups.
Request
Parameter groupList
Value
Array of <groupList Object>
Description The Saved group list.
<allCamGrpInfo Object> definition:
Key camList id name desc
Value Array of <CamList Object> <integer> <string> <string>
Description The camera list of the group. The group ID The name of the group. The description of the group.
Availability 4 and onward
Availability 4 and onward 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?groupList=[{"camList": [{"camIdOnRecServer": 0, "dsName": "DS_Name", "dsId": 4, "id": 10, "name": "CameraName"}], "desc": "GrpDesc", "id": 9, "name": "GrpName"}]&api="SYNO.SurveillanceStation.Camera.Group"&version="1"&method="Save"
Response
Key groupList
Value
Description
Array of <groupList Object> The Saved group list.
Availability 4 and onward
Example:
{ "groupList": [ { "camList": [ { "camIdOnRecServer": 0, "dsName": "DS_Name", "dsId": 4, "id": 10, "name": "CameraName"
Copyright � Synology Inc. All rights Reserved.
83
Synology Surveillance Station Web API
} ], "desc": "GrpDesc", "id": 9, "name": "GrpName" } ] }
2.3.6.3 Delete method
Delete the specific groups.
Request
Parameter Id
Value <string>
Description
Availability
The deleted group ID list in a string format. ex: 4 and onward
"1,3,9"
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Group"&id="1"&version="1"&method="Delete"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.6.4 API Error Code
Code 400 401 402 407
Execution failed. Parameter invalid. Camera disabled. CMS closed.
Description
Copyright � Synology Inc. All rights Reserved.
84
Synology Surveillance Station Web API
2.3.7
SYNO.SurveillanceStation.Camera.Import
This API provides operations for importing camera
API Name SYNO.SurveillanceStation.Camera.Import
Method Name Save
ArchiveCamEnum ArchiveEnum
2.3.7.1 Save method
Version 1
Section 2.3.7.1 2.3.7.2 2.3.7.3
Availability Surveillance Station 7.0
Availability 4 and onward 4 and onward 4 and onward
Enumerate group information. e.g. Group list and camera list in the group.
Request Parameter
camServerId shareName archiveName camlist
actFromHost
Value
<integer> <string>
<string> Array of <CamImportList Object>
<boolean>
Description The privilege type in enumeration groups. The share folder which contains the archive The name of the archive The detail object of the import
Availability 4 and onward 4 and onward 4 and onward 4 and onward
Is the method called by CMS host
4 and onward
<CamImportList Object> definition:
Key channel checked enable_quota
Value <string> <boolean> <boolean>
folder id idx ipaddr model name port rotatequota
<string> <integer> <integer> <string> <string> <string> <integer> <integer>
vendor
<string>
Description Channel of the camera Indicating if the camera is chosen Indicating if the replacing strategy "rotation_by_space" is enabled Path to the recorded video Camera id The index in the archive ip address of the camera The camera model The name of the camera Port of the Camera Parameter of the replacing strategy if enable_quota is true Vendor of the camera
Availability 4 and onward 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
4 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
85
Synology Surveillance Station Web API
http://192.168.1.1:5000/webapi/entry.cgi? archiveName="SSCamExport_XD"&version="1"&camServerId=0&shareName="kuoDownload"&api="SYNO. SurveillanceStation.Camera.Import"&actFromHost=false&camlist=[{"model": "ICS8220", "vendor": "iPUX", "enable_quota": true, "rotatequota": 10, "id": 5, "checked": true, "name": "rbxTesting-001", "idx": 0, "ipaddr": "10.13.11.189", "port": 80, "folder": "rbxTesting-001", "channel": "1"}]&method="Save"
Response Key
camera
keyUsedCnt
Value
Array of <Camera Information Object>
<integer>
Description
Availability
The detail object of camera information 4 and onward
The total key used in the CMS system 4 and onward
Example:
{ "camera": [ { "audioOut": true, "mute": false, "recStatus": 0, "analyticsType": 0, "ptzCap": 111, "audioType": 4, "ptzContinuous": 39, "is_rotated_by_date": false, "ADCap": 5, "blLiveviewPriv": true, "videoCapList": [ { "stList": [ "RTSP" ], "vt": "H.264" }, { "stList": [ "HTTP" ], "vt": "MJPEG" } ], "isStatusUnrecognized": false, "is_rotated_by_space": true, "osd_position": 6, "fisheyeType": 0, "recBitrateCtrl": 1, "video_mirror": true, "vendor": "AXIS", "video_rotation": 0, "stmFisheyeType": 0,
Copyright � Synology Inc. All rights Reserved.
86
Synology Surveillance Station Web API
"dsPort": 5000, "TDCap": 0, "camMountType": 0, "exposure_control": 6, "name": "P5415-E-0011", "ownerDsId": 0, "osd_status": true, "fisheyeDispMode": "", "channel_id": "1", "setDICap": false, "param_chklist": 0, "analyticsBeep": false, "status_flags": 32, "feRegionList": [], "objTrack": false, "port": 80, "video_flip": true, "osd_format": 0, "autoPan": 0, "deleted": false, "deviceType": 4, "hasCamParam": true, "DINum": 2, "snapshot_path": "/webapi/_______________________________________________________entry.cgi? api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&cameraId=70�tamp=142491912 9&preview=true", "dsIp": "", "host": "10.13.12.165", "rotation_by_date": 30, "autoFocus": true, "volume_space": "9.617", "analyticsHeight": 0, "MDCap": 5, "rotation_by_space": "10", "analyticsVirtualFence": false, "analyticsObjSize": 0, "analyticsDirection": 1, "analyticsRegion": "", "quality": "5", "multiDI": false, "type": 3, "stm_info": [
{ "resolution": "800x450", "quality": "5", "fps": 10, "type": 0
}, {
"resolution": "800x450",
Copyright � Synology Inc. All rights Reserved.
87
Synology Surveillance Station Web API
"quality": "5", "fps": 10, "type": 1 }, { "resolution": "800x450", "quality": "5", "fps": 10, "type": 2 } ], "camLiveMode": 0, "volume": 50, "ptzDirection": 32, "dayend": 18, "folder": "/var/services/surveillance/P5415-E-001", "tvStandard": 0, "singleStream": false, "imageEnhancement": { "saturation": 0, "sharpness": 0, "contrast": 0, "brightness": 0 }, "audioCap": true, "camIdOnRecServer": 0, "detailInfo": { "camRecTime": 30, "edgeStgEnabled": false, "camIsRotByDate": false, "camRecStreamNo": 0, "camRotByDate": 30, "camTvStandard": 0, "camMountType": 0, "camRecCbrBitrate": 1000, "camIsRotBySpace": true, "camLiveResolution": "800x450", "camRecBitrateCtrl": 1, "camMobileStreamNo": 0, "camLiveQuality": "5", "edgeStgRecStopTime": "23:59", "camLiveStreamNo": 0, "camResolution": "800x450", "camMobileQuality": "5", "camLiveMode": 0, "camPreRecTime": 5, "camIP": "10.13.12.165", "camLiveBitrateCtrl": 1, "camModel": "P5415-E", "edgeStgRecStartTime": "00:00", "camPostRecTime": 5,
Copyright � Synology Inc. All rights Reserved.
88
Synology Surveillance Station Web API
"camLiveCbrBitrate": 1000, "camMobileResolution": "800x450", "camUserName": "root", "camFps": 10, "camVendor": "AXIS", "camMobileFps": 10, "camFov": "", "camMobileCbrBitrate": 1000, "camRotBySpace": 10, "edgeStgDownloadSch": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "customAlarmDetect": 3, "camLiveFps": 10, "camChannel": "1", "camRotOption": 0, "camQuality": "5", "camPrefix": "P5415-E-001", "edgeStgRetrieveAction": 2, "camSchedule": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1], "edgeStgRecMode": 2, "customDetect": 5, "camPassWord": "%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC %83%EF%BC%83%EF%BC%83", "camVideoType": "H.264", "camMobileBitrateCtrl": 1, "MdDetSrc": 0, "camServer": 0, "camFolder": "P5415-E-001", "edgeStgRecDays": 127, "camPort": 80, "camRtspProtocol": 4, "camName": "P5415-E-0011", "camAudioType": 4 }, "enabled": true, "analyticsSens": 1, "analyticsWidth": 0, "recCbrBitrate": 1000, "blPresetSpeed": false, "DONum": 0, "id": 70, "setDOCap": false,
Copyright � Synology Inc. All rights Reserved.
89
Synology Surveillance Station Web API
"analyticsFrame": true, "analyticsLine": false, "daybegin": 8, "fps": 10, "status": 1, "update_time": 1424919129, "exposure_mode": 4, "time_server": "", "rotation_option": 0, "presetNum": 32, "camStatus": 9, "analyticsDwellTime": 5, "camPath": "cnRzcDovL3Jvb3Q6bmF0bWFzdGVyQDEwLjEzLjEyLjE2NTo1NTQvYXhpcy1tZWRpYS9tZWRpYS5hbXA/Y2FtZ XJhPTEmdmlkZW9jb2RlYz1oMjY0JnJlc29sdXRpb249ODAweDQ1MCZmcHM9MTAmdmlkZW9rZXlmcmFtZWl udGVydmFsPTEwJmNvbXByZXNzaW9uPTIw", "model": "P5415-E", "resolution": "800x450" } ], "keyUsedCnt": 8 }
2.3.7.2 ArchiveCamEnum method
Enumerating cameras in the selected archive
Request
Parameter shareName archiveName serverId
Value <string> <string> <integer>
Description The share folder which stores archives The target archive The destination DS which camera imports to
Availability 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? archiveName="SSCamExport_XD"&version="1"&shareName="kuoDownload"&api="SYNO.SurveillanceStati on.Camera.Import"&serverId=1&method="ArchiveCamEnum"
Response
Key camlist
Value
Array of <CamImportList Object>
Description The imported cameras
Availability 4 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
90
Synology Surveillance Station Web API
{ "camlist": [ { "vendor": "iPUX", "enable_quota": true, "rotatequota": 10, "folder": "rbxTesting-001", "checked": false, "name": "rbxTesting-001", "idx": 0, "ipaddr": "10.13.11.189", "id": 5, "port": 80, "model": "ICS8220", "channel": "1" } ]
}
2.3.7.3 ArchiveEnum method
Enumerate archives in the selected folder
Request
Parameter shareName
Value <string>
Description Folder selected to enumerate the archives
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? shareName="testingFolder"&api="SYNO.SurveillanceStation.Camera.Import"&version="1"&method="Archi veEnum"
Response
Key archivelist
Value
Array of <Archive Object>
Description The archives inside the folder
Availability 4 and onward
<CamImportList Object> definition:
Key display value
<string> <string>
Value
Description The display name of the archive The folder name of the archive
Availability 4 and onward 4 and onward
2.3.7.4 API Error Code
Copyright � Synology Inc. All rights Reserved.
91
Synology Surveillance Station Web API
Code 400 401 402 407
Execution failed. Parameter invalid. Camera disabled. CMS closed.
Description
Copyright � Synology Inc. All rights Reserved.
92
Synology Surveillance Station Web API
2.3.8
SYNO.SurveillanceStation.Camera.Wizard
This API provides Saving/Editing operations for camera
API Name SYNO.SurveillanceStation.Camera.Wizard
Method Name CheckSDCardSize
CheckQuota CamBatAddSaveAll
FormatSDCard QuickCreate
Version 1
Section 2.3.8.1 2.3.8.2 2.3.8.3 2.3.8.4 2.3.8.5
Availability Surveillance Station 7.0
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
2.3.8.1 CheckSDCardSize method
Check the available size in SD card
Request
Parameter camId host port user pass vendor model ch
Value <CAMERA_ID> <string> <string> <string> <string> <string> <string> <string>
Description Specified camera ID Address of the camera Port of the camera The user who tries to log in The Correlated password Vendor of the camera Model of the camera Optional. parameter for decoding real password
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camId=62&vendor="AXIS"&version="1"&api="SYNO.SurveillanceStation.Camera.Wizard"&method="Check SDCardSize"&host="10.13.12.165"&ch="1"&user="root"&pass="%EF%BC%83%EF%BC%83%EF%BC%83%EF %BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83"&model="P5415-E"&port="80"
Response
Key size status
Value <integer> <integer>
Description The remaining size of the SD card in KB The status of the camera
Availability 4 and onward 4 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
93
Synology Surveillance Station Web API
{ "status": 0, "size": 29022484
}
2.3.8.2 CheckQuota method
This method enables users to check the usage of the licence
Request This method specifies no parameter for request. Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Wizard"&version="1"&method="CheckQuota"
Response
Key iKeyTotal iKeyUsed
Value <integer> <integer>
localCamNum <integer> localMaxCamNum <integer>
Description
Total amount of licence in the CMS system Used amount of licence in the CMS system
Used amount of licence in the local DS The maximal number of camera that can be mount at current platform
Availability 4 and onward 4 and onward 4 and onward 4 and onward
Example:
{ "localMaxCamNum": 10, "iKeyUsed": 2, "iKeyTotal": 12, "localCamNum": 0
}
2.3.8.3 CamBarAddSaveAll method
This API saves the configuration from batch add
Request
Parameter camServerId data
Value <integer> <CamBatAdd Object>
Description The DS id on which cameras mounted The data of To-Be-Added cameras
Availability 4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
94
Synology Surveillance Station Web API
<CamBatAdd Object> definition:
Key camList
tvStandard camMountType
Value Array of <CamCreate Object> <string> <string>
camChannel name
<string> <string>
Description The list of To-Be-Added cameras
Standard of the input video How camera is mounted � 0: CEILING � 1: WALL � 2: FLOOR Channel of the output video The type of the creation
<CamCreate Object> definition:
Key
Value
vendor model ip
<string> <string> <string>
port username password
<integer> <string> <string>
name
<string>
Description Vendor of the camera Model of the camera IP address of the camera port of the camera The user trying to access the camera Password of the user The name of the camera stored in the database
Availability 4 and onward
4 and onward 4 and onward
4 and onward 4 and onward
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camId=62&vendor="AXIS"&version="1"&api="SYNO.SurveillanceStation.Camera.Wizard"&method="Check SDCardSize"&host="10.13.12.165"&ch="1"&user="root"&pass="%EF%BC%83%EF%BC%83%EF%BC%83%EF %BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83"&model="P5415E"&port="80"http://192.168.1.1:5000/webapi/entry.cgi? camServerId=0&api="SYNO.SurveillanceStation.Camera.Wizard"&data={"camChannel": "", "camList": [{"username": "admin", "vendor": "ABUS", "name": "TVIP20000-001", "ip": "10.13.12.200", "model": "TVIP20000", "password": "synoss", "port": 80}, {"username": "root", "vendor": "AXIS", "name": "P5415-E001", "ip": "10.13.12.165", "model": "P5415-E", "password": "natmaster", "port": 80}, {"username": "admin", "vendor": "iPUX", "name": "ICS8220-001", "ip": "10.13.11.195", "model": "ICS8220", "password": "admin", "port": 80}], "camMountType": "", "mode": "quick", "tvStandard": ""}&version="1"&method="CamBatAddSaveAll"
Response
Key pid
Value <integer>
Description
The process id for other API to trace the creation process
Availability 4 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
95
Synology Surveillance Station Web API
{ "pid": 3585
}
2.3.8.4 FormatSDCard method
Format the SD card in the specified camera which offers edge storage service
Request Parameter
camId host port user pass vendor model ch
timeout
Value <CAMERA_ID> <string> <string> <string> <string> <string> <string> <string>
integer
Description Specified camera ID Address of the camera Port of the camera The user who tries to log in The Correlated password Vendor of the camera Model of the camera Optional. parameter for decoding real password Setting the expired time in seconds
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camId=62&vendor="AXIS"&version="1"&api="SYNO.SurveillanceStation.Camera.Wizard"&method="Forma tSDCard"&host="10.13.12.165"&ch="1"&user="root"&timeout=300&pass="%EF%BC%83%EF%BC%83%EF %BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83"&model="P5415-E"&port="80"
Response
Key result
Value <integer>
Description The occupied space in the SD card
Availability 4 and onward
Example:
{ "result": 0
}
2.3.8.5 QuickCreate method
This API provides the capability of quick-creating single camera
Copyright � Synology Inc. All rights Reserved.
96
Synology Surveillance Station Web API
Request
Parameter camServerId
Value <integer>
actFromHost
<boolean>
camStreamingType <string>
camName
<string>
camIP camPort camVendor
<string> <string> <string>
camModel camMountType
<string> <string>
camChannel camVideoType camAudioType
<string> <string> <string>
camSourcePath camUserName camPassWord
<string> <string> <string>
Description
The DS id on which this camera mounted Indicating if the api is called from CMS host
The streaming protocol of the camera User-defined name of the camera
IP address of the camera Port of the camera
Vendor of the camera Model name of the camera How camera is mounted, for example, on
the wall, ceiling Channel number of the camera
Video type of the camera Indicating audio type � 0: UNKNOWN � 1: PCM � 2: G711 � 3: G726 � 4: AAC � 5: AMR
Path of recorded videos The input camera user
The input camera password
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camUserName="admin"&api="SYNO.SurveillanceStation.Camera.Wizard"&camServerId=0&camPassWord= "%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC %83"&camVideoType="H.264"&version="1"&camVendor="iPUX"&camPort="80"&camChannel="1"&meth od="QuickCreate"&camName="xx"&camModel="ICS8220"&camIP="10.13.11.195"&actFromHost=false&ca mStreamingType="RTSP"&camMountType="0"&camAudioType="2"&camSourcePath="%E4%BD%BF %E7%94%A8%E9%A0%90%E8%A8%AD%E5%BD%B1%E5%83%8F%E8%B7%AF%E5%BE%91%"
Response Key
camId Camera
keyUsedCnt
Value
<CAMERA_ID> Array of <Camera Information Object> <integer>
Description The remaining size of the SD card in KB The added camera object
The status of the camera
Availability 4 and onward 4 and onward
4 and onward
Example:
{ "camId": 80,
Copyright � Synology Inc. All rights Reserved.
97
Synology Surveillance Station Web API
"camera": [ { "audioOut": true, "mute": false, "recStatus": 0, "analyticsType": 0, "ptzCap": 111, "audioType": 4, "ptzContinuous": 39, "is_rotated_by_date": false, "ADCap": 5, "blLiveviewPriv": true, "videoCapList": [ { "stList": [ "RTSP" ], "vt": "H.264" }, { "stList": [ "HTTP" ], "vt": "MJPEG" } ], "isStatusUnrecognized": false, "is_rotated_by_space": true, "osd_position": 6, "fisheyeType": 0, "recBitrateCtrl": 1, "video_mirror": true, "vendor": "AXIS", "video_rotation": 0, "stmFisheyeType": 0, "dsPort": 5000, "TDCap": 0, "camMountType": 0, "exposure_control": 6, "name": "P5415-E-0011", "ownerDsId": 0, "osd_status": true, "fisheyeDispMode": "", "channel_id": "1", "setDICap": false, "param_chklist": 0, "analyticsBeep": false, "status_flags": 32, "feRegionList": [], "objTrack": false, "port": 80,
Copyright � Synology Inc. All rights Reserved.
98
Synology Surveillance Station Web API
"video_flip": true, "osd_format": 0, "autoPan": 0, "deleted": false, "deviceType": 4, "hasCamParam": true, "DINum": 2, "snapshot_path": "/webapi/_______________________________________________________entry.cgi? api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&cameraId=70�tamp=142491912 9&preview=true", "dsIp": "", "host": "10.13.12.165", "rotation_by_date": 30, "autoFocus": true, "volume_space": "9.617", "analyticsHeight": 0, "MDCap": 5, "rotation_by_space": "10", "analyticsVirtualFence": false, "analyticsObjSize": 0, "analyticsDirection": 1, "analyticsRegion": "", "quality": "5", "multiDI": false, "type": 3, "stm_info": [
{ "resolution": "800x450", "quality": "5", "fps": 10, "type": 0
}, {
"resolution": "800x450", "quality": "5", "fps": 10, "type": 1 }, { "resolution": "800x450", "quality": "5", "fps": 10, "type": 2 } ], "camLiveMode": 0, "volume": 50, "ptzDirection": 32, "dayend": 18, "folder": "/var/services/surveillance/P5415-E-001",
Copyright � Synology Inc. All rights Reserved.
99
Synology Surveillance Station Web API
"tvStandard": 0, "singleStream": false, "imageEnhancement": {
"saturation": 0, "sharpness": 0, "contrast": 0, "brightness": 0 }, "audioCap": true, "camIdOnRecServer": 0, "detailInfo": { "camRecTime": 30, "edgeStgEnabled": false, "camIsRotByDate": false, "camRecStreamNo": 0, "camRotByDate": 30, "camTvStandard": 0, "camMountType": 0, "camRecCbrBitrate": 1000, "camIsRotBySpace": true, "camLiveResolution": "800x450", "camRecBitrateCtrl": 1, "camMobileStreamNo": 0, "camLiveQuality": "5", "edgeStgRecStopTime": "23:59", "camLiveStreamNo": 0, "camResolution": "800x450", "camMobileQuality": "5", "camLiveMode": 0, "camPreRecTime": 5, "camIP": "10.13.12.165", "camLiveBitrateCtrl": 1, "camModel": "P5415-E", "edgeStgRecStartTime": "00:00", "camPostRecTime": 5, "camLiveCbrBitrate": 1000, "camMobileResolution": "800x450", "camUserName": "root", "camFps": 10, "camVendor": "AXIS", "camMobileFps": 10, "camFov": "", "camMobileCbrBitrate": 1000, "camRotBySpace": 10, "edgeStgDownloadSch": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
Copyright � Synology Inc. All rights Reserved.
100
Synology Surveillance Station Web API
"customAlarmDetect": 3, "camLiveFps": 10, "camChannel": "1", "camRotOption": 0, "camQuality": "5", "camPrefix": "P5415-E-001", "edgeStgRetrieveAction": 2, "camSchedule": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1], "edgeStgRecMode": 2, "customDetect": 5, "camPassWord": "%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC %83%EF%BC%83%EF%BC%83", "camVideoType": "H.264", "camMobileBitrateCtrl": 1, "MdDetSrc": 0, "camServer": 0, "camFolder": "P5415-E-001", "edgeStgRecDays": 127, "camPort": 80, "camRtspProtocol": 4, "camName": "P5415-E-0011", "camAudioType": 4 }, "enabled": true, "analyticsSens": 1, "analyticsWidth": 0, "recCbrBitrate": 1000, "blPresetSpeed": false, "DONum": 0, "id": 70, "setDOCap": false, "analyticsFrame": true, "analyticsLine": false, "daybegin": 8, "fps": 10, "status": 1, "update_time": 1424919129, "exposure_mode": 4, "time_server": "", "rotation_option": 0, "presetNum": 32, "camStatus": 9, "analyticsDwellTime": 5, "camPath": "cnRzcDovL3Jvb3Q6bmF0bWFzdGVyQDEwLjEzLjEyLjE2NTo1NTQvYXhpcy1tZWRpYS9tZWRpYS5hbXA/Y2FtZ XJhPTEmdmlkZW9jb2RlYz1oMjY0JnJlc29sdXRpb249ODAweDQ1MCZmcHM9MTAmdmlkZW9rZXlmcmFtZWl udGVydmFsPTEwJmNvbXByZXNzaW9uPTIw",
Copyright � Synology Inc. All rights Reserved.
101
Synology Surveillance Station Web API "model": "P5415-E", "resolution": "800x450"
} ], "keyUsedCnt": 8 }
2.3.8.6 API Error Code
Code 400 401 402 407
Execution failed. Parameter invalid. Camera disabled. CMS closed.
Description
Copyright � Synology Inc. All rights Reserved.
102
Synology Surveillance Station Web API
2.3.9
SYNO.SurveillanceStation.PTZ
This API provides a set of methods to execute PTZ action, and to acquire PTZ related information such as patrol list or patrol schedule of a camera.
API Name SYNO.SurveillanceStation.PTZ
Method Name Move Zoom
ListPreset GoPreset ListPatrol RunPatrol
Focus Iris
AutoFocus AbsPtz Home AutoPan
ObjTracking
2.3.9.1 Move method
Version 1 2 3
Section 2.3.9.1 2.3.9.2 2.3.9.3 2.3.9.4 2.3.9.5 2.3.9.6 2.3.9.7 2.3.9.8 2.3.9.9 2.3.9.10 2.3.9.11 2.3.9.12 2.3.9.13
Availability Surveillance Station 6.0-2337
Surveillance Station 6.1 Surveillance Station 6.3
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 2 and onward 3 and onward 3 and onward 3 and onward 3 and onward 5 and onward 5 and onward 5 and onward
Control the PTZ camera to move its lens.
Request
Parameter cameraId direction
Value
<CAMERA_ID>
up, down, left, right, dir_n
speed
<integer>
moveType
Start, Stop
Description
Unique camera ID.
Direction to move. up: Move lens up. down: Move lens down. left: Move lens left. right: Move lens right. dir_n:
n is in the range of [0 to ptzDirection-1]
Availability 1 and onward 3 and onward
Optional. 1 to 5 1 slowest 5 fastest
Optional. Start continous move Stop continous move
3 and onward 3 and onward
Copyright � Synology Inc. All rights Reserved.
103
Synology Surveillance Station Web API
Parameter dir_n
Description
n is an integer. 360 degrees is divided into ptzDirection parts. 0 means direction of right, and the following numbers represent the direction in counterclockwise order. For exmaple, dir_2 is move up for ptz camera which support 8 directions.
Example: Move lens of a camera to left with lowest speed and move continously.
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=Move&version=1&cameraId=10&direction=left&speed=1&mo veType=Start
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.2 Zoom method
Control the PTZ camera to zoom in or zoom out.
Request Parameter
cameraId control
moveType
Value <CAMERA_ID> in, out
Start, Stop
Description
Unique camera ID.
Zoom control. in: Make camera to zoom in. out: Make camera to zoom out.
Optional. Start continous move Stop continous move
Availability 1 and onward 1 and onward
3 and onward
Example: Control a camera to do zoom in. GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=Zoom&version=1&cameraId=10&control=in&moveType=Start
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.3 ListPreset method
List all presets of the PTZ camera.
Request Parameter
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
104
Synology Surveillance Station Web API
cameraId offset
<CAMERA_ID> <integer>
limit
<integer>
Unique camera ID.
Optional. The offset to be shifted in the total result. If not specified, the offset will be 0.
Optional. Number of presets to be returned. If not specified, return presets to the end of preset list.
1 and onward 1 and onward
1 and onward
Example: GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=ListPreset&version=1&offset=10&limit=3&cameraId=10
Response
Key total offset presets
Value <integer> <integer> Array of <Preset Object>
Description The number of total presets. The shifted offset in the total result. The preset list of the target camera.
Availability 1 and onward 1 and onward 1 and onward
<Preset Object> definition:
Key id name
Value <PRESET_ID> <string>
Description Unique preset ID. Preset name.
Availability 1 and onward 1 and onward
Example: {
"total": 38, "offset": 10, "presets": [{
}, {
}, {
}] }
"id": 100, "name": "My Preset 1"
"id": 101, "name": "My Preset 2"
"id": 102, "name": "My Preset 3"
2.3.9.4 GoPreset method
Move the camera lens to a pre-defined preset position.
Request Parameter
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
105
Synology Surveillance Station Web API
cameraId presetId position speed type
isPatrol
<CAMERA_ID>
Unique camera ID.
1 and onward
<PRESET_ID>
Unique preset ID.
1 ~ 3
<PRESET_POS_INDEX> Unique preset position index.
4 and onward
<PRESET_SPEED>
Go preset speed.
4 and onward
<PRESET_TYPE>
Preset type. 0 for normal preset, and 1 for home 4 and onward
preset.
<boolean>
Whether the command is to trigger preset in 4 and onward
patrol or not
Example 1: GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=GoPreset&version=1&cameraId=10&presetId=10
Example 2:
GET /webapi/entry.cgi? cameraId=5&position=1&speed=3&type=0&isPatrol=true&api=SYNO.SurveillanceStation.PTZ&method=Go Preset&version=4
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.5 ListPatrol method
Enumerate the patrol list of a PTZ camera.
Request
Parameter cameraId offset
Value <CAMERA_ID> <integer>
limit
<integer>
Description
Availability
Unique camera ID.
1 and onward
Optional.
1 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
Optional.
1 and onward
Number of patrols to be returned.
If not specified, list patrols to the end of patrol
list.
Example: GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=ListPatrol&version=1&offset=10&limit=2&cameraId=10
Response
Key total
Value <integer>
Description The number of total patrols.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
106
Synology Surveillance Station Web API
offset patrols
<integer>
The shifted offset in the total result.
Array of <Patrol Object> The patrol list of the target camera.
1 and onward 1 and onward
<Patrol Object> definition:
Key
Value
Description
Availability
id name
<PATROL_ID> <string>
Unique patrol ID. Patrol name.
1 and onward 1 and onward
stayTime sequence
5, 10, 15, 20, 25, 30, 35, The stay time of one preset position (seconds). 1 and onward
40, 45, 50, 55, 60
Array of <PRESET_ID> The preset execution sequence list.
1 and onward
Example: {
"total": 38, "offset": 10, "patrols": [
{
}, {
} ] }
"id": 10, "name": "My Patrol 1", "stayTime": 5, "sequence": [100, 101, 102]
"id": 11, "name": "My Patrol 2", "stayTime": 60, "sequence": [103, 104]
2.3.9.6 RunPatrol method
Force the camera to execute the specific patrol.
Request
Parameter cameraId patrolId
Value <CAMERA_ID> <PATROL_ID>
Description Unique camera ID. Unique patrol ID.
Availability 2 and onward 2 and onward
Example:
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=RunPatrol&version=2&cameraId=10&patrolId=11
Copyright � Synology Inc. All rights Reserved.
107
Synology Surveillance Station Web API
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.7 Focus method
Control the camera to focus in or focus out.
Request Parameter
cameraId control
moveType
Value <CAMERA_ID> In, out
Start, Stop
Description
Unique camera ID.
Focus control. in: Make camera to focus in. out: Make camera to focus out.
Optional. Start continous move Stop continous move
Availability 3 and onward 3 and onward
3 and onward
Example: Control a camera to do focus out.
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=Focus&version=3&cameraId=10&control=out&moveType=Sta rt
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.8 Iris method
Control the camera to iris in or iris out.
Request Parameter
cameraId control
moveType
Value <CAMERA_ID> in, out
Start, Stop
Description
Unique camera ID.
Iris control. in: Make camera to iris in. out: Make camera to iris out.
Optional. Start continous move Stop continous move
Availability 3 and onward 3 and onward
3 and onward
Example:
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=Iris&version=3&cameraId=10&control=in&moveType=Start
Copyright � Synology Inc. All rights Reserved.
108
Synology Surveillance Station Web API
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.9 AutoFocus method
Let camera adjust its focus automatically.
Request
Parameter cameraId
Value <CAMERA_ID>
Description Unique camera ID.
Availability 3 and onward
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.PTZ&method=AutoFocus&version=3&cameraId=10
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.10 AbsPtz method
Move the camera lens to an abosule position on screen.
Request
Parameter cameraId posX
Value <CAMERA_ID> <integer>
posY
<integer>
Description
Availability
Unique camera ID.
3 and onward
[0 to 640]
3 and onward
Absolutely position in horizontal-axis on screen.
> 320: move right
< 320: move left
[0 to 480]
3 and onward
Absolutely position in vertical-axis on screen.
>240: move up
<240: 240 move down
Example:
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.PTZ&method=AbsPtz&version=3&cameraId=10&poxX=240&posY=400
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
109
Synology Surveillance Station Web API
2.3.9.11 Home method
Move the camera PTZ to Home position.
Request
Parameter cameraId
Value <CAMERA_ID>
Description Unique camera ID.
Availability 5 and onward
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.PTZ&method=Home&version=5&cameraId=10
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.12 AutoPan method
Start or stop the camera auto pan.
Request
Parameter cameraId moveType
Value <CAMERA_ID> <string>
Description
Unique camera ID.
Optional. Start or Stop camera auto pan, default to start. "Step": Start "Stop": Stop
Availability 5 and onward 5 and onward
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.PTZ&method=AutoPan&version=5&cameraId=10
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.13 ObjTracking method
Start or stop the camera moving object tracking.
Request
Parameter cameraId moveType
Value <CAMERA_ID> <string>
Description
Unique camera ID.
Optional. Start or Stop object tracking, default to start. "Step": Start
Availability 5 and onward 5 and onward
Copyright � Synology Inc. All rights Reserved.
110
Synology Surveillance Station Web API "Stop": Stop
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.PTZ&method=ObjTracking&version=5&cameraId=10
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.9.14 API Error Code
Code 400 401 402
Execution failed. Parameter invalid. Camera disabled.
Description
Copyright � Synology Inc. All rights Reserved.
111
Synology Surveillance Station Web API
2.3.10 SYNO.SurveillanceStation.ExternalRecording
This API provides methods to start or stop external recording of a camera.
API Name SYNO.SurveillanceStation.ExternalRecording
Method Name Record
Version 1 2
Section 2.3.10.1
Availability Surveillance Station 6.0-2337
Surveillance Station 6.1
Availability 1 and onward
2.3.10.1 Record method
Start or stop external recording of a camera.
Request
Parameter cameraId action
Value <CAMERA_ID> start, stop
Description Unique camera ID. Start or stop external recording.
Availability 1 and onward 1 and onward
Example:
Start external recording of target camera.
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=1&cameraId=10&action=start
Stop external recording of target camera.
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=1&cameraId=10&action=stop
Response
Key success
Value <boolean>
2.3.10.2 API Error Code
Description
Whether starting/stopping recording is successful or not.
Availability 2 and onward
Code 400 401 402
Execution failed. Parameter invalid. Camera disabled.
Description
Copyright � Synology Inc. All rights Reserved.
112
Synology Surveillance Station Web API
2.3.11 SYNO.SurveillanceStation.Recording
This API provides method to query recording information.
API Name SYNO.SurveillanceStation.Recording
Method Name List
Delete DeleteFilter
DeleteAll ApplyAdvanced CountByCategory
Keepalive Trunc
LoadAdvanced LockFilter UnLock
UnLockFilter Lock
Download CheckEventValid
Stream RangeExport GetRangeExportProgress OnRangeExportDone
Version 1 3 4 6
Section 2.3.11.1 2.3.11.2 2.3.11.3 2.3.11.4 2.3.11.5 2.3.11.6 2.3.11.7 2.3.11.8 2.3.11.9 2.3.11.10 2.3.11.11 2.3.11.12 2.3.11.13 2.3.11.14 2.3.11.15 2.3.11.16 2.3.11.17 2.3.11.18 2.3.11.19
Availability Surveillance Station 6.0-2337
Surveillance Station 6.3 Surveillance Station 7.0 Surveillance Station 8.0
Availability 6 and onward 6 and onward 3 and onward 3 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 6 and onward 4 and onward 6 and onward 6 and onward 4 and onward 6 and onward 6 and onward 6 and onward 6 and onward
2.3.11.1 List method
Query event list by specific filter conditions.
Request
Parameter offset
Value <integer>
limit
<integer>
cameraIds <string>
Description
Availability
Optional.
6 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
Optional.
6 and onward
Number of recordings to be returned.
If not specified, return recordings to the end of recording
list.
Optional.
6 and onward
The list of <CAMERA_ID> to be queried concatenated by ",".
If not specified, this parameter will be ignored and get all re-
Copyright � Synology Inc. All rights Reserved.
113
Synology Surveillance Station Web API
fromTime toTime dsId mountId
<integer> <integer> <integer> <integer>
lated events.
Optional. Query start time. If not specified, the default value is 0. Optional. Query stop time. If not specified, the default value is 0.
Optional. The owner ds id of queried recordings.
Optional. The mount id of queried recording.
6 and onward 6 and onward 6 and onward 6 and onward
Example:
GET /webapi/entry.cgi? version=6&cameraIds="1,2"&api="SYNO.SurveillanceStation.Recording"&toTime=0&offset=0&limit=80&fro mTime=0&method="List"
Response
Key total recordings dsId
Value <integer> Array of <recordings> <integer>
Description The number of total recordings. List of the queried recordings. The belonged ds id of queried recordings.
Availability total recordings dsId
<recordings> definition:
Key id videoCodec
Value <integer> <integer>
audioCodec
<integer>
height width cameraId cameraName sizeByte filePath
<integer> <integer> <integer> <integer> <integer> <integer>
Description
The id of the recording
The video codec of the recording. � 0 - Unknown � 1 - MJPEG � 2 - MPEG4 � 3 - H264 � 5 - MXPEG � 6 - H265 � 7 - H264+
The audio codec of the recording. � 0 - Unknown � 1 - PCM � 2 - G711 � 3 - G726 � 4 - AAC � 5 - AMR � 6 - UserDefine (use only with user define camera)
The image height of the recording.
The image width of the recording.
The belonged camera id of the recording.
The belonged camera name of the recording.
The size of the recording.
The file path of the recording.
Copyright � Synology Inc. All rights Reserved.
114
Synology Surveillance Station Web API
locked
<boolean>
The recording is locked or not.
Example:
{ "dsId": 0, "total": 3, "recordings": [ { "audioCodec": "", "videoCodec": "MJPEG", "width": 640, "filePath": "20141030PM/TVIP2155220141030-224911-1414680551.avi", "id": 46, "cameraName": "TVIP21552", "cameraId": 13, "sizeByte": 1041280, "height": 480, }, { "audioCodec": "", "videoCodec": "MJPEG", "width": 640, "filePath": "20141030PM/TVIP2155220141030-224911-1414680851.avi", "id": 47, "cameraName": "TVIP21552", "cameraId": 13, "sizeByte": 1041280, "height": 480, }, { "audioCodec": "", "videoCodec": "MJPEG", "width": 640, "filePath": "20141030PM/TVIP2155220141030-224911-1414681151.avi", "id": 48, "cameraName": "TVIP21552", "cameraId": 13, "sizeByte": 1041280, "height": 480, } ]
}
2.3.11.2 Delete method
Delete recordings with selection.
Copyright � Synology Inc. All rights Reserved.
115
Synology Surveillance Station Web API
Request
Parameter idList
Value <string>
dsId
<integer>
Description The list of recording id to be deleted concatenated by ",". Optional. The owner ds id of recording to be deleted.
Availability 6 and onward
6 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Recording"&idList="13,14"&version=6&method="Delete"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.3 DeleteFilter method
Delete events by specific filter conditions.
Request Parameter
reason
cameraIds fromTime toTime
Value <string>
Description Optional. The list of recording mode to be queried concatenated by ",".
0: None
Availability 3 and onward
1: Continuous Recording
2: Motion Detection Recording
3: Alarm Recording
4 Custom Recording
5: Manual Recording
6: External Recording
7: Analytics Recording
8: Edge Recording
9: Action Rule Recording
10: Advanced Continuous
<string>
Optional.
3 and onward
The list of <Camera ID> to be queried concatenated by ",".
If not specified, this parameter will be ignored and get all re-
lated events.
<timestamp> Optional.
3 and onward
Query start time.
If not specified, this parameter will be ignored and get all re-
lated events.
<timestamp> Optional.
3 and onward
Copyright � Synology Inc. All rights Reserved.
116
Synology Surveillance Station Web API
locked evtSrcType
<integer>
0, 1, 2, 3
evtSrcId
<integer>
blIncludeSnaps <boolean> hot
includeAllCam <boolean>
from_end
<integer>
from_start <integer>
Query stop time. If not specified, this parameter will be ignored and get all related events.
Query locked.
Optional. The filtered source.
4 and onward 4 and onward
0: None
1: Local
2: Recording Server
3: Mount
If not specified, the default value is 0. CONDITIONAL "depend": Param("evtSrcType").valid() The specific slave ds or mount id. If not specified, the default value is -1. Include snapshot or not. If not specified, the default value is false. Include all camera or not. If not specified, the default value is false. Time from end. If not specified, the default value is 0. Time from start. If not specified, the default value is 0.
4 and onward
4 and onward 4 and onward 4 and onward 4 and onward
Example: GET /webapi/entry.cgi?
locked=0&version="3"&blIncludeSnapshot=true&cameraIds=""&evtSrcType=2&reason=""&api="SYNO .SurveillanceStation.Recording"&evtSrcId=1&toTime=0&from_start=1423497600&fromTime=0&method="DeleteFilter"&from_end=1423584000&inc ludeAllCam=true
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.4 DeleteAll method
Delete all events that the user has authorized.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Recording"&version="4"&method="DeleteAll"
Response
Copyright � Synology Inc. All rights Reserved.
117
Synology Surveillance Station Web API This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.5 ApplyAdvanced method
Apply the setting in advance tab.
Request
Parameter
Value
Description
rotateUnrecogCam <boolean> Optional. Rotate unrecognized camera nor not. If not specified, the default value will be false.
Availability 4 and onward
Example:
GET /webapi/entry.cgi? rotateUnrecogCam=true&api="SYNO.SurveillanceStation.Recording"&version="4"&method="ApplyAdvanc ed"
Response
Key
Value
rotateUnrecogCam <boolean>
Description
Availability
Optional.
4 and onward
Rotate unrecognized camera nor not.
If not specified, the default value will be false.
Example:
{ "rotateUnrecogCam": true
}
2.3.11.6 CountByCategory method
Get the count number of Event in category.
Request
Parameter offset
Value <integer>
limit
<integer>
reason
<string>
Description
Optional. Offset of timezone. If not specified, the offset will be 0.
Optional. Number of events to be returned. If not specified, return events to the end of event list.
Optional. The list of recording mode to be queried concatenated by ",".
Availability 4 and onward
4 and onward
4 and onward
Copyright � Synology Inc. All rights Reserved.
118
Synology Surveillance Station Web API
cameraIds <string>
fromTime
<integer>
toTime
<integer>
locked evtSrcType
<integer>
0, 1, 2, 3
evtSrcId
<integer>
blIncludeSnaps <boolean> hot includeAllCam <boolean>
0: None
1: Continuous Recording
2: Motion Detection Recording
3: Alarm Recording
4: Custom Recording
5: Manual Recording
6: External Recording
7: Analytics Recording
8: Edge Recording
9: Action Rule Recording
10: Advanced Continuous
Optional.
4 and onward
The list of <Camera ID> to be queried concatenated by ",".
If not specified, this parameter will be ignored and get all re-
lated events.
Optional.
4 and onward
Query start time.
If not specified, the default value is 0.
Optional.
4 and onward
Query stop time.
If not specified, the default value is 0.
Query locked.
4 and onward
Optional. The filtered source.
4 and onward
0: None
1: Local
2: Recording Server
3: Mount
If not specified, the default value is 0. CONDITIONAL "depend": Param("evtSrcType").valid() The specific slave ds or mount id. If not specified, the default value is -1. Include snapshot or not. If not specified, the default value is false. Include all camera or not. If not specified, the default value is false.
4 and onward
4 and onward 4 and onward
Example:
GET /webapi/entry.cgi? locked=0&version="4"&blIncludeSnapshot=true&cameraIds=""&evtSrcType=2&reason=""&api="SYNO.Surv eillanceStation.Recording"&evtSrcId=1&toTime=0&limit=0&fromTime=0&method="CountByCategory"&timezoneOffset=480&includeAllCam=tru e
Copyright � Synology Inc. All rights Reserved.
119
Synology Surveillance Station Web API
Response
Key date
Value Array of <day_cnt>
evt_cam total
Array of <evt_cam_ds_info> <integer>
Description
Number of Event of each day. -1: Total number count. yyyy/mm/dd: Number count of yyyy/mm/dd. (Ex:1990/05/09)
Information of event camera.
Availability 4 and onward
4 and onward
Total number of Event.
4 and onward
<day_cnt> definition:
Key -1 yyyy/mm/dd
Value <integer> <time_cnt>
Description
Total number count.
Number count of log of yyyy/mm/dd. (Ex:1990/05/09)
Availability 4 and onward 4 and onward
<time_cnt> definition:
Key -1 am pm
Value <integer> <integer> <integer>
Description Total number count. Number count of log in am. Number count of log in pm.
Availability 4 and onward 4 and onward 4 and onward
<evt_cam_ds_info> definition:
Key
Value
-1
<integer>
X
<evt_cam_info>
Description Total number count. X is the local DS id.
Availability 4 and onward 4 and onward
<evt_cam_info> definition:
Key -1 CAMERA_NAME
Value <integer> <integer>
Description Total number count. CAMERA_NAME is the name of camera. (Ex: "39-FD8171-001":98)
Availability 4 and onward 4 and onward
Example:
{ date":{ "-1":243, "2015/03/11":{ "-1":156, "am":0, "pm":156 }, "2015/03/12":{ "-1":87, "am":69, "pm":18 }
Copyright � Synology Inc. All rights Reserved.
120
Synology Surveillance Station Web API
}, "evt_cam":{
"-1":243, "0":{
"-1":243, "17-IP7135":48, "18-E33":195 } }, "total":243 }
2.3.11.7 Keepalive method
Keep event play alive
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Recording"&version="4"&method="Keepalive"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.8 Trunc method
A method to stop a recording event.
Request
Parameter idList
Value Array of <idList>
Optional. Event id lists.
Description
<idList> definition:
Parameter
Value
id
<string>
dsId
<integer>
Description
Unique camera ID with Unique event ID. "CAMERA_ID : EVENT_ID"
Event's owner dsId
Example:
Availability 4 and onward
Availability 3 and onward 3 and onward
Copyright � Synology Inc. All rights Reserved.
121
Synology Surveillance Station Web API GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Recording"&idList=[{"dsId": 0, "id": "0:4295"}]&version="4"&method="Trunc"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.9 LoadAdvanced method
Load the setting in advance tab.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Recording"&version="4"&method="LoadAdvanced"
Response
Key
Value
rotateUnrecogCam <boolean>
Example:
{
"rotateUnrecogCam": true
}
Description Rotate unrecognized camera nor not.
Availability 4 and onward
2.3.11.10 LockFilter method
Lock the selected events in filter.
Request
Parameter reason
Value <string>
Description Optional. The list of recording mode to be queried concatenated by ",". 0: None
1: Continuous Recording
2: Motion Detection Recording
3: Alarm Recording
4: Custom Recording
5: Manual Recording
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
122
Synology Surveillance Station Web API
cameraIds fromTime toTime locked evtSrcType
evtSrcId
<string>
<integer> <integer> <integer> 0, 1, 2, 3
<integer>
6: External Recording
7: Analytics Recording
8: Edge Recording
9: Action Rule Recording
10: Advanced Continuous
Optional.
4 and onward
The list of <Camera ID> to be queried concatenated by ",".
If not specified, this parameter will be ignored and get all re-
lated events.
Optional. Query start time. If not specified, the default value is 0.
4 and onward
Optional. Query stop time. If not specified, the default value is 0.
Query locked.
4 and onward 4 and onward
Optional. The filtered source.
4 and onward
0: None
1: Local
2: Recording Server
3: Mount
If not specified, the default value is 0. CONDITIONAL "depend": Param("evtSrcType").valid() The specific slave ds or mount id. If not specified, the default value is -1.
4 and onward
Example:
GET /webapi/entry.cgi? reason="1,3,8"&api="SYNO.SurveillanceStation.Recording"&locked=0&version="4"&toTime=0&cameraIds= "1,2,3"&evtSrcType=2&fromTime=0&method="LockFilter"&evtSrcId=3
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.11 UnLock method
Unlock the selected recordings.
Request
Parameter idList
Value <string>
dsId
<integer>
Description The list of recording id to be unlocked concatenated by ",". Optional.
Availability 6 and onward
6 and onward
Copyright � Synology Inc. All rights Reserved.
123
Synology Surveillance Station Web API The belonged ds id of recordings to be unlocked.
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Recording"&idList="13,14"&dsId=0&version=6&method="UnLock"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.12 UnLockFilter method
Unlock the selected events in filter.
Request
Parameter reason
Value <string>
cameraIds <string>
fromTime
<integer>
toTime
<integer>
locked evtSrcType
<integer>
0, 1, 2,
Description Optional. The list of recording mode to be queried concatenated by ",".
0: None
Availability 4 and onward
1: Continuous Recording
2: Motion Detection Recording
3: Alarm Recording
4: Custom Recording
5: Manual Recording
6: External Recording
7: Analytics Recording
8: Edge Recording
9: Action Rule Recording
10: Advanced Continuous
Optional.
4 and onward
The list of <Camera ID> to be queried concatenated by ",".
If not specified, this parameter will be ignored and get all re-
lated events.
Optional.
4 and onward
Query start time. If not specified, the default value is 0.
Optional.
4 and onward
Query stop time. If not specified, the default value is 0.
Query locked.
4 and onward
Optional.
4 and onward
The filtered source.
0: None
Copyright � Synology Inc. All rights Reserved.
124
Synology Surveillance Station Web API
evtSrcId
3 <integer>
1: Local
2: Recording Server
3: Mount If not specified, the default value is 0. CONDITIONAL "depend": Param("evtSrcType").valid() The specific slave ds or mount id. If not specified, the default value is -1.
4 and onward
Example:
GET /webapi/entry.cgi? reason="1,3,8"&api="SYNO.SurveillanceStation.Recording"&locked=0&version="4"&toTime=0&cameraIds= "1,2,3"&evtSrcType=2&fromTime=0&method="UnLockFilter"&evtSrcId=3
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.13 Lock method
Lock the selected recordings
Request
Parameter idList dsId
Value <string> <integer>
Description The list of recording id to be locked concatenated by ",". Optional. The belonged ds id of recordings to be locked.
Availability 6 and onward 6 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Recording"&idList="13,14"&version=6&method="Lock"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.11.14 Download method
Download recording.
Request
Parameter id
Value <integer>
Id of recording.
Description
Availability 6 and onward
Copyright � Synology Inc. All rights Reserved.
125
Synology Surveillance Station Web API
mountId
<integer>
offsetTimeMs <integer> playTimeMs <integer>
If not specified, the default value will be 0.
Optional. Mount id of recording. If not specified, the default value will be 0.
Optional. The start time offset of the download recording.
Optional. The duration of the download recording.
6 and onward
6 and onward 6 and onward
Example:
GET /webapi/entry.cgi/test.mp4? id=5753&version=6&mountId=0&api="SYNO.SurveillanceStation.Recording"&method="Download"&offsetT imeMs=2000
Response MP4 file data.
Note You could assign download file name in the webapi. The example show the case which downloaded the file name is "test.mp4".
2.3.11.15 CheckEventValid method
Check if recording playable.
Request
Parameter eventId
Value <integer>
chkDetail
<boolean>
mountId
<integer>
dsId
<integer>
Description
Optional. Id of event. If not specified, the default value will be 0.
Optional. Default value: true. Check camera playback privilege and recording existence.
Optional. Default value: 0. Check if mount status normal for mounted recording.
Optional. Default value: 0. Check if recording server status normal for recording on slave ds.
Availability 4 and onward
4 and onward
4 and onward
4 and onward
Example:
GET /webapi/entry.cgi? eventId=5753&version="4"&api="SYNO.SurveillanceStation.Recording"&method="CheckEventValid"
Copyright � Synology Inc. All rights Reserved.
126
Synology Surveillance Station Web API
Response
Key itemStatus
Value <integer>
Example:
{ "itemStatus": 0
}
Description
If recording playable. 0: Normal 1: Not Exist 2: No Privilege
Availability 4 and onward
2.3.11.16 Stream method
Play a specific recording.
Request
Parameter recordingId
Value <integer>
dsId
<integer>
mountId
<integer>
alertRecording <boolean>
videoCodec <integer>
Description
Optional. Id of recording.
Optional. Owner ds id of recording.
Optional. Mount id of recording.
Optional. True if played recording is triggered by live view alert. The default value is false.
Optional. Recording video codec. Only valid when playing non local recordings.
� 0 - Unknown � 1 - MJPEG � 2 - MPEG4 � 3 - H264 � 5 - MXPEG � 6 - H265 � 7 - H264+
Availability 6 and onward 6 and onward 6 and onward 6 and onward
6 and onward
Example: GET /webapi/entry.cgi? recordingId=5753&version=6&api="SYNO.SurveillanceStation.Recording"&method="Stream"&dsId=0
Response
Copyright � Synology Inc. All rights Reserved.
127
Synology Surveillance Station Web API
For MJPEG recording, server will deliver a server push multipart image stream in response. Some HTTP headers may be inserted between the boundary string and the data chunk, as listed below:
Example 1: MJPEG recording stream HTTP/1.1 200 OK Date: Fri, 25 May 2012 05:59:39 GMT Server: nginx Keep-Alive: timeout=20 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: multipart/x-mixed-replace;boundary=myboundary
--myboundary Content-Type: image/jpeg Content-Length: 46414
<JPEG image data> --myboundary Content-Type: image/jpeg Content-Length: 59831
<JPEG image data> --myboundary Content-Type: image/jpeg Content-Length: 36914
<JPEG image data> ...
For other codec recording, server will deliver a 206 Partial Content response containing the following headers:
Header Accept-Ranges Content-Length Content-Range Content-Type
Description Let clients know that server accept byte range request. The data length of the data chunk actually returned. The requested range of byte for the data in the body. video/mp4 � MPEG4/H.264 format recording.
Example 2: MPEG4 recording stream.
HTTP/1.1 206 Partial Content Date: Mon, 05 Mar 2012 15:50:34 GMT Server: nginx Accept-Ranges: bytes Content-Length: 9298055 Content-Range: bytes 19244797-28542851/28542852 Connection: keep-alive Content-Type: video/mp4
<MPEG4 recording file data>
Copyright � Synology Inc. All rights Reserved.
128
Synology Surveillance Station Web API
2.3.11.17 RangeExport method
Download the merged files of UTC time range recordings of target camera. If there are different resolution or codec within UTC time range, the recordings will merge as much as possible and downlod file will be a zip file.
Request
Parameter camId fromTime toTime fileName
Value <integer> <integer> <integer> <string>
Description
Id of camera. The start of UTC time range.
The end of UTC time range. Download file name without file extension. Use for included recording name if zip file needed.
Availability 6 and onward 6 and onward 6 and onward 6 and onward
Example:
GET /webapi/entry.cgi? camId=366&fileName="video"&fromTime=1584933650&toTime=1584934152&api="SYNO.SurveillanceStati on.Recording"&method="RangeExport"&version=6
Response
Name dlid
Value <integer>
Description The download id of this range export task.
Availability 6 and onward
Note This method will start a task which have keep-alive mechanism. Use GetRangeExportProgress method to get newest progress and keep-alive. After receiving progress 100, use OnRangeExportDone method to download exported recording within 1 minutes. If you want to cancel range export task, just do not send GetRangeExportProgress method or OnRangeExportDone method. System will cleanup processed files itself.
2.3.11.18 GetRangeExportProgress method
Get newest progress and keep-alive of RangeExport method.
Request
Parameter dlid
Value <integer>
Description Response of RangeExport method.
Availability 6 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Recording"&method="GetRangeExportProgress"&version=6&dlid=20069
Copyright � Synology Inc. All rights Reserved.
129
Synology Surveillance Station Web API
Response Name
progress
fileExt
Value <integer>
<string>
Description
The progress of target RangeExport method task. Receive -1 if task failed.
"zip", "mp4" or empty. Reval response data of OnRangeExportDone method if progress is 100.
Availability 6 and onward
6 and onward
Note OnRangeExportDone method must send within each 20 seconds to keep RangeExport method task alive.
2.3.11.19 OnRangeExportDone method
Download recording from target RangeExport method.
Request
Parameter dlid fileName
Value <integer> <string>
Description
Response of RangeExport method.
Download file name without file extension. Use for zip file name if zip file needed.
Availability 6 and onward 6 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Recording"&method="OnRangeExportDone"&version=6&dlid=20069&&file Name="video"
Response MP4 or zip file data. The response type can be found in fileExt of GetRangeExportProgress method response when progress 100.
Note GetRangeExportProgress method must be sent within 1 minute after corresponding RangeExport method task is completed, otherwise the exported recordings will be cleared.
2.3.11.20 API Error Code
Code 400 401 405 414
Execution failed. Parameter invalid. CMS server connection failed. Some events not exist.
Description
Copyright � Synology Inc. All rights Reserved.
130
Synology Surveillance Station Web API
439
Too many items selected.
Copyright � Synology Inc. All rights Reserved.
131
Synology Surveillance Station Web API
2.3.12 SYNO.SurveillanceStation.Recording.Export
This API provides several methods to access the information of exporting task of Surveillance Station. (Ex: Get information/count number of events in task, Check the availability of task name and exporting task, Save/Load event task)
API Name SYNO.SurveillanceStationEvent.Recording
.Export
Method Name Load
CheckName CamEnum CheckAvailableExport
Save GetEvtExpInfo
Version 1
Section 2.3.12.1 2.3.12.2 2.3.12.3 2.3.12.4 2.3.12.5 2.3.12.6
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.12.1 Load method
Handle load event export.
Request
Parameter start
Value <integer>
limit
<integer>
Description
Optional. The offset to be shifted in the total result. If not specified, the default value will be 0.
Optional. Number of Visual Stations to be returned. If not specified, the default value will be 0.
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? start=0&api="SYNO.SurveillanceStation.Recording.Export"&limit=100&version="1"&method="Load"
Response
Key evtexptotal exporttask
Value <integer> Array of <exporttask_info>
Description Total number of export task. Information of export task.
Availability 1 and onward 1 and onward
<exporttask_info> definition:
Key
Value
id
<integer>
Description Id of export task.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
132
Synology Surveillance Station Web API
name srcDsId dstDsId dstdir start_time stop_time status total_count
<string> <integer> <integer> <string> <integer> <integer> <integer> <integer>
Name of export task. Id of source DS. Id of destination DS. Directory of destination. Start time of event. Stop time of event. Status of export task. Total count number of events.
Example:
{ "exporttask": [ { "status": 0, "srcDsId": 0, "exported_count": 1, "start_time": 1425398400, "name": "asdf", "dstdir": "test", "total_count": 30, "dstDsId": 0, "id": 5, "stop_time": 1425484800 } ], "evtexptotal": 1
}
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.12.2 CheckName method
Check the name of export event.
Request
Parameter dsId
Value <integer>
name share
<string> <string>
Optional. DS Id.
Description
If not specified, the default value will be 0.
Optional. Name of the export event.
Optional. Export destination.
Availability 1 and onward
1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? name="asdf"&share="test"&api="SYNO.SurveillanceStation.Recording.Export"&version="1"&dsId=0&meth od="CheckName"
Copyright � Synology Inc. All rights Reserved.
133
Synology Surveillance Station Web API
Response
Key conflict
<integer>
Value
Example: {
"conflict": 0
}
Description The current status of the VS. 0: None
1: Overwrite
2: Cannot overrite.
Availability 1 and onward
2.3.12.3 CamEnum method
Get list information of all cameras.
Request
Parameter dsId
Value <integer>
Description Optional. DS Id.
If not specified, the default value will be -1.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Recording.Export"&dsId=0&version="1"&method="CamEnum"
Response Key
camlist
Value
Array of <camlist_info>
<camlist_info>definition:
Key checked id idOnRecServ enable name ipaddr status
Value <boolean> <integer> <integer> <boolean> <string> <string> <integer>
Camera list.
Description
Availability 1 and onward
Description Is the camera checked or not. Id of camera. Id of camera on recording server. Is the mount event enabled or not. Name of camera. IP address of camera. Status of mount event.
0: Normal
1: Disable
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
134
Synology Surveillance Station Web API
deleted
<boolean>
2: Unreachable 3: Server disconnected 4: Configuring 5: Deleting Is the camera being deleted.
Example:
{ "camlist": [ { "status": 3, "enable": true, "checked": false, "name": "M1031-W", "deleted": false, "idOnRecServ": 0, "ipaddr": "10.13.22.115", "id": 32 } ]
}
1 and onward
2.3.12.4 CheckAvailableExport method
Check if the destination folder is available for export or not.
Request
Parameter freeSize
Value <integer>
startTime
<integer>
stopTime
<integer>
camIdList
<string>
Optional. Free size (MB).
Description
If not specified, the default value will be 0.
Optional. Start time of event.
If not specified, the default value will be 0.
Optional. Stop time of event.
If not specified, the default value will be 0.
Optional. List of camera Id.
Availability 1 and onward
1 and onward
1 and onward
1 and onward
Example: GET /webapi/entry.cgi?
Copyright � Synology Inc. All rights Reserved.
135
Synology Surveillance Station Web API camIdList="32,33,34"&version="1"&freeSize=881508&method="CheckAvailableExport"&api="SYNO.Surveil lanceStation.Recording.Export"&startTime=1425398400&stopTime=1425484800
Response
Key result
Value <integer>
Description The feasibility of exporting target events. 0: Normal
1: Error
2: No event
3: Oversize
Availability 1 and onward
Example: {
"result": 0
}
2.3.12.5 Save method
Handle save event export.
Request
Parameter name srcDsId
Value <string> <integer>
dstDsId
<integer>
dstdir freesize
<string> <integer>
start_time
<integer>
stop_time
<integer>
isoverwrite
<integer>
camlistid
<string>
Description Name of export task. Optional. Id of source DS. If not specified, the default value will be 0. Optional. Id of destination DS. If not specified, the default value will be 0. Directory of destination. Optional. Free size (MB). If not specified, the default value will be 0. Optional. Start time of event. If not specified, the default value will be 0. Optional. Stop time of event. If not specified, the default value will be 0. Remove the conflict dir with user's confirm.
0: false
1: true
List of camera Id.
Availability 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward
1 and onward
1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
136
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? srcDsId=0&isoverwrite=0&name="asdf"&dstdir="test"&start_time=1425398400&freesize=881508&metho d="Save"&api="SYNO.SurveillanceStation.Recording.Export"&stop_time=1425484800&version="1"&camlis tid="32,33,34"&dstDsId=0
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.12.6 GetEvtExpInfo method
Get event export information from recording server.
Request
Parameter startTime
Value <integer>
stopTime camIdList
<integer> <string>
Description Optional. Start time of event.
If not specified, the default value will be 0.
Optional. Stop time of event. If not specified, the default value will be 0. List of camera Id.
Availability 1 and onward
1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? camIdList="32,33,34"&version="1"&method="GetEvtExpInfo"&api="SYNO.SurveillanceStation.Recording.Ex port"&startTime=1425398400&stopTime=1425484800
Response Key
camEvtInfoList
eventIdList fisheyeIdList totalEvtCnt totalEvtSize
Value
Description
Array of
Information list of target events.
<camEvtInfoList_info>
<string>
List of event Id.
<string>
List of fisheye Id.
<integer>
Total count number of events.
<integer>
Total size of events. (MB)
Availability 1 and onward
<camEvtInfoList_info>definition:
Key
Value
camEvtList
Array of <camEvtList_info>
camId
<integer>
Description Information of target camera event.
Availability 1 and onward
Id of camera.
1 and onward
Copyright � Synology Inc. All rights Reserved.
137
Synology Surveillance Station Web API
camStoragePath <string>
Storage path of the camera.
<camEvtList_info>definition:
Key path
Value <string>
Description Detail path of target camera event.
Example:
{ "eventIdList": "", "totalEvtCnt": 0, "fisheyeIdList": "", "totalEvtSize": 0, "camEvtInfoList": [ { "camId": 32, "camEvtList": [], "camStoragePath": "/var/services/surveillance/M1031-W" } ]
}
2.3.12.7 API Error Code
Code 400 401 405 414 439
Execution failed. Parameter invalid. CMS server connection failed. Some events not exist. Too many items selected.
Description
1 and onward
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
138
Synology Surveillance Station Web API
2.3.13 SYNO.SurveillanceStation.Recording.Mount
This API provides a method to load information of event mount in Surveillance Station.
API Name SYNO.SurveillanceStation.Recording.Mount
Version 1
Availability Surveillance Station 7.0
Method Name Load
Section 2.3.13.1
Availability 1 and onward
2.3.13.1 Load method
Load the event mount.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Recording.Mount"&version="1"&method="Load"
Response Key
eventmount
total
Value
Array of <mount_element>
<integer>
Mount event.
Description
Total number of mount event.
Availability 1 and onward
1 and onward
<mount_element> definition:
Key camlist dsId enable expid id name start_time status
Value Array of <cam_info> <integer> <boolean> <string> <integer> <string> <integer> <integer>
stop_time
<integer>
Description Camera List.
Id of DS. Is the mount event enabled or not.
Export info. Id of mount event.
Name of mount event. Start time of mount event.
Status of mount event. 0: Normal 1: Disable 2: Unreachable 3: Server disconnected 4: Configuring 5: Deleting Stop time of mount event.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
139
Synology Surveillance Station Web API
<cam_info> definition:
Key
Value
Description
analyticsDirection <integer>
Analytics type of liveview.
0: One way direction in analytics 1: Two way direction in analytics
analyticsDwellTime <integer>
Setting of dwelling time in liveview analytics.
analyticsObjSize <integer>
Setting of object size in liveview analytics.
0: One forth object size 1: One ninth object size
2: One sixteenth object size
analyticsRegion <string>
Setting of analytics Region in liveview analytics.
0: Unset 1: Set
analyticsSens
<integer>
Analytics type of liveview.
0: Low 1: Medium
2: High
analyticsType
<integer>
Analytics type of liveview.
0: None 1: Motion
2: Missing object 3: Foreign object
4: Camera occlusion 5: Focus lost
6: Loitering
7: Object counting 8: Virtual fence
9: Total
camMountType <integer>
Type of mounted camera.
0: ceiling 1: wall
2: floor
3: CNT
feRegionList
Array of <feRegion_info> List of fisheye region.
fisheyeType
<integer>
Type of fisheye. 0: no fisheye
other than 0: one of vendor
id
<integer>
Camera Id.
name
<string>
Camera name.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
<feRegion_info> definition:
Key
Value
camId
<integer>
id name
<integer> <string>
posX
<integer>
posY
<integer>
type
<integer>
Description Camera Id. Id of fisheye region. Name of fisheye region. Position X of fisheye region. Position Y of fisheye region. Type of fisheye region.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
140
Synology Surveillance Station Web API
zoom
<integer>
-1: FISHEYE_NOT_REGION 0: FISHEYE_REGION 1: FISHEYE_PANORAMA 2: FISHEYE_DOUBLE_PANORAMA 3: FISHEYE_TRIPLE_VIEW 4: FISHEYE_QUAD_VIEW 5: FISHEYE_SUB_REGION 6: FISHEYE_SUB_PANORAMA
Zoom value.
1 and onward
Example:
{ "total": 1, "eventmount": [ { "status": 0, "enable": true, "start_time": 1424016000, "name": "12314144", "expid": "20150216095031-0011323CC391", "camlist": [ { "analyticsDirection": 0, "analyticsType": 1, "analyticsDwellTime": 5, "analyticsRegion":
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000001111111111111111111111111111111111100000111111111111 11111111111111111111111000001111111111111111111111111111111111100000111111111111111111 11111111111111111000001111111111111111111111111111111111100000111111111111111111111111 11111111111000001111111111111111111111111111111111100000111111111111111111111111111111 11111000001111111111111111111111111111111111100000111111111111111111111111111111111110 00001111111111111111111111111111111111100000111111111111111111111111111111111110000011 11111111111111111111111111111111100000111111111111111111111111111111111110000011111111 11111111111111111111111111100000111111111111111111111111111111111110000011111111111111 11111111111111111111100000111111111111111111111111111111111110000011111111111111111111 11111111111111100000111111111111111111111111111111111110000011111111111111111111111111 11111111100000111111111111111111111111111111111110000011111111111111111111111111111111 11100000111111111111111111111111111111111110000011111111111111111111111111111111111",
"camMountType": 0, "id": 38, "name": "FE8172-001", "analyticsSens": 1, "feRegionList": [
{ "camId": 38, "name": "Default Region", "zoom": 25,
Copyright � Synology Inc. All rights Reserved.
141
Synology Surveillance Station Web API
"posX": 500, "posY": 500, "type": 0, "id": 26 }, { "camId": 38, "name": "Default Panorama", "zoom": 25, "posX": 500, "posY": 250, "type": 1, "id": 27 }, { "camId": 38, "name": "Default Double Panorama", "zoom": 25, "posX": 500, "posY": 250, "type": 2, "id": 28 }, { "camId": 38, "name": "Default Triple View", "zoom": 25, "posX": 500, "posY": 250, "type": 3, "id": 29 }, { "camId": 38, "name": "Default Quad View", "zoom": 25, "posX": 500, "posY": 250, "type": 4, "id": 30 } ], "fisheyeType": 1, "analyticsObjSize": 2 } ], "dsId": 0, "id": 4, "stop_time": 1424102400 } ]
Copyright � Synology Inc. All rights Reserved.
142
Synology Surveillance Station Web API }
2.3.13.2 API Error Code
Code 400 401 405 414 439
Execution failed. Parameter invalid. CMS server connection failed. Some events not exist. Too many items selected.
Description
Copyright � Synology Inc. All rights Reserved.
143
Synology Surveillance Station Web API
2.3.14 SYNO.SurveillanceStation.CMS
This API provides several methods to access ds in CMS. (Ex: Get information, Apply option, Lock, Modify share privilege, Check Samba Enabled/Enable samba, Redirect, Get snapshot)
API Name SYNO.SurveillanceStation.CMS
Redirect
Method Name
ModifySharePriv
ApplyOption
GetInfo
DoSyncData
CheckSambaEnabled
BatCheckSambaService
GetMDSnapshot
GetCMSStatus
EnableSamba
NotifyCMSBreak
LockSelf
Version 1
Section 2.3.14.1 2.3.14.2 2.3.14.3 2.3.14.4 2.3.14.5 2.3.14.6 2.3.14.7 2.3.14.8 2.3.14.9 2.3.14.10 2.3.14.11 2.3.14.12
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.14.1 Redirect method
Redirect the webAPI to target DS.
Request Parameter
dsId
webAPI
Value <integer>
Array of <webAPI_info>
Optional. DS Id.
Optional. Webapi.
Description
Availability 1 and onward
1 and onward
Example: GET /webapi/entry.cgi?webAPI={"api": "SYNO.SurveillanceStation.AddOns", "version": 1, "method": "List"}&api="SYNO.SurveillanceStation.CMS"&dsId=3&version="1"&method="Redirect"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
144
Synology Surveillance Station Web API
2.3.14.2 ModifySharePriv method
Modify share privilege.
Request
Parameter privSet
Value <integer>
shareName
<string>
Description
Optional. Privilege setting. If not specified, the default value will be 0.
Optional. Name of share folder.
Availability 1 and onward
1 and onward
Example: GET /webapi/entry.cgi? shareName=""&privSet=0&api="SYNO.SurveillanceStation.CMS"&version="1"&method="ModifySharePriv"
Response
Key privOrg
<integer>
Value
Description Original privilege setting.
Availability 1 and onward
Example:
{ "privOrg": 0
}
2.3.14.3 ApplyOption method
Apply the option setting.
Request
Parameter
Value
central_auto_video_relay <boolean>
central_enable
<boolean>
central_mode
<string>
Optional.
Description
Is auto video relay enabled or not.
If not specified, the default value will be false. Optional. Is central enable or not.
If not specified, the default value will be false.
Optional.
Central CMS mode.
0: Disable
1: Host server
Availability 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
145
Synology Surveillance Station Web API
central_rec_mask_mode <boolean>
central_rec_sync_time <boolean>
nvr_enable nvr_lang
<boolean> <string>
2: Rec server
Optional.
1 and onward
Prevent other user to change the setting of
recording server.
If not specified, the default value will be false.
Optional.
1 and onward
Is the time of recording server syncronized with
host.
If not specified, the default value will be false.
Optional.
1 and onward
Is NVR enabled.
If not specified, the default value will be false.
Optional.
1 and onward
Language of NVR.
Example:
GET /webapi/entry.cgi?central_auto_video_relay=false�ral_rec_sync_time=false �ral_mode="1"&api="SYNO.SurveillanceStation.CMS"&version="1"�ral_rec_mask_mode=false&method=" ApplyOption"�ral_enable=true
Response Key
Value
central_auto_vide <boolean>
o_relay
central_enable <boolean>
central_host_ip <string>
central_locked <boolean>
central_mode <string>
central_paired_ho <string> st_model central_paired_ho <string> st_name central_rec_mask <boolean> _mode central_rec_status <integer>
Description Is auto video relay enabled or not.
Availability 1 and onward
Is central enable or not. IP of paired host. Is recServer locked or not. Central CMS mode. 0: Disable 1: Host server 2: Rec server Model of paired host.
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Name of paired host.
1 and onward
Prevent other user to change the setting of recording server. Status of recServer.
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
146
Synology Surveillance Station Web API
central_rec_sync_ <boolean>
time
confirm_key
<string>
enable_video_rela <boolean>
y
key
<string>
nvr_enable
<boolean>
nvr_lang
<string>
vs_enable
<boolean>
success
<boolean>
0: normal
1: disable
3: disconnect Is the time of recording server syncronized with 1 and onward
host.
Confirm key. Enable video relay or not.
1 and onward 1 and onward
Key. Is NVR enabled. Language of NVR. Is VisualStation enabled. Success or not.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
{ "central_paired_host_model": "", "central_rec_status": 1, "central_auto_video_relay": true, "enable_video_relay": false, "confirm_key": "********", "central_paired_host_name": "", "nvr_enable": true, "central_rec_sync_time": false, "success": true, "central_mode": "1", "central_locked": false, "key": "********", "vs_enable": true, "central_rec_mask_mode": false, "central_host_ip": "", "nvr_lang": "", "central_enable": true
}
2.3.14.4 GetInfo method
Get CMS related info.
Request
Parameter isPolling
Value <boolean>
Optional.
Description
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
147
Synology Surveillance Station Web API
Prevent access DB while polling. If not specified, the default value will be false.
Example: GET /webapi/entry.cgi? isPolling=false&api="SYNO.SurveillanceStation.CMS"&version="1"&method="GetInfo"
Response Key
Value
central_auto_vide <boolean>
o_relay
central_enable <boolean>
central_host_ip <string>
central_locked <boolean>
central_mode <string>
central_paired_ho <string> st_model central_paired_ho <string> st_name central_rec_mask <boolean> _mode central_rec_status <integer>
central_rec_sync_ <boolean>
time
confirm_key
<string>
enable_video_rela <boolean>
y
key
<string>
nvr_enable
<boolean>
nvr_lang
<string>
vs_enable
<boolean>
success
<boolean>
Description Is auto video relay enabled or not.
Availability 1 and onward
Is central enable or not. IP of paired host. Is recServer locked or not. Central CMS mode. 0: Disable 1: Host server 2: Rec server Model of paired host.
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Name of paired host.
1 and onward
Prevent other user to change the setting of
1 and onward
recording server.
Status of recServer.
1 and onward
0: normal
1: disable
3: disconnect
Is the time of recording server syncronized with 1 and onward
host.
Confirm key.
1 and onward
Enable video relay or not.
1 and onward
Key. Is NVR enabled. Language of NVR. Is VisualStation enabled. Success or not.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
148
Synology Surveillance Station Web API
Example:
{ "central_paired_host_model": "", "central_rec_status": 1, "central_auto_video_relay": true, "enable_video_relay": false, "confirm_key": "********", "central_paired_host_name": "", "nvr_enable": true, "central_rec_sync_time": false, "success": true, "central_mode": "1", "central_locked": false, "key": "********", "vs_enable": true, "central_rec_mask_mode": false, "central_host_ip": "", "nvr_lang": "", "central_enable": true
}
2.3.14.5 DoSyncData method
Get log/recording data from the target DS.
Request
Parameter syncType
Value <integer>
syncTargetId
<integer>
limit
<integer>
Description
Optional. Privilege setting. If not specified, the default value will be 0.
Optional. Syncronized target DS Id. If not specified, the default value will be 1.
Optional. limit in SQL. If not specified, the default value will be 0.
Availability 1 and onward
1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? version="1"&syncType=0&syncTargetId=1&api="SYNO.SurveillanceStation.CMS"&limit=0&method="DoSyn cData"
Response Key
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
149
Synology Surveillance Station Web API
remainCnt syncDataList
<integer> Array of <syncDataList_info>
<syncDataList_info> definition Key
event_msg
<string>
id
<integer>
itemId
<integer>
level
<integer>
logGrp
<integer>
logType
<integer>
timestamp
<integer>
Value
Count number of unsyncronized data. 1 and onward
Syncronized data list.
1 and onward
Description Event messeage. Id of Log. Id of Item. Level of log message. Group of message. Type of Log. Time stamp.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
{ "remainCnt": 0, "syncDataList": [ { "itemId": 0, "level": 1, "logType": 321912959, "timestamp": 1422347919, "event_msg": "This recording server was disabled by [DS1813p_WC].", "logGrp": 0, "id": 9 } ]
}
2.3.14.6 CheckSambaEnabled method
Check Samba service.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.CMS"&version="1"&method="CheckSambaEnabled"
Response
Key sambaEnabled
<boolean>
Value
Description
Check Samba of target DS enabled or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
150
Synology Surveillance Station Web API
Example: {
"sambaEnabled": true }
2.3.14.7 BatCheckSambaService method
Check if samba service on all related rec servers is enabled.
Request
Parameter dsIdList
Value <string >
Optional. DS Id list.
Description
Availability 1 and onward
Example: GET /webapi/entry.cgi? dsIdList="3"&api="SYNO.SurveillanceStation.CMS"&version="1"&method="BatCheckSambaService"
Response
Key allSambaEnabled <boolean>
Value
Description All Samba enabled or not.
Availability 1 and onward
Example:
{ "allSambaEnabled": true
}
2.3.14.8 GetMDSnapshot method
Get encoded single-image snapshot of target camera.
Request
Parameter camId
Value <integer>
Description
Optional. Camera Id. If not specified, the default value will be 0.
Availability 1 and onward
Example: GET /webapi/entry.cgi?
Copyright � Synology Inc. All rights Reserved.
151
Synology Surveillance Station Web API api="SYNO.SurveillanceStation.CMS"&camId=0&version="1"&method="GetMDSnapshot"
Response
Key snapshot
<string>
Value
Description Encoded MD snapshot.
Availability 1 and onward
Example:
{ "snapshot": (CONTENT OF ENCODED MD SNAPSHOT)
}
2.3.14.9 GetCMSStatus method
Get CMS status.
Request
Parameter camId
Value <integer>
Description
Optional. Camera Id. If not specified, the default value will be 0.
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.CMS"&camId=1&version="1"&method="GetCMSStatus"
Response
Key CMSEnabled
Value <boolean>
Description The camera is enabled in CMS.
Availability 1 and onward
Example:
{ "CMSEnabled": true
}
2.3.14.10 EnableSamba method
Enable Samba service.
Request
Copyright � Synology Inc. All rights Reserved.
152
Synology Surveillance Station Web API No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.CMS"&version="1"&method="EnableSamba"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.14.11 NotifyCMSBreak method
Notify the target slave DS to disconnect.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.CMS"&version="1"&method="NotifyCMSBreak"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.14.12 LockSelf method
Lock the recording server to prevent the changing of settings from other server.
Request
Parameter locked
Value <boolean>
Description
Optional. Setting of locked recording server or not. If not specified, the default value will be false.
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.CMS"&locked=false&version="1"&method="LockSelf"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
153
Synology Surveillance Station Web API
2.3.14.13 API Error Code
Code 400 401 415
Execution failed. Invalid parameter. message connect failed.
Description
Copyright � Synology Inc. All rights Reserved.
154
Synology Surveillance Station Web API
2.3.15 SYNO.SurveillanceStation.CMS.GetDsStatus
This API provides several methods to access the status information of slave ds in CMS. (Ex: Enable CMS, Unpair/Pair CMS, GetFreeSpace, Lock, Test, Logout/Login)
API Name SYNO.SurveillanceStation.CMS.GetDsStatus
EnableCMS UnPair GetFreeSpace Lock Test Logout Pair Login
Method Name
Version 1
Section 2.3.15.1 2.3.15.2 2.3.15.3 2.3.15.4 2.3.15.5 2.3.15.6 2.3.15.7 2.3.15.8
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.15.1 EnableCMS method
Enable DS into recording server mode.
Request Parameter
adminUsername
Value <string>
adminPasswd
<string>
central_rec_mask_mode <string>
central_rec_sync_time <string>
Description
Availability
Optional.
1 and onward
User name.
If not specified, the default value will be "admin" .
Password.
1 and onward
Optional. Prevent other user to change the setting of recording server. If not specified, the default value will be "false" .
Optional. Is the time of recording server syncronized with host. If not specified, the default value will be "false" .
1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.CMS.GetDsStatus"�ral_rec_sync_time="false"&adminPasswd="123456"& version="1"&adminUsername="admin"�ral_rec_mask_mode="false"&method="EnableCMS"
Copyright � Synology Inc. All rights Reserved.
155
Synology Surveillance Station Web API
Response
Key status
<integer>
Value
Example:
{ "status": 0
}
Description Status of slave DS connection. 0: Normal 1: Disable 2: Unauthorized 3: Disconnect 4: Deleted 5: Inaccessible 6: Occupied 7: Configuring 8: Wrong type 9: Licnese duplicated 10: Not admin user 11: Insufficient license 12: Server Duplicated 13: Unknown 14: Rec storage removed 15: Incompatible 16: License invalid
Availability 1 and onward
2.3.15.2 UnPair method
Unpair recording server from the host.
Request Parameter
dminUsername
Value <string>
key
<string>
mac
<string>
Optional.
Description
Availability 1 and onward
User name.
If not specified, the default value will be "admin".
Optional.
1 and onward
Key. Optional.
1 and onward
Copyright � Synology Inc. All rights Reserved.
156
Synology Surveillance Station Web API
cmsMode
<integer>
Mac address. Optional. Mode of CMS. 0: Disable 1: Host server 2: Rec server If not specified, the default value will be 0.
1 and onward
Example: GET /webapi/entry.cgi? cmsMode=2&api="SYNO.SurveillanceStation.CMS.GetDsStatus"&version="1"&method="UnPair"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.15.3 GetFreeSpace method
Get free size of memory in MB.
Request No parameter is required.
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.CMS.GetDsStatus"&version="1"&method="GetFreeSpace"
Response
Key freeSizeMb
<integer>
Value
Description Free size of memory in MB.
Availability 1 and onward
Example:
{ "freeSizeMb": 922467
}
2.3.15.4 Lock method
Handle lock slave ds.
Copyright � Synology Inc. All rights Reserved.
157
Synology Surveillance Station Web API
Request Parameter
lock
Value <boolean>
adminUsername <string>
key
<string>
mac
<string>
masterAuthKey <string>
Optional.
Description
Availability 1 and onward
Lock setting.
If not specified, the default value will be false.
Optional.
1 and onward
User name of Host.
If not specified, the default value will be "admin".
Optional.
1 and onward
Key of Host.
Optional.
1 and onward
Mac address of Host. Optional.
1 and onward
Authorized key of Host.
Example:
GET /webapi/entry.cgi? masterAuthKey="14C0MON392200"&version="1"&lock=false&mac="0011323CC393"&api="SYNO.Surveilla nceStation.CMS.GetDsStatus"&key="123456"&adminUsername="admin"&method="Lock"
Response
Key status
<integer>
Value
Description Status of slave DS connection. 0: Normal 1: Disable 2: Unauthorized 3: Disconnect 4: Deleted 5: Inaccessible 6: Occupied 7: Configuring 8: Wrong type 9: Licnese duplicated 10: Not admin user 11: Insufficient license 12: Server Duplicated 13: Unknown 14: Rec storage removed 15: Incompatible
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
158
Synology Surveillance Station Web API
Example: {
"status": 0 }
16: License invalid
2.3.15.5 Test method
Get the information of target DS.
Request
Parameter slaveDsIp
Value <string>
Optional. IP of slave Ds.
Description
Availability 1 and onward
Example: GET /webapi/entry.cgi? slaveDsIp=""&api="SYNO.SurveillanceStation.CMS.GetDsStatus"&version="1"&method="Test"
Response Key
auth_key cms_locked
dsModel keyTotal keyUsed licenseList mac status
<string> <boolean>
Value
<string> <integer> <integer> <string> <string> <integer>
Description Authorized Key. Prevent the changing of settings from other server. Model of DS. Total number of key. Used number of key. List of license. Mac address. Status of slave DS connection. 0: Normal 1: Disable 2: Unauthorized 3: Disconnect 4: Deleted 5: Inaccessible 6: Occupied 7: Configuring
Availability 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
159
Synology Surveillance Station Web API
Example: {
"mac": "0011323CC393", "dsModel": "DS2015xs", "cms_locked": false, "status": 8, "keyTotal": 0, "auth_key": "14C0MON392200", "licenseList": "", "keyUsed": 0 }
8: Wrong type 9: Licnese duplicated 10: Not admin user 11: Insufficient license 12: Server Duplicated 13: Unknown 14: Rec storage removed 15: Incompatible 16: License invalid
2.3.15.6 Logout method
Handle logout slave ds.
Request
Parameter adminUsername
Value <string>
key
<string>
mac
<string>
Optional. User name. Optional. Key.
Optional. Mac address.
Description
Availability 1 and onward
1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? version="1"&mac=""&api="SYNO.SurveillanceStation.CMS.GetDsStatus"&key=""&adminUsername="admin "&method="Logout
Response
Copyright � Synology Inc. All rights Reserved.
160
Synology Surveillance Station Web API
Key status
<integer>
Value
Example:
{ "status": 3
}
Description Status of slave DS connection. 0: Normal 1: Disable 2: Unauthorized 3: Disconnect 4: Deleted 5: Inaccessible 6: Occupied 7: Configuring 8: Wrong type 9: Licnese duplicated 10: Not admin user 11: Insufficient license 12: Server Duplicated 13: Unknown 14: Rec storage removed 15: Incompatible 16: License invalid
Availability 1 and onward
2.3.15.7 Pair method
Handle pair slave ds.
Request Parameter
dsname
Value <string>
slaveDsIp
<string>
port
<integer>
masterAuthKey <string>
Optional.
Description
DS name of Host.
Optional.
Slave DS Ip.
Optional. Port of Host. If not specified, the default value will be 0.
Optional.
Authorized Key of Host.
Availability 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
161
Synology Surveillance Station Web API
model mac cms_locked
<string> <string> <boolean>
cms_masked
<boolean>
cms_sync_time <boolean>
Optional. Model of Host. Optional. Mac address of Host. Optional. Prevent the changing of settings from other
server.
If not specified, the default value will be false. Optional. Prevent other user to change the setting of
recording server.
If not specified, the default value will be false. Optional. Is the time of recording server syncronized with
host.
If not specified, the default value will be false.
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? cms_sync_time=true&masterAuthKey="14C0MON392200"&version="1"&slaveDsIp="10.13.21.18"&dsnam e="DiskStation"&cms_locked=true&method="Pair"&mac="00113235D696"&api="SYNO.SurveillanceStatio n.CMS.GetDsStatus"&cms_masked=true&model="DS414j"&port=5000
Response Key
auth_key mac ds_model cookie dp_version dsm_version serial_num ss_version status
<string> <string> <string> <string> <string> <string> <string> <string> <integer>
Value
Description Authorized Key of slave DS.
Mac address of slave DS.
Availability 1 and onward
1 and onward
Model of slave DS. Cookie. Device package version of slave DS.
1 and onward 1 and onward 1 and onward
DSM version of slave DS. Serial number of slave DS.
1 and onward 1 and onward
Surveillance Station version of slave DS. 1 and onward
Status of slave DS connection. 0: Normal
1: Disable
2: Unauthorized
3: Disconnect
4: Deleted
5: Inaccessible
Copyright � Synology Inc. All rights Reserved.
162
Synology Surveillance Station Web API
Example: {
"status": 2, "mac": "", "dp_version": "3.2-0604", "cookie": "", "ss_version": "7.1-3900", "auth_key": "", "ds_model": "", "dsm_version": "5.1-5022", "serial_num": "14C0MON392200" }
6: Occupied 7: Configuring 8: Wrong type 9: Licnese duplicated 10: Not admin user 11: Insufficient license 12: Server Duplicated 13: Unknown 14: Rec storage removed 15: Incompatible 16: License invalid
2.3.15.8 Login method
Handle login slave ds.
Request Parameter
adminUsername
Value <string>
key
<string>
mac
<string>
masterAuthKey <string>
hostName
<string>
Optional.
Description
User name of host.
Availability 1 and onward
If not specified, the default value will be "admin".
Optional.
1 and onward
Key of host.
Optional.
1 and onward
Mac address of host.
Optional. Authorized key of host.
1 and onward
Optional.
1 and onward
Copyright � Synology Inc. All rights Reserved.
163
Synology Surveillance Station Web API
hostPort
<integer>
ignoreAuthError <string>
hostDisconnect <boolean>
blUpdateVolSpace <boolean>
enable_rec
<boolean>
cms_locked
<boolean>
cms_masked
<boolean>
cms_sync_time <boolean>
Host name. Optional. Port of host.
If not specified, the default value will be 0. Optional. Ignore Authorized error or not.
If not specified, the default value will be "no". Optional. Is host disconnected.
If not specified, the default value will be false. Optional. Update Volume space or not.
If not specified, the default value will be false. Optional. Enable recording server or not.
If not specified, the default value will be false. Optional. Prevent the changing of settings from other
server.
If not specified, the default value will be true. Optional. Prevent other user to change the setting of
recording server.
If not specified, the default value will be true. Optional. Is the time of recording server syncronized with
host.
If not specified, the default value will be true.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? enable_rec=false&masterAuthKey=""&version="1"&hostName=""&hostDisconnect=false&mac=""&api="SY NO.SurveillanceStation.CMS.GetDsStatus"&ignoreAuthError="no"&key=""&hostPort=0&adminUsername=" admin"&blUpdateVolSpace=false&method="Login"
Response Key
cam_count
camera_info
cms_locked
<integer>
Value
Array of <camera_info_obj>
<boolean>
Description Number of camera. information of cameras. Prevent the changing of settings from other server.
Availability 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
164
Synology Surveillance Station Web API cms_masked <boolean>
cms_sync_time <boolean>
cookie
<string>
default_license_c <integer>
nt
dp_version
<string>
dsm_version <string>
serial_num
<string>
ss_version
<string>
status
<integer>
<camera_info_obj>
Key id
status
<integer> <integer>
Value
Prevent other user to change the setting of recording server. Is the time of recording server syncronized with host. Cookie. Number of default license of slave ds.
1 and onward
1 and onward
1 and onward 1 and onward
Device package version of slave ds. 1 and onward
DSM version of slave ds of slave ds. Serial number of slave ds.
1 and onward 1 and onward
Surveillance Station version of slave ds. 1 and onward
Status of slave DS connection. 0: Normal
1 and onward
1: Disable
2: Unauthorized
3: Disconnect
4: Deleted
5: Inaccessible
6: Occupied
7: Configuring
8: Wrong type
9: Licnese duplicated
10: Not admin user
11: Insufficient license
12: Server Duplicated
13: Unknown
14: Rec storage removed
15: Incompatible
16: License invalid
Description Camera Id. Camera connection status. 0: Unknown 1: Normal 2: Connection fail 3: Unauthorized
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
165
Synology Surveillance Station Web API
recStatus
<integer>
occupied statusFlags livePort livePath
<integer> <integer> <integer> <string>
4: Content error
5: Resolution error
6: Activating
7: Stopping Camera recording status.
1 and onward
0: None recording schedule
1: Continue recording schedule
2: Motion detect recording schedule
3: Digital input recording schedule
4: Digital input recording schedule
5: Manual recording schedule
6: External
7: Analytics
Occuppied size. Status flag.
1 and onward 1 and onward
live port.
1 and onward
live path.
1 and onward
Example:
{ "cms_sync_time": false, "default_license_cnt": 2, "cms_locked": false, "cookie": "", "camera_info": [], "dsm_version": "5.1-5022", "cam_count": 0, "serial_num": "14C0MON392200", "dp_version": "3.2-0604", "status": 3, "ss_version": "7.1-3900", "cms_masked": false
}
2.3.15.9 API Error Code
Code 400 401 415
Execution failed. Invalid parameter. message connect failed.
Description
Copyright � Synology Inc. All rights Reserved.
166
Synology Surveillance Station Web API
2.3.16 SYNO.SurveillanceStation.CMS.SlavedsWizard
This API provides a method to save the setting of slave ds in CMS of Surveillance Station.
API Name SYNO.SurveillanceStation.CMS.SlavedsWizard
Method Name Save
Version 1
Section 2.3.16.1
Availability Surveillance Station 7.0
Availability 1 and onward
2.3.16.1 Save method
Handle save slave ds
Request Parameter
slavedsName slavedsModel slavedsPort
slavedsVersion slavedsMaxCamNum
slavedsId slavedsIP slavedsEnable
slavedsCamCnt
adminUsername
Value <string> <string> <integer>
<string> <integer>
<string> <string> <integer>
<integer>
<string>
Optional.
Description
Name of slave Ds.
Optional.
Model of slave Ds.
Optional.
Port of slave Ds.
If not specified, the default value will be 0. Optional. Surveillance version of slave Ds. Optional. Maximum number of camera of slave Ds.
If not specified, the default value will be -1. Optional. Id of slave Ds. Optional. IP of slave Ds. Optional. Is slave Ds enabled.
0: false
1: true
If not specified, the default value will be 0.
Optional. Count number of camera in slave Ds.
If not specified, the default value will be -1.
Optional. Admin username.
Availability 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
167
Synology Surveillance Station Web API
adminPasswd cms_locked
cms_masked
cms_sync_time
<string> <boolean>
<boolean>
<boolean>
If not specified, the default value will be "admin" .
Optional. Admin password.
1 and onward
Optional. Prevent the changing of settings from other
1 and onward
server.
If not specified, the default value will be false .
Optional. Prevent other user to change the setting of
1 and onward
recording server or not.
If not specified, the default value will be false . Optional. Is the time of recording server syncronized with
1 and onward
host.
If not specified, the default value will be false .
Example:
GET /webapi/entry.cgi? cms_sync_time=true&slavedsPort=5000&version="1"&slavedsCamCnt=1&slavedsIP="10.13.21.16"&slaved sName="DiskStation"&adminUsername="admin"&cms_locked=true&api="SYNO.SurveillanceStation.CMS.Sl avedsWizard"&slavedsVersion="7.03736"&slavedsEnable=1&cms_masked=true&adminPasswd="123456"&slavedsModel="DS414j"&slavedsM axCamNum=8&slavedsId=""&method="Save"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.16.2 API Error Code
Code 400 401 415
Execution failed. Invalid parameter. message connect failed.
Description
Copyright � Synology Inc. All rights Reserved.
168
Synology Surveillance Station Web API
2.3.17 SYNO.SurveillanceStation.CMS.SlavedsList
This API provides a method to list the setting of slave ds in CMS of Surveillance Station.
API Name SYNO.SurveillanceStation.CMS.SlavedsList
Method Name Load
Version 1
Section 2.3.17.1
Availability Surveillance Station 8.0
Availability 1 and onward
2.3.17.1 Load method
Handle Load slave ds list.
Request Parameter
blNeedStatus blGetSortInfo blRuntimeInfo
slaveMode
dsIds sortInfo
Value <boolean> <boolean> <boolean>
-1 ... 1
<string> <Type, Order>
Optional.
Description
Get DS status or not.
Availability 1 and onward
If false, Get enabled DS only.
If not specified, the default value will be false.
Optional. Get list sort info or not.
1 and onward
If not specified, the default value will be false.
Optional. Consider "Under failover" case or not.
1 and onward
If true, The DS under failover and in the specified
mode will be filtered out.
If not specified, the default value will be true.
Optional. Load only specified mode DS.
� -1: All slave mode.
1 and onward
� 0: Recording mode only.
� 1: Failover mode only.
If not specified, the default value will be -1.
Optional.
1 and onward
The list of <DS_ID> to be queried concatenated by
",".
If not specified, this parameter will be ignored and
get all DS.
Optional.
1 and onward
Set sort info, blGetSortInfo must be true.
Type:
� id
Copyright � Synology Inc. All rights Reserved.
169
Synology Surveillance Station Web API
� name � ip � version Order: � asc � desc
Example:
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.CMS.SlavedsList&version=1&method=Load&blNeedStatus=true&blGetSortInf o=true&sortInfo="ip,asc"
Response
Key slaveds
sortInfo total
Value
Description
Array of <DS The list of queried slave DS.
Object>
<Type,Order> The sort info of slave DS list.
<integer> Total number of slave DS.
Availability 1 and onward
1 and onward 1 and onward
<DS Object> definition:
Key accessToken cms_locked cms_masked connectType
Value <string> <boolean> <boolean> 0 ... 1
cookie
<string>
curr_cam_num <integer>
curr_dev_num <integer>
curr_io_num
<integer>
curr_speaker_dev <integer>
_num
curr_trans_dev_n <integer>
um
default_license <integer>
dp_version
<string>
ds_model
<string>
dsm_version
<string>
enable
<boolean>
failoverReason 0 ... 6
Description Access token of slaves DS. Does slave DS locked or not. Does slave DS masked or not. Connect type of slaves DS.
� 0: Connect by IP or domain name. � 1: Connect by Quickconnect. Cookie token of slave DS. Current number of cameras used. Current number of all device used. Current number of iomodule used. Current number of speaker used.
Availability 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Current number of transactions device used. 1 and onward
Default license number of slaves DS.
Device Pack version of slaves DS.
Model name of slaves DS.
DSM version of slaves DS.
Does slave DS enabled or not.
Reason for failover. � 0: None � 1: Disconnected � 2: Volume crashed � 3: Volume degraded � 4: Manual
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
170
Synology Surveillance Station Web API
failoverServer <string> failoverServerSts 0 ... 20
failoverStatus 0 ... 4
failover_pair_id <integer>
id
<integer>
ip
<string>
key_total
<integer>
key_used
<integer>
max_cam_num <integer>
max_io_num
<integer>
max_speaker_dev <integer>
_num
max_trans_dev_n <integer>
um
name
<string>
pkgStatus
0 ... 12
� 5: Package uninstalled � 6: Package disabled Id of failover server. Connection status of failover server. � 0: Normal � 1: Disable � 2: Unauthorized � 3: Disconnect � 4: Deleted � 5: Inaccessible � 6: Occupied � 7: Configuring � 8: Wrong type (CMS mode does not
match expectations) � 9: License duplicated � 10: Not admin user � 11: Insufficient license � 12: Server duplicated � 13: Unknow � 14: Recording storage removed � 15: Incompatible � 16: License invalid � 17: Normal in one way (Only host can
connect to slave) � 18: Failovered � 19: Slave mode mismatch � 20: Unpaired Failover execution status � 0: None � 1: Failovering � 2: Recovering � 3: Failover error � 4: Wait manual restore Pair ID of failover DS. ID of slave DS. IP of slave DS. The total number of licenses The used number of licenses Maximum number of cameras can be set. Maximum number of iomodules can be set. Maximum number of speakers can be set.
Maximum number of transactinos devices can be set. Name of slave DS. Package execution status
� 0: Unknow � 1: Running � 2: Stop � 3: Installing � 4: Not installed
1 and onward 1 and onward
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
171
Synology Surveillance Station Web API
port quickConnectId recoverProgress serial_num slave_mode
<integer> <string> <integer> <string> -1 ... 1
ss_version status
<string> 0 ... 20
status_flags
0,1,2,4,16,32
useHttps volSpace
<boolean> <double>
� 5: Upgrading � 6: Repairing � 7: Uninstalling � 8: Starting � 9: Stopping � 10: Need to upgrade � 11: Broken � 12: Unavailable
Port of slave DS.
QuickConnect Id of slave DS.
Recovering progress.
Serial number of slave DS.
Slave mode of slave DS. � -1: All � 0: Recording � 1: Failover
Surveillance Station version of slave DS.
Connection status of slave DS. � 0: Normal � 1: Disable � 2: Unauthorized � 3: Disconnect � 4: Deleted � 5: Inaccessible � 6: Occupied � 7: Configuring � 8: Wrong type (CMS mode does not match expectations) � 9: License duplicated � 10: Not admin user � 11: Insufficient license � 12: Server duplicated � 13: Unknow � 14: Recording storage removed � 15: Incompatible � 16: License invalid � 17: Normal in one way (Only host can connect to slave) � 18: Failovered � 19: Slave mode mismatch � 20: Unpaired
Execution status of slave DS. � 0: None � 1: Enabling � 2: Disabling � 4: Deleting � 8: Locking � 16: Unlocking � 32: Configuring
Does slave DS used https or not.
Volume space of slave DS.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
172
Synology Surveillance Station Web API
volStatus
0 ... 2
Volume status of slave DS. � 0: Normal � 1: Degrade � 2: Crash
Example:
1 and onward
{ "data": { "slaveds": [ { "accessToken": "y2ogsFzTM5DCQ1680O7N631502", "cms_locked": true, "cms_masked": false, "connectType": 0, "cookie": "", "curr_cam_num": 1, "curr_dev_num": 3, "curr_io_num": 0, "curr_speaker_dev_num": 1, "curr_trans_dev_num": 1, "default_license": 2, "dp_version": "5.7.0-2602", "ds_model": "DS716+II", "dsm_version": "6.2-23739", "enable": false, "failoverReason": 0, "failoverServer": "", "failoverServerSts": 0, "failoverStatus": 0, "failover_pair_id": -1, "id": 3, "ip": "10.13.21.110", "key_total": 2, "key_used": 0, "max_cam_num": 40, "max_io_num": 40, "max_speaker_dev_num": 40, "max_trans_dev_num": 40, "name": "Blake716", "pkgStatus": 2, "port": 5000, "quickConnectId": "", "recoverProgress": 0, "serial_num": "1680O7N631502", "slave_mode": 0, "ss_version": "8.2.0-5705", "status": 1, "status_flags": 0, "useHttps": false,
Copyright � Synology Inc. All rights Reserved.
173
Synology Surveillance Station Web API
"volSpace": 889.826252, "volStatus": 0 }, { "accessToken": "lgojFoTfgr2xk1680NEN426804", "cms_locked": true, "cms_masked": false, "connectType": 0, "cookie": "id=HdAclolPThLeo", "curr_cam_num": 0, "curr_dev_num": 0, "curr_io_num": 0, "curr_speaker_dev_num": 0, "curr_trans_dev_num": 0, "default_license": 2, "dp_version": "5.7.0-2602", "ds_model": "DS216play", "dsm_version": "6.1.6-15266", "enable": true, "failoverReason": 0, "failoverServer": "", "failoverServerSts": 0, "failoverStatus": 0, "failover_pair_id": -1, "id": 4, "ip": "10.13.21.111", "key_total": 2, "key_used": 0, "max_cam_num": 15, "max_io_num": 15, "max_speaker_dev_num": 15, "max_trans_dev_num": 15, "name": "blake216", "pkgStatus": 1, "port": 5000, "quickConnectId": "", "recoverProgress": 0, "serial_num": "1680NEN426804", "slave_mode": 0, "ss_version": "8.2.0-5706", "status": 0, "status_flags": 0, "useHttps": false, "volSpace": 5540.297660827637, "volStatus": 0 } ], "total": 2 }, "success": true }
Copyright � Synology Inc. All rights Reserved.
174
Synology Surveillance Station Web API
2.3.17.2 API Error Code
Code 400 401 415
Execution failed. Invalid parameter. message connect failed.
Description
Copyright � Synology Inc. All rights Reserved.
175
Synology Surveillance Station Web API
2.3.18 SYNO.SurveillanceStation.Log
This API provides several methods to access log information of Surveillance Station. (Ex: get/clear log information detail, count log information)
API Name SYNO.SurveillanceStation.Log
Method Name CountByCategory Clear List GetSetting SetSetting
Version 1
Section 2.3.18.1 2.3.18.2 2.3.18.3 2.3.18.4 2.3.18.5
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.18.1 CountByCategory method
Get the count number of log in category.
Request Parameter
slavedsName start limit level
filterCamera cameraIds from
Value <string> <integer> <integer> <string>
<string> <string> <integer>
Description Optional. Name of slave Ds. Optional. Value of offset in SQL.
If not specified, the default value will be 0 . Optional. Value of limit in SQL.
If not specified, the default value will be 0 . Optional. Type of log.
0: None
1: Information
2: Warning
3: Error
If not specified, the default value will be "0". Optional. Apply camera filter or not. Optional. Id list of camera. Optional.
Availability 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
176
Synology Surveillance Station Web API
to keyword keywordDsId time2String dsId srcType
timezoneOffset
<integer> <string> <string> <string> <integer> <integer>
<integer>
From time of filter.
If not specified, the default value will be 0. Optional. To time of filter.
If not specified, the default value will be 0. Optional. Keyword. Optional. Keyword of DS id. Optional. Decide the format of time.
If not specified, the default value will be "yes". Optional. Id of DS.
If not specified, the default value will be -1. Optional. Source type of log.
0: None
1: Local
2: Slaveds
4: Camera group
If not specified, the default value will be 0. Optional. Offset of time zone.
If not specified, the default value will be 0.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? from=0&keywordDsId=""&keyword=""&level=""&cameraIds=""&method="CountByCategory"&to=0&api=" SYNO.SurveillanceStation.Log"&limit=0&srcType=0&version="1"&filterCamera="false"&dsId=1&start=0&timezoneOffset=480&time2String="no"
Response Key
date
log_type
Value <day_cnt>
<type_cnt>
Description Number of log of each day. -1: Total number count. yyyy/mm/dd: Number count of yyyy/mm/dd. (Ex:1990/05/09) Number of log of each log type. -1: Total number count.
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
177
Synology Surveillance Station Web API
server total
1: Number count of Information type.
2: Number count of Warning type.
3: Number count of Error type.
<server_cnt> Number of log of each server.
-1: Total number count.
X: Number count of server with X Id.
integer
Total number of log.
1 and onward 1 and onward
<day_cnt> definition:
Key -1 yyyy/mm/dd
Value <integer> <time_cnt>
<time_cnt> definition:
Key
Value
-1
<integer>
am
<integer>
pm
<integer>
<type_cnt> definition:
Key
Value
-1
<integer>
1
<integer>
2
<integer>
3
<integer>
<server_cnt> definition:
Key -1 X
Value <integer> <integer>
Example:
{ "date": { "-1": 2, "yyyy/mm/dd": { "am": 0, "-1": 2, "pm": 2 } }, "total": 2, "log_type": { "1": 2,
Description Total number count. Number count of log of yyyy/mm/dd. (Ex:1990/05/09)
Description Total number count. Number count of log in am. Number count of log in pm.
Description Total number count. Number count of Information type. Number count of Warning type. Number count of Error type.
Description Total number count. Number count of log with X server Id.
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
178
Synology Surveillance Station Web API
"3": 0, "2": 0, "-1": 2514 }, "server": { "X": 2, "-1": 2 } }
2.3.18.2 Clear method
Clear the selected logs.
Request Parameter
blClearAll level
dsId srcType
filterCamera cameraIds from
Value <boolean> <integer>
<integer> <integer>
<string> <string> <integer>
Optional.
Description
Clear all log or not.
If not specified, the default value will be true.
Optional. Type of log.
0: None
1: Information
2: Warning
3: Error
If not specified, the default value will be 0.
Optional. Id of DS.
If not specified, the default value will be -1.
Optional. Source type of log.
0: None
1: Local
2: Slaveds
4: Camera group
If not specified, the default value will be 0. Optional. Apply camera filter or not.
Optional. Id list of camera.
Optional.
Availability 1 and onward 1 and onward
1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
179
Synology Surveillance Station Web API
to
keyword keywordDsId timezoneOffset
<integer>
<string> <string> <integer>
From time of filter.
If not specified, the default value will be 0. Optional. To time of filter.
If not specified, the default value will be 0. Optional. Keyword. Optional. Keyword of DS id. Optional. Offset of time zone.
If not specified, the default value will be 0.
1 and onward
1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? from=0&version="1"&keyword=""&level=3&cameraIds=""&to=0&api="SYNO.SurveillanceStation.Log"&blCl earAll=false&srcType=0&filterCamera="false"&dsId=-1&method="Clear"&keywordDsId=""
Response
Key success
Value
Description
<boolean> Success or not.
Availability 1 and onward
Example:
{ "success": true
}
2.3.18.3 List method
Get the detail information of log.
Request Parameter
start
limit
Value <integer>
<integer>
Description Optional. Value of offset in SQL. If not specified, the default value will be 0.
Optional. Value of limit in SQL.
If not specified, the default value will be 0.
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
180
Synology Surveillance Station Web API
level
filterCamera cameraIds from to keyword keywordDsId time2String dsId srcType
all blIncludeRecCnt blIncludeAuInfo
<string>
<string> <string> <integer> <integer> <string> <string> <string> <integer> <integer>
<boolean> <string> <string>
Optional. Type of log.
0: None
1: Information
2: Warning
3: Error
If not specified, the default value will be "0". Optional. Apply camera filter or not. Optional. Id list of camera. Optional. From time of filter.
If not specified, the default value will be 0. Optional. To time of filter.
If not specified, the default value will be 0. Optional. Keyword. Optional. Keyword of DS id. Optional. Decide the format of time.
If not specified, the default value will be "yes". Optional. Id of DS.
If not specified, the default value will be -1. Optional. Source type of log.
0: None
1: Local
2: Slaveds
4: Camera group
If not specified, the default value will be 0. Optional. List all log or not. Optional. Include recent count or not. Optional. Include audio information or not.
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
181
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? all=false&from=0&version="1"&keyword=""&level=""&cameraIds=""&blIncludeRecCnt=""&method="List" &api="SYNO.SurveillanceStation.Log"&to=0&blIncludeAuInfo=""&limit=0&srcType=0&filterCamera="false" &dsId=-1&start=0&keywordDsId=""&time2String="no"
Response
Key log
recCntData success timestamp total
Value Array of
Description Information detail of log.
<log_detail>
<rec_cnt> Recent count of log information.
<boolean> Success or not.
<string>
Time stamp.
<integer> Total number of log.
Availability 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
<log_detail> definition: Key
desc dsId id time pm pm
Value <string> <integer> <string> <integer> <integer> <integer>
Description Description of log. Id of DS. Id of log. Time of log. Type of log. Update time of log.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
<rec_cnt> definition: Key
date
log_type
server
Value
Description
<day_cnt> Number of log of each day.
-1: Total number count.
yyyy/mm/dd: Number count of yyyy/mm/dd.
(Ex:1990/05/09)
<type_cnt> Number of log of each log type.
-1: Total number count.
1: Number count of Information type.
2: Number count of Warning type.
3: Number count of Error type.
<server_cnt> Number of log of each server.
-1: Total number count.
X: Number count of server with X Id.
Availability 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
182
Synology Surveillance Station Web API
total
integer
Total number of log.
<day_cnt> definition:
Key
Value
-1 yyyy/mm/dd
<integer> <time_cnt>
<time_cnt> definition:
Key
Value
-1
<integer>
am
<integer>
pm
<integer>
Description Total number count. Number count of log of yyyy/mm/dd. (Ex:1990/05/09)
Description Total number count. Number count of log in am. Number count of log in pm.
<type_cnt> definition:
Key
Value
-1
<integer>
1
<integer>
2
<integer>
3
<integer>
Description Total number count. Number count of Information type. Number count of Warning type. Number count of Error type.
<server_cnt> definition:
Key
Value
-1
<integer>
X
<integer>
Description Total number count. Number count of log with X server Id.
1 and onward
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Availability 1 and onward 1 and onward
Example:
{ "timestamp": "1423806343", "total": 2514, "log": [ { "update_time": 1423801204, "dsId": 0, "time": 1423801204, "type": 1, "id": "0_5932", "desc": "Recordings of camera [FE8172-001] reached size limit. [52] events was deleted." } ], "success": true, "recCntData": { "date": { "-1": 2, "yyyy/mm/dd": {
Copyright � Synology Inc. All rights Reserved.
183
Synology Surveillance Station Web API
"am": 0, "-1": 2, "pm": 2 } }, "total": 2, "log_type": { "1": 2, "3": 0, "2": 0, "-1": 2514 }, "server": { "X": 2, "-1": 2 } } }
2.3.18.4 GetSetting method
Get advanced setting of logs.
Request No parameter is required.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Log"&version="1"&method="GetSetting"
Response Key
data
success
Value Array of <log_advanced_setting>
<boolean>
Description The list of all log advanced setting.
Get setting successly or not.
Availability 1 and onward
1 and onward
<log_advanced_setting> definition:
Key
Value
SSLogType
<integer>
enable
<integer>
logGrp logTypeKey
<integer> <string>
Type of log.
Description
Enable of log. If the value is 1, the corrsponding
log type is recorded and vice versa.
Group of log.
Key of log.
Availability 1 and onward 1 and onward
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
184
Synology Surveillance Station Web API
Example:
{ "data":[ { "SSLogType":321912835, "enable":1, "logGrp":0, "logTypeKey":"msg_started" }, ... ,{ "SSLogType":321913037, "enable":1, "logGrp":2, "logTypeKey":"msg_alert_rotate_size_limit" } ], "success":true
}
2.3.18.5 SetSetting method
Set advanced setting of logs.
Request
Key data
Value Array of <log_advanced_setting>
Description Required. The list of log advanced setting.
Availability 1 and onward
<log_advanced_setting> definition:
Key
Value
SSLogType
<integer>
enable
<integer>
Required.
Description
Type of log.
Required.
Enable of log. If the value is 1, the corrsponding
log type is recorded and vice versa.
Availability 1 and onward
1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api=SYNO.SurveillanceStation.Log&method=SetSetting&version=1&data=[{"SSLogType":321912835,"enabl e":1},{"SSLogType":321912836,"enable":0}]
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
185
Synology Surveillance Station Web API
2.3.18.6 API Error Code
Code 400
Execution failed.
Description
Copyright � Synology Inc. All rights Reserved.
186
Synology Surveillance Station Web API
2.3.19 SYNO.SurveillanceStation.License
This API provides a method to acquire information of license in Surveillance Station and check if the number of license is sufficient or not.
API Name SYNO.SurveillanceStation.License
Load CheckQuota
Method Name
Version 1
Section 2.3.19.1 2.3.19.2
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward
2.3.19.1 Load method
Load license data.
Request Parameter
num_only
Value <integer>
Description Optional. Load the detail info of every License or not.
0: false
1: true
If not specified, the default value will be 0.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.License"&num_only=1&version="1"&method="Load"
Response
Key blCMSLosthost keyPostponedCnt key_max key_total key_used license_num localAcsCnt localCamCnt localIOCnt
Value <boolean> <integer> <integer> <integer> <integer> <integer> <integer> <integer> <integer>
Description Is CMS host lost. Number of postponed key. Maximum IP camera number in NAS. Number of total license. Number of used license. Number of license key. Number of AXIS control door. Number of Acting Camera. Number of IO module.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
187
Synology Surveillance Station Web API
localKeyTotal localSpeakerCnt localTransCnt slaveDsCnt
<integer> <integer> <integer> <integer>
Number of license in this NAS. Number of IP speaker. Number of transaction. Number of slave DS.
success
<boolean> Load successly or not.
Example:
{ "data" : { "blCMSLosthost" : true, "keyPostponedCnt" : 0, "key_max" : 12, "key_total" : 4, "key_used" : 0, "license_num" : 1, "localAcsCnt" : 0, "localCamCnt" : 0, "localIOCnt" : 0, "localKeyTotal" : 4, "localSpeakerCnt" : 0, "localTransCnt" : 0, "slaveDsCnt" : 0, "success" : true }, "httpd_restart" : false, "success" : true
}
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.19.2 CheckQuota method
Check the quota of license.
Request Parameter
camList
camServerId
Value Array of <CamInfo> <integer>
Description Optional. List of camera on the server.
Optional. Camera Server Id.
Availability 1 and onward
1 and onward
<CamInfo> definition:
Key
Value
ip
<string>
port
<integer>
Description IP of the camera.
Port of the camera.
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
188
Synology Surveillance Station Web API
vendor model
<string> <string>
Vendor of the camera. Model of the camera.
1 and onward 1 and onward
Example: GET /webapi/entry.cgi?camServerId=1&camList=[{"ip": "10.13.22.141", "model": "DCS-3110", "vendor": "DLink", "port": 80}]&api="SYNO.SurveillanceStation.License"&version="1"&method="CheckQuota"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.19.3 API Error Code
Code 400 407 412 413
Execution failed. CMS closed. Need to add license. Reach the maximum of platform.
Description
Copyright � Synology Inc. All rights Reserved.
189
Synology Surveillance Station Web API
2.3.20 SYNO.SurveillanceStation.Stream
This API provides methods to get Live View or Event video stream.
API Name SYNO.SurveillanceStation.Stream
Method Name EventStream
Version 1
Section 2.3.20.1
Availability Surveillance Station 7.0
Availability 1 and onward
2.3.20.1 EventStream method
Get HTTP video stream of the specific recording event
Request
Parameter writeHeader
Value <boolean>
Optional.
Description
Write Header or not.
If not specified, the default value will be true.
analyevent mountId
<boolean> <integer>
Optional. Is it an analytics event or not. If not specified, the default value will be false.
Optional. Mount Id. If not specified, the default value will be 0.
Availability 1 and onward
1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? version="1"&writeHeader=true&mountId=0&api="SYNO.SurveillanceStation.Stream"&analyevent=false&m ethod="EventStream"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.20.2 API Error Code
Code 400
Execution failed.
Description
Copyright � Synology Inc. All rights Reserved.
190
Synology Surveillance Station Web API
2.3.21 SYNO.SurveillanceStation.ActionRule
This API provides a method to acquire information of ActionRule in Surveillance Station. (Ex: Save/List/Delete, Enable/Disable, DeleteHistory/ListHistory/DownloadHistory)
API Name SYNO.SurveillanceStation.ActionRule
Method Name Save DownloadHistory SendData2Player DeleteHistory List Disable Enable ListHistory Delete
Version 1
Section 2.3.21.1 2.3.21.2 2.3.21.3 2.3.21.4 2.3.21.5 2.3.21.6 2.3.21.7 2.3.21.8 2.3.21.9
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.21.1 Save method
Save the action rule.
Request Parameter
id
Value <integer>
name
<string>
ruleType
<integer>
actType
<integer>
evtSrc
<integer>
Required.
Description
Unique rule id.
Required.
The name of the rule.
Required.
The rule type.
0: Triggered.
1: Scheduled.
Required.
The action type.
0: Interruptible.
1: Uninterruptible.
Conditional. When 'ruleType' is equal to 0,
The event source.
Availability 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
191
Synology Surveillance Station Web API
evtDsId evtDevId evtId
evtItem evtMinIntvl Actions actSchedule
0: Camera.
1: External event.
2: Door.
3: Access controller.
<integer>
Conditional. When (not 'evtSrc' is equal to 1),
The server id of event device.
<integer>
Conditional. When (not 'evtSrc' is equal to 1),
The device id of event device.
<integer>
Required.
When the event source is external event, this is
the event id. Otherwise,
0: None.
1: Camera enabled.
2: Camera disabled.
3. Camera connection lost.
4. Camera resumed.
5. Camera motion detected.
6. Camera alarm detected.
7. Camera tampering detected.
8. Camera audio detected.
9. Door access granted.
10. Door access denied.
11. Door alarm detected.
12. Door tampering detected.
13. Controller alarm logged.
14. Controller casing open.
<integer>
Conditional.
When the camera support per alarm detection,
can choose the alarm channel. -1: All alarm
channel.
<integer>
Conditional.
The minimum interval to triggered rule. It would
be needed when the event is detected for many
times in the short time.
Array of
Required
<Action> Object The specified Action to this rule.
<string>
Required.
The schedule of the rule to execute.
1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
192
Synology Surveillance Station Web API
<Action> Definition Parameter
Id actSrc actDsId actDevId actId
actTimes
actTimeUnit
Value <integer> <integer> <integer> <integer> <integer>
<integer>
<integer>
Required
Description
Availability 1 and onward
The action id Required.
1 and onward
The action source.
0: Camera.
1: External command.
4: Surveillance Web Client
Conditional.
1 and onward
The server id of action device. Conditional.
1 and onward
The device id of action device.
Required.
1 and onward
0: None.
1: Camera enabled.
2: Camera disabled.
3. Camera start recording.
4. Camera take snapshot.
5. Camera move to preset.
6. Camera patrol.
7. Camera auto pan.
8. Camera object tracking.
9. Camera audio output.
10. Camera digital output.
11. Surveillance Web Client audio output.
Conditional. When (('actId' is equal to 6 and
1 and onward
'ruleType' is equal to 1) or ('actId' is equal to 4 and
'ruleType' is equal to 0) or ('actId' is equal to 6 and
'ruleType' is equal to 0) or ('actId' is equal to 9 and
'ruleType' is equal to 0) or ('actId' is equal to 11
and 'ruleType' is equal to 0)), Value should be
between (1, 10)
The executed times of the action.
Required.
1 and onward
The time unit of the time duration.
-2: Forever.
Copyright � Synology Inc. All rights Reserved.
193
Synology Surveillance Station Web API
actTimeDur actItemId
actRetPos
extUrl userName password
<integer> <integer>
<integer>
<string> <string> <string>
0: None.
1: Second.
2: Minute.
3: Hour. Required.
1 and onward
The duration or interval of the executed action.
Conditional. When ('actId' is equal to 5 or 'actId' is 1 and onward
equal to 6 or 'actId' is equal to 9 or 'actId' is equal
to 10 or 'actId' is equal to 11)
It might be preset position, patrol id, digital
output channel, audio pattern id. Conditional. When ('actId' is equal to 5 or 'actId' is 1 and onward
equal to 6 or 'actId' is equal to 7 or 'actId' is equal
to 8)
The return position after doing action related to
PTZ.
-2: None.
-1: Home Conditional. When 'actSrc' is equal to 1,
1 and onward
The url command to be executed. Conditional. When 'actSrc' is equal to 1,
1 and onward
The user name of the device to execute external
command.
Conditional. When 'actSrc' is equal to 1,
1 and onward
The password of the device to execute external
command.
Example:
GET /webapi/entry.cgi? multiRuleId=1&name="1231"&ruleType=0&actType=0&evtSrc=1&evtDsId=0&evtDevId=1&evtId=1&evtItem=-1&evtMinIntvl=10&actions=%5B %7B"id"%3A1,"actSrc"%3A4,"actDsId"%3A0,"actDevId"%3A0,"actId"%3A11,"actItemId"% 3A15,"actTimes"%3A1,"actTimeUnit"%3A1,"actTimeDur"%3A"10","actRetPos"%3A1,"extUrl"%3A"","userName"%3A"","password"%3A""%7D %5D&actSchedule="11111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111"&api=SYNO.SurveillanceStation.ActionRule& method=Save&version=2
Copyright � Synology Inc. All rights Reserved.
194
Synology Surveillance Station Web API Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.21.2 DownloadHistory method
Download action rule histories.
Request No parameter is required.
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.ActionRule"&version="1"&method="DownloadHistory"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.21.3 SendData2Player method
This method is called by player to build the connection of Surveillance Web Client. It will output audio data through http multiple response. The audio data format is 2 channel, 8000Hz, Sample size 16, Sample type signed integer, byte order littleEndian, u-law.
Request No parameter is required.
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.ActionRule"&version="1"&method="SendData2Player"
Response Response is raw data
2.3.21.4 DeleteHistory method
Delete all histories of action rule.
Request
Copyright � Synology Inc. All rights Reserved.
195
Synology Surveillance Station Web API
Parameter idList
Value <string>
Description Required. The list of rule id to be queried concatenated by ",". -1 can delete all histories.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.ActionRule"&idList="1,2,3"&version="1"&method="DeleteHistory"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.21.5 List method
List action rules.
Request Parameter
Start
limit
Value <integer>
<integer>
Optional.
Description
The start to be shifted in the total result.
If not specified, the default value will be 0.
Optional.
Number of action rules to be returned. If not
specified, return rules to the end of rule list.
Availability 1 and onward
1 and onward
Example: GET /webapi/entry.cgi? start=0&api="SYNO.SurveillanceStation.ActionRule"&limit=0&version="1"&method="List"
Response Key
actRule
total
Value Array of
Description The list of action rule.
<ActionRule>
<integer> The total number of rules.
Availability 1 and onward
1 and onward
Example:
{ "actRule": [ { "ruleType": 0,
Copyright � Synology Inc. All rights Reserved.
196
Synology Surveillance Station Web API
"extUrl": "", "actDevName": "axis p3384", "evtDevName": "axis p3384", "actType": 0, "id": 82, "actId": 9, "actSchedule": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111", "actDevId": 63, "actTimes": 1, "evtId": 8, "actRetItem": {
"id": -1, "name": "" }, "status": 2, "userName": "", "actTimeDur": 1, "actDsId": 0, "evtSrc": 0, "password": "", "actTimeUnit": 1, "evtDsId": 0, "name": "p3384 audio detected p3384 audio output", "actItem": { "id": 20, "name": "syno1" }, "actSrc": 0, "evtDevId": 63, "evtItem": -1 } ], "total": 1 }
2.3.21.6 Disable method
Disable action rules.
Request Parameter
idList
Value <string>
Description Required. The list of rule id to be queried concatenated by ","
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
197
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.ActionRule"&idList="1,2"&version="1"&method="Disable"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.21.7 Enable method
Enable action rules.
Request Parameter
idList
Value <string>
Required.
Description
The list of rule id to be queried concatenated by
","
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.ActionRule"&idList="1,2"&version="1"&method="Enable"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.21.8 ListHistory method
List all histories of action rule.
Request Parameter
start
limit
Value <integer>
<integer>
Required.
Description
Availability 1 and onward
The start to be shifted in the total result.
If not specified, the default value will be 0.
Required.
Number of histories to be returned. If not
specified, return histories to the end of history list.
Example:
Copyright � Synology Inc. All rights Reserved.
198
Synology Surveillance Station Web API GET /webapi/entry.cgi? start=0&api="SYNO.SurveillanceStation.ActionRule"&limit=100&version="1"&method="ListHistory"
Response
Key history
total
Value Array of <RuleHistory> <integer>
Description The rule history list.
The number of total rule histories.
Availability 1 and onward
1 and onward
<RuleHistory> definition:
Key
Value
id
<integer>
level
<integer>
time
<integer>
ruleName
<string>
ruleType
<integer>
actResult
<integer>
Description The unique id of history 1: info, 2: warning, 3: error timestamp of the history. The name of triggered rule. The type of triggered rule. 0: Triggered. 1: Scheduled. The action result of triggered rule. 0: Finished. 2: Interrupted. 3: Failed. 4: Ignored.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Example:
{ "total": 100, "history": [ { "ruleType": 0, "level": 1, "ruleName": "Cam motion detected triggered digital output", "time": 1330639700, "id": 1, "actResult": 1 }, { "ruleType": 0, "level": 1, "ruleName": "Cam digital input triggered audio output", "time": 1330639750,
Copyright � Synology Inc. All rights Reserved.
199
Synology Surveillance Station Web API
"id": 2, "actResult": 2 }, { "ruleType": 1, "level": 1, "ruleName": "Web client audio output", "time": 1330639810, "id": 3, "actResult": 2 } ] }
2.3.21.9 Delete method
Delete action rules.
Request Parameter
idList
Value <string>
Required.
Description
The list of rule id to be queried concatenated by
","
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.ActionRule"&idList="1,2"&version="1"&method="Delete"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.21.10 API Error Code
Code 400 401
Execution failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
200
Synology Surveillance Station Web API
2.3.22 SYNO.SurveillanceStation.Emap
This API provides methods to get information about user-defined E-Maps.
Name SYNO.SurveillanceStation.Emap
Method Name List Load
Version 1
Section 2.3.22.1 2.3.22.2
Availability Surveillance Station 8.0
Availability 1 and onward 1 and onward
2.3.22.1 List method
Get the list of all E-Maps.
Request
Parameter start
Value <integer>
limit
<integer>
emapIds
<string>
includeImage <boolean> includeItems <boolean>
Description
Optional. Start searching after the specified number data. If not specified, the offset will be 0.
Optional. Number of emaps to be returned. If not specified, return E-Maps to the end of E-Map list.
Optional. The list of <EMAP_ID> to be queried concatenated by ",". If not specified, this parameter will be ignored and get all
emaps.
Optional. Include complete image or not. If not specified, the default value is false.
Optional. Include all item on emap or not. If not specified, the default value is false.
Availability 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
Example: List 2 E-Maps starting from offset 10, include Image and Items.
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.Emap&version=1&method=List&start=10&limit=2&includeImage=true&inclu deItems=true
Response
Key total success emap
Value <integer> <boolean> Array of <E-Map Object>
Description The number of total E-maps. The method result. The list of queried E-Maps.
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
201
Synology Surveillance Station Web API
<E-Map Object> definition:
Key id name filename filesize imageWidth imageHeight imageData
Value <EMAP_ID> <string> <string> <integer> <integer> <integer> <string>
item
Array of <E-Map Item
Object>
hideItemName <boolean>
<E-Map Item Object> definition:
Key id name type
Value <Item_ID> <string> 0 ... 6
dsId
0, <DS_ID>
uniqueId
<integer>
itemName
<string>
x y iconCenterX iconCenterY direction
<integer> <integer> <integer> <integer> 0 ... 7
Description Unique E-Map ID. E-Map name. Name of image file. Size of image file. Image width of the E-Map image. Image height of the E-Map image. Image data in base64 format. The list of items marked on the E-Map.
Does item name hide or not
Availability 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
1 and onward
Description
Availability
Item ID.
1 and onward
Item name.
1 and onward
Type of the E-Map item.
1 and onward
0: Camera
1: E-Map
2: Door
3: IOModule
4: Transactions Device
5: IP Speaker
6: IP Speaker Group
Unique DS ID which this E-Map item belongs to. 1 and onward
0: On local host.
<DS_ID>: ID of a DS.
Unique ID of this item. When this item is a
1 and onward
camera, it means <CAMERA_ID>. When this item
is an E-Map, it means <EMAP_ID>. And so on.
Name of this item. When this item is a camera, it 1 and onward
describes camera name. When this item is an E-
Map, it describes E-Map name.
X-coordinate of the E-Map item assuming that 1 and onward
top-left of the E-Map is the origin.
Y-coordinate of the E-Map item assuming that 1 and onward
top-left of the E-Map is the origin.
X-coordinate of the E-Map item icon certer
1 and onward
assuming that top-left of the E-Map is the origin.
Y-coordinate of the E-Map item icon certer
1 and onward
assuming that top-left of the E-Map is the origin.
Direction of the camera. If the type of this item is 1 and onward
E-Map, direction will be always 0.
0: Westward
1: Northwestward
2: Northward
3: Northeastward
4: Eastward
5: Southeastward
Copyright � Synology Inc. All rights Reserved.
202
Synology Surveillance Station Web API
blPlayback camIdOnRec camVideoType
deviceType
portIdx status
<boolean> 0, <CAMERA_ID> 1 ... 8
1, 2, 4, 8, 16, 32, 64, 128, 256, 512
<integer> 1 ... 18
6: Southward
7: Southwestward
This item can be played or not.
1 and onward
ID of the camera or the paired camera of item on 1 and onward
recording server.
0: On local host.
<CAMERA_ID>: Cam ID on recording server.
Video type of the camera or the paired camera of 1 and onward
item.
1: MJPEG
2: MPEG4
3: H264
4: EMAP
5: MXPEG
6: H265
7: H264+
8: H265+
Type of Camera or E-Map item. 1: Camera
1 and onward
2: Video server
4: PTZ Camera
8: Fisheye Camera
16: IO Module
32: Door controller
64: Multi lens Camera
128: Intercom
256: Transactions Device
512: IP Speaker
Port index of Item.
Will be -1, If the item dont have any port.
Indicating the Item status � 1: Normal
� 2: Deleted � 3: Disconnected
� 4: Unavailable
� 5: Ready � 6: Inaccessible
� 7: Disabled � 8: Unrecognized
� 9: Setting
� 10: Server disconnected � 11: Migrating
� 12: Others
� 13: Storage removed
� 14: Stopping
� 15: Connect hist failed � 16: Unauthorized
� 17: RTSP error
� 18: No video
Example:
Copyright � Synology Inc. All rights Reserved.
203
Synology Surveillance Station Web API
{ "data": { "emap": [ { "filename": "20180622160356.jpg", "filesize": 879394, "hideItemName": false, "id": 1, "imageData": "...", "imgHeight": 768, "imgWidth": 1024, "item": [ { "blPlayback": true, "camIdOnRec": 0, "camVideoType": 3, "deviceType": 128, "direction": 0, "dsId": 0, "iconCenterX": 128, "iconCenterY": 84, "id": 35, "name": "AXIS - A8105-E", "portIdx": -1, "status": 7, "txtPos": 0, "type": 0, "uniqueId": 35, "x": 66, "y": 64 }, { "blPlayback": true, "camIdOnRec": 0, "camVideoType": 3, "deviceType": 8, "direction": 0, "dsId": 0, "iconCenterX": 176, "iconCenterY": 170, "id": 36, "name": "AXIS - Generic_AXIS", "portIdx": -1, "status": 7, "txtPos": 0, "type": 0, "uniqueId": 36, "x": 98, "y": 150 } ],
Copyright � Synology Inc. All rights Reserved.
204
Synology Surveillance Station Web API
"itemTotal": 2, "name": "01", "privilege": 3, "smallItemSize": false }, { "filename": "20180628142420.jpg", "filesize": 845941, "hideItemName": false, "id": 2, "imageData": "...", "imgHeight": 768, "imgWidth": 1024, "item": [
{ "direction": 0, "dsId": 0, "iconCenterX": 292, "iconCenterY": 252, "id": 1, "name": "01", "portIdx": -1, "txtPos": 0, "type": 1, "uniqueId": 1, "x": 270, "y": 232
} ], "itemTotal": 1, "name": "02", "privilege": 3, "smallItemSize": false } ], "success": true, "total": 2 }, "success": true }
2.3.22.2 Load method
Get specific E-Map settings.
Request Parameter
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
205
Synology Surveillance Station Web API
emapIds includeImage
<string> <boolean>
The list of <EMAP_ID> to be queried concatenated by ",".
Optional. Include complete image or not. If not specified, the default value is false.
1 and onward 1 and onward
Example: Get E-Map information with ID 1 and 2. GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.Emap&version=1&method=Load&emapIds="1,2"&includeImage=true
Response
Key total success emap
Value <integer> <boolean> Array of <E-Map Object>
Description The number of total E-maps. The method result. The list of queried E-Maps.
Availability 1 and onward 1 and onward 1 and onward
<E-Map Object> definition:
Key id name filename filesize imageWidth imageHeight imageData
Value <EMAP_ID> <string> <string> <integer> <integer> <integer> <string>
item
Array of <E-Map Item
Object>
hideItemName <boolean>
<E-Map Item Object> definition:
Key id name type
Value <Item_ID> <string> 0 ... 6
dsId uniqueId itemName
0, <DS_ID> <integer> <string>
Description Unique E-Map ID. E-Map name. Name of image file. Size of image file. Image width of the E-Map image. Image height of the E-Map image. Image data in base64 format. The list of items marked on the E-Map.
Does item name hide or not
Availability 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
1 and onward
Description
Availability
Item ID.
1 and onward
Item name.
1 and onward
Type of the E-Map item.
1 and onward
0: Camera
1: E-Map
2: Door
3: IOModule
4: Transactions Device
5: IP Speaker
6: IP Speaker Group
Unique DS ID which this E-Map item belongs to. 1 and onward
0: On local host.
<DS_ID>: ID of a DS.
Unique ID of this item. When this item is a
1 and onward
camera, it means <CAMERA_ID>. When this item
is an E-Map, it means <EMAP_ID>. And so on.
Name of this item. When this item is a camera, it 1 and onward
describes camera name. When this item is an E-
Map, it describes E-Map name.
Copyright � Synology Inc. All rights Reserved.
206
Synology Surveillance Station Web API
x y iconCenterX iconCenterY direction
blPlayback camIdOnRec camVideoType
deviceType
portIdx status
<integer> <integer> <integer> <integer> 0 ... 7
<boolean> 0, <CAMERA_ID> 1 ... 8
1, 2, 4, 8, 16, 32, 64, 128, 256, 512
<integer> 1 ... 18
X-coordinate of the E-Map item assuming that 1 and onward
top-left of the E-Map is the origin.
Y-coordinate of the E-Map item assuming that 1 and onward
top-left of the E-Map is the origin.
X-coordinate of the E-Map item icon certer
1 and onward
assuming that top-left of the E-Map is the origin.
Y-coordinate of the E-Map item icon certer
1 and onward
assuming that top-left of the E-Map is the origin.
Direction of the camera. If the type of this item is 1 and onward
E-Map, direction will be always 0. 0: Westward
1: Northwestward
2: Northward
3: Northeastward
4: Eastward
5: Southeastward
6: Southward
7: Southwestward
This item can be played or not.
1 and onward
ID of the camera or the paired camera of item on 1 and onward
recording server.
0: On local host.
<CAMERA_ID>: Cam ID on recording server.
Video type of the camera or the paired camera of 1 and onward
item.
1: MJPEG
2: MPEG4
3: H264 4: EMAP
5: MXPEG
6: H265
7: H264+
8: H265+
Type of Camera or E-Map item.
1 and onward
1: Camera
2: Video server
4: PTZ Camera
8: Fisheye Camera
16: IO Module
32: Door controller
64: Multi lens Camera
128: Intercom
256: Transactions Device
512: IP Speaker
Port index of Item.
Will be -1, If the item dont have any port.
Indicating the Item status � 1: Normal � 2: Deleted
� 3: Disconnected
� 4: Unavailable
Copyright � Synology Inc. All rights Reserved.
207
Synology Surveillance Station Web API
� � � � � � � � � � � � � �
5: Ready 6: Inaccessible 7: Disabled 8: Unrecognized 9: Setting 10: Server disconnected 11: Migrating 12: Others 13: Storage removed 14: Stopping 15: Connect hist failed 16: Unauthorized 17: RTSP error 18: No video
Example:
{ "data": { "emap": [ { "filename": "20180622160356.jpg", "filesize": 879394, "hideItemName": false, "id": 1, "imageData": "...", "imgHeight": 768, "imgWidth": 1024, "item": [ { "blPlayback": true, "camIdOnRec": 0, "camVideoType": 3, "deviceType": 128, "direction": 0, "dsId": 0, "iconCenterX": 128, "iconCenterY": 84, "id": 35, "name": "AXIS - A8105-E", "portIdx": -1, "status": 7, "txtPos": 0, "type": 0, "uniqueId": 35, "x": 66, "y": 64 }, { "blPlayback": true, "camIdOnRec": 0, "camVideoType": 3,
Copyright � Synology Inc. All rights Reserved.
208
Synology Surveillance Station Web API
"deviceType": 8, "direction": 0, "dsId": 0, "iconCenterX": 176, "iconCenterY": 170, "id": 36, "name": "AXIS - Generic_AXIS", "portIdx": -1, "status": 7, "txtPos": 0, "type": 0, "uniqueId": 36, "x": 98, "y": 150 } ], "itemTotal": 2, "name": "01", "privilege": 3, "smallItemSize": false }, { "filename": "20180628142420.jpg", "filesize": 845941, "hideItemName": false, "id": 2, "imageData": "...", "imgHeight": 768, "imgWidth": 1024, "item": [ { "direction": 0, "dsId": 0, "iconCenterX": 292, "iconCenterY": 252, "id": 1, "name": "01", "portIdx": -1, "txtPos": 0, "type": 1, "uniqueId": 1, "x": 270, "y": 232 } ], "itemTotal": 1, "name": "02", "privilege": 3, "smallItemSize": false } ],
Copyright � Synology Inc. All rights Reserved.
209
Synology Surveillance Station Web API
"success": true, "total": 2 }, "success": true }
2.3.22.3 API Error Code
Code 400 401
Execution failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
210
Synology Surveillance Station Web API
2.3.23 SYNO.SurveillanceStation.Emap.Image
This API provides methods to get image about user-defined E-Maps.
Name SYNO.SurveillanceStation.Emap.Image
Method Name Load
Version 1
Section 2.3.23.1
2.3.23.1 Load method
Availability Surveillance Station 8.0
Availability 1 and onward
Get the image of the selected E-Map in its original format.
Request
Parameter filename
Value <string>
Description Image file name. Get from 2.3.22.1 or 2.3.22.2
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.Emap.Image&version=1&method=Load&filename="20180628142420"
Response The binary image data. Its MIME type depends on E-map's original image format.
Example:
HTTP/1.0 200 OK Content-Type: image/jpeg
<Binary JPEG image data>
2.3.23.2 API Error Code
Code 400 401
Execution failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
211
Synology Surveillance Station Web API
2.3.24 SYNO.SurveillanceStation.Notification
This API provides a method to get authorized token of DS, and user can register push service by this token.
Name SYNO.SurveillanceStation.Notification SYNO.SurveillanceStation.Notification
Method Name GetRegisterToken SetCustomizedMessage GetCustomizedMessage
SetVariables GetVariables SetAdvSetting GetAdvSetting
Version 1 2
Section 2.3.24.1 2.3.24.2 2.3.24.3 2.3.24.4 2.3.24.5 2.3.24.6 2.3.24.5
Availability Surveillance Station 6.3 Surveillance Station 7.0
Availability 1 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
2.3.24.1 GetRegisterToken method
Get the authorized token of DS.
Request No parameters.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification"&version="1"&method="GetRegisterToken"
Response
Key oauth_id token
Value <integer> <string>
Description id Authorized token
Availability 1 and onward 1 and onward
Example:
{ "token":
"MlFaYk9lK3RvSlU9fFBJaGVWLzhyVUhyRVZCMnRjelNvWUQrTm4rbU9malEwY0JlQ0tleHJHVFFGS2lheWR6Q StOdGJjVGtYc0t4cms=",
"oauth_id": 836782578 }
Copyright � Synology Inc. All rights Reserved.
212
Synology Surveillance Station Web API
2.3.24.2 SetCustomizedMessage method
Set message and subject for specified event
Request
Parameter eventTypes subject content
Value <string> <string> <string>
Description The specified event Subject of the message Optional. Content of the message
Availability 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? version="2"&content="XXX"&api="SYNO.SurveillanceStation.Notification"&eventTypes="19"&method="Set CustomizedMessage"&subject="Title"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.24.3 GetCustomizedMessage method
Get message and subject from specified event
Request
Parameter eventTypes
Value <integer>
Description An integer indicate the type of event
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? eventType=19&api="SYNO.SurveillanceStation.Notification"&version="2"&method="GetCustomizedMessa ge"
Response Key
defaultMessage
Message
Value
<CustomizedMsg Object>
<CustomizedMsg Object>
Description System default message
User defined message
Availability 4 and onward
4 and onward
<CustomizedMsg Object> definition:
Key
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
213
Synology Surveillance Station Web API
content subject
<string> <string>
Content of the message Subject of the message
4 and onward 4 and onward
Example:
{ "defaultMessage": { "content": "Dear user,\n\n%DEVICE_TYPE% %DEVICE_NAME% on %SS_HOSTNAME% has been
successfully added to Surveillance Station.\n\nSincerely,\n%SS_PKG_NAME%", "subject": "%DEVICE_TYPE% %DEVICE_NAME% on %SS_HOSTNAME% has been added"
}, "message": {
"content": "Body", "subject": "Title" } }
2.3.24.4 SetVariables method
Set the sender name of notifications
Request
Parameter ss_pkg_name
Value <string>
Description The sender name of each notification
Availability 4 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification"&version="1"&ss_pkg_name="Synology in test"&method="SetVariables"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.24.5 GetVariables method
Return the sender name of notifications
Request No parameters.
Copyright � Synology Inc. All rights Reserved.
214
Synology Surveillance Station Web API
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification"&version="1"&method="GetVariables"
Response
key ss_pkg_name
Value <string>
Description The sender name of each notification
Example:
{ "ss_pkg_name": "Synology Surveillance Station"
}
Availability 4 and onward
2.3.24.6 SetAdvSetting method
Set advanced notification settings
Request
Parameter
Value
blSyncDSMNotify <boolean>
blCompactMsg <boolean>
Description If the settings is the same as DSM. If identical messages will be compressed
Availability 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api=SYNO.SurveillanceStation.Notification&method=SetAdvSetting&version=3&blSyncDSMNotify=true&blC ompactMsg=false
Response
Parameter blCopyMail blCopyPush blCopySms
Value <boolean> <boolean> <boolean>
Description If the mail settings successfully sync to DSM. If the push settings successfully sync to DSM. If the SMS settings successfully sync to DSM.
Availability 4 and onward 4 and onward 4 and onward
Example: {
"blCopyMail":false,"blCopyPush":false,"blCopySms":false }
2.3.24.7 GetAdvSetting method
Get notification advanced settings.
Copyright � Synology Inc. All rights Reserved.
215
Synology Surveillance Station Web API
Request No parameter required.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api=SYNO.SurveillanceStation.Notification&method=GetAdvSetting&version=3
Response
Parameter
Value
blCompactMsg <boolean>
blDSMJoinCMS <boolean>
blFirstOpen
<boolean>
blSyncDSMNotify <boolean>
Description If identical messages will be compressed If DSM joined in CMS environment If the api is called at the first open of the app If the settings is the same as DSM.
Availability 4 and onward 4 and onward 4 and onward 4 and onward
Example:
{ "blCompactMsg":false,"blDSMJoinCMS":false,"blFirstOpen":false,"blSyncDSMNotify":true
}
2.3.24.8 API Error Code
Code 400
Execution failed.
Description
Copyright � Synology Inc. All rights Reserved.
216
Synology Surveillance Station Web API
2.3.25 SYNO.SurveillanceStation.Notification.SMS
Notification.SMS doc
Name SYNO.SurveillanceStation.Notification.SMS
Method Name SendTestMessage
GetSetting SetSetting
Version 1
Section 2.3.25.1 2.3.25.2 2.3.25.3
Availability Surveillance Station 6.3
Availability 4 and onward 4 and onward 4 and onward
2.3.25.1 SendTestMessage method
Send test message to the primary and secondary(if exists) phone number
Request
Parameter
Value
Description
smsEnable
<boolean> Optional.
Is SMS enabled?
smsMethod
0,
Optional.
1,
The method of SMS service
2
� 0: NONE
� 1: The same as DSM � 2: Customized setting below
smsProvider
<string> Optional.
The provider of SMS service
userName
<string> Optional.
User name of the SMS service
password
<string> Optional.
User password of the SMS service
confirmPassword
<string> Optional. The confirming password
primaryPhoneCode
<string> Optional. Phone code of the primary phone
primaryPhonePrefix
<string> Optional.
Prefix of the primary phone
primaryPhoneNumber <string> Optional.
Phone number of the primary phone
secondaryPhoneCode <string> Optional.
Phone code of the secondary phone
secondaryPhonePrefix <string> Optional. Prefix of the secondary phone
secondaryPhoneNumber <string> Optional. Phone number of the secondary phone
Availability 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
217
Synology Surveillance Station Web API
setMinMessageInterval minMessageInterval hasSysSms apiId
<boolean> Optional. Is minimum message interval set
<integer> Optional. Minimum message interval
<boolean> Optional. Is Syno-SMS enabled
<string> Optional. ID of API
4 and onward 4 and onward 4 and onward 4 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? primaryPhoneCode="886"&smsEnable=true&primaryPhonePrefix="+"&version="1"&smsProvider="clickate ll"&apiId="XD"&primaryPhoneNumber="1234567"&api="SYNO.SurveillanceStation.Notification.SMS"&min MessageInterval=1&password="%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC %83%EF%BC%83%EF%BC%83"&confirmPassword="%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF %BC%83%EF%BC%83%EF%BC%83%EF%BC %83"&secondaryPhoneNumber=""&userName="SynoTest"&smsMethod=2&hasSysSms=false&setMinMess ageInterval=false&secondaryPhonePrefix=""&secondaryPhoneCode=""&method="SendTestMessage"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.25.2 GetSetting method
Get setting of notification by SMS
Request No parameters.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.SMS"&version="1"&method="GetSetting"
Response Key
smsEnable
smsMethod
Value
Description
<boolean> Optional.
Is SMS enabled?
0,
Optional.
1,
The method of SMS service
2
� 0: NONE
� 1: The same as DSM
� 2: Customized setting below
Availability 4 and onward
4 and onward
Copyright � Synology Inc. All rights Reserved.
218
Synology Surveillance Station Web API
smsProvider
<string> Optional.
The provider of SMS service
userName
<string> Optional.
User name of the SMS service
password
<string> Optional.
User password of the SMS service
confirmPassword
<string> Optional.
The confirming password
primaryPhoneCode
<string> Optional.
Phone code of the primary phone
primaryPhonePrefix
<string> Optional.
Prefix of the primary phone
primaryPhoneNumber <string> Optional.
Phone number of the primary phone
secondaryPhoneCode <string> Optional.
Phone code of the secondary phone
secondaryPhonePrefix <string> Optional.
Prefix of the secondary phone
secondaryPhoneNumber <string> Optional.
Phone number of the secondary phone
setMinMessageInterval <boolean> Optional.
Is minimum message interval set
minMessageInterval
<integer> Optional.
Minimum message interval
hasSysSms
<boolean> Optional.
Is Syno-SMS enabled
Example:
{ "primaryPhoneCode": "", "smsEnable": false, "primaryPhonePrefix": "", "smsMethod": 0, "primaryPhoneNumber": "", "minMessageInterval": 1, "password": "", "confirmPassword": "", "userName": "", "secondaryPhoneNumber": "", "smsProvider": "clickatell", "hasSysSms": false, "setMinMessageInterval": false, "secondaryPhonePrefix": "", "secondaryPhoneCode": ""
}
4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
2.3.25.3 SetSetting method
Copyright � Synology Inc. All rights Reserved.
219
Synology Surveillance Station Web API Set SMS service settings
Request
Parameter
Value
Description
smsEnable
<boolean> Optional. Is SMS enabled?
smsMethod smsProvider
0, 1, 2
<string>
Optional. The method of SMS service � 0: NONE � 1: The same as DSM � 2: Customized setting below
Optional. The provider of SMS service
userName
<string> Optional. User name of the SMS service
password confirmPassword primaryPhoneCode primaryPhonePrefix
<string> <string> <string> <string>
Optional. User password of the SMS service
Optional. The confirming password
Optional. Phone code of the primary phone
Optional. Prefix of the primary phone
primaryPhoneNumber <string> Optional. Phone number of the primary phone
secondaryPhoneCode <string> Optional.
Phone code of the secondary phone
secondaryPhonePrefix <string> Optional.
Prefix of the secondary phone
secondaryPhoneNumber <string> Optional.
Phone number of the secondary phone
setMinMessageInterval <boolean> Optional.
Is minimum message interval set
minMessageInterval
<integer> Optional.
Minimum message interval
hasSysSms
<boolean> Optional. Is Syno-SMS enabled
apiId
<string> Optional. ID of API
Availability 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? primaryPhoneCode="886"&smsEnable=true&primaryPhonePrefix="+"&version="1"&smsProvider="clickate ll"&apiId="XD"&primaryPhoneNumber="1234567"&api="SYNO.SurveillanceStation.Notification.SMS"&min MessageInterval=1&password="%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC %83%EF%BC%83%EF%BC%83"&confirmPassword="%EF%BC%83%EF%BC%83%EF%BC%83%EF%BC%83%EF %BC%83%EF%BC%83%EF%BC%83%EF%BC %83"&secondaryPhoneNumber=""&userName="SynoTest"&smsMethod=2&hasSysSms=false&setMinMess ageInterval=false&secondaryPhonePrefix=""&secondaryPhoneCode=""&method="SetSetting"
Copyright � Synology Inc. All rights Reserved.
220
Synology Surveillance Station Web API
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.25.4 API Error Code
Code 400 401 402 403 404
Execution failed. Parameter invalid. Camera disabled. Insufficient license. Codec acitvation failed
Description
Copyright � Synology Inc. All rights Reserved.
221
Synology Surveillance Station Web API
2.3.26 SYNO.SurveillanceStation.Notification.PushService
This API provides basic operation for push service
Name SYNO.SurveillanceStation.Notification.SMS
Method Name SendTestMessage
GetSetting SetSetting SendVerificationMail ListMobileDevice UnpairMobileDevice
Version 1
Section 2.3.26.1 2.3.26.2 2.3.26.3 2.3.26.4 2.3.26.5 2.3.26.6
Availability Surveillance Station 6.3
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
2.3.26.1 SendTestMessage method
Send test message to the primary and secondary(if exists) phone number
Request Parameter
attachSnapshot enableInterval
mobileEnable msgInterval primaryEmail secondaryEmail synoMailEnable
mail_recipient
Value
Description
Availability
<boolean> Does the push service provide snapshot
4 and onward
<boolean> Optional.
4 and onward
Is the the service of minimum interval between
messages enabled
<boolean> Optional.
4 and onward
Is mobile device the destination of the push service
<integer> Optional.
4 and onward
The minimum interval of messages in minute
<string> Optional.
4 and onward
Primary email
<string> Optional.
4 and onward
Secondary email
<boolean> Optional.
4 and onward
Does the push service provides notification to Syno-
mails
<string> Optional.
4 and onward
In the format "primaryMail;secondaryMail"
Example:
http://192.168.1.1:5000/webapi/entry.cgi? attachSnapshot=true&primaryEmail="b95056@csie.ntu.edu.tw"&enableInterval=false&mail_recipient="b9 5056@csie.ntu.edu.tw"&api="SYNO.SurveillanceStation.Notification.PushService"&msgInterval=1&synoMa
Copyright � Synology Inc. All rights Reserved.
222
Synology Surveillance Station Web API ilEnable=true&secondaryEmail=""&version="1"&mobileEnable=false&method="SendTestMessage"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.26.2 GetSetting method
Get customized settings
Request No parameters.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.PushService"&version="1"&method="GetSetting"
Response Key
attachSnapshot enableInterval
mobileEnable msgInterval primaryEmail secondaryEmail synoMailEnable
unverifiedMails
Value
Description
Availability
<boolean> Does the push service provide snapshot
4 and onward
<boolean> Optional.
4 and onward
Is the the service of minimum interval between
messages enabled
<boolean> Optional.
4 and onward
Is mobile device the destination of the push service
<integer> Optional.
4 and onward
The minimum interval of messages in minute
<string> Optional.
4 and onward
Primary email
<string> Optional.
4 and onward
Secondary email
<boolean> Optional.
4 and onward
Does the push service provides notification to Syno-
mails
<string> Optional.
4 and onward
List of unverified emails
Example:
{ "attachSnapshot": true, "primaryEmail": "b95056@csie.ntu.edu.tw", "synoMailEnable": true, "enableInterval": false, "secondaryEmail": "",
Copyright � Synology Inc. All rights Reserved.
223
Synology Surveillance Station Web API
"msgInterval": 1, "unverifiedMails": "", "mobileEnable": false }
2.3.26.3 SetSetting method
Set customized settings
Request Parameter
attachSnapshot enableInterval
mobileEnable msgInterval primaryEmail secondaryEmail synoMailEnable
mail_recipient
Value
Description
Availability
<boolean> Does the push service provide snapshot
4 and onward
<boolean> Optional.
4 and onward
Is the the service of minimum interval between
messages enabled
<boolean> Optional.
4 and onward
Is mobile device the destination of the push service
<integer> Optional.
4 and onward
The minimum interval of messages in minute
<string> Optional.
4 and onward
Primary email
<string> Optional.
4 and onward
Secondary email
<boolean> Optional.
4 and onward
Does the push service provides notification to Syno-
mails
<string> Optional.
4 and onward
In the format "primaryMail;secondaryMail"
Example:
http://192.168.1.1:5000/webapi/entry.cgi? attachSnapshot=true&primaryEmail="b95056@csie.ntu.edu.tw"&enableInterval=false&mail_recipient="b9 5056@csie.ntu.edu.tw"&api="SYNO.SurveillanceStation.Notification.PushService"&msgInterval=1&synoMa ilEnable=true&secondaryEmail=""&version="1"&mobileEnable=false&method="SetSetting"
Response
Key unverifiedMails
Value
Description
<boolean> List of unverified emails
Availability 4 and onward
Example:
{ "unverifiedMails": ""
}
Copyright � Synology Inc. All rights Reserved.
224
Synology Surveillance Station Web API
2.3.26.4 SendVerificationMail method
Send verification mail to all recipient
Request
Parameter mailAccounts
Value
Description
<string> The mail account that is to be verified
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.PushService"&mailAccounts="syno.rbx@gmail.com"&version=" 1"&method="SendVerificationMail"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.26.5 ListMobileDevice method
List the mobile devices that are paired
Request No parameters.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.PushService"&version="1"&method="ListMobileDevice"
Response
Key list
Value
Description
Array of <Paired object> List of paired device
Availability 4 and onward
<Paired object> definition:
Key
Value
appVersion
<string>
deviceName
<string>
firmwareVersion <string>
targetId
<integer>
Description Version of the application installed on the device Name of the device Firmware version of the device The id of the target device
Availability 4 and onward 4 and onward 4 and onward 4 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
225
Synology Surveillance Station Web API
{ "list": [ { "deviceName": "ASUS_T00F", "targetId": 4296562, "appVersion": "2.5-213", "firmwareVersion": "Android 4.4.2" } ]
}
2.3.26.6 UnpairMobileDevice method
Unpair the paired mobile device
Request
Parameter targetIds
Value <string>
Description
Availability
The list of paired id of the devices that are to be unpaired 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? attachSnapshot=true&primaryEmail="b95056@csie.ntu.edu.tw"&enableInterval=false&mail_recipient="b9 5056@csie.ntu.edu.tw"&api="SYNO.SurveillanceStation.Notification.PushService"&msgInterval=1&synoMa ilEnable=true&secondaryEmail=""&version="1"&mobileEnable=false&method="SetSetting"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.26.7 API Error Code
Code 400 401 402 403 404
Execution failed. Parameter invalid. Camera disabled. Insufficient license. Codec acitvation failed
Description
Copyright � Synology Inc. All rights Reserved.
226
Synology Surveillance Station Web API
2.3.27 SYNO.SurveillanceStation.Notification.Schedule
This API provides a method to get authorized token of DS, and user can register push service by this token.
Name SYNO.SurveillanceStation.Notification.Schedule
Method Name GetAccessControlControllerSchedule
GetCameraAlarmSchedule GetSystemDependentSchedule
SetBatchSchedule GetAccessControlDoorSchedule
GetCameraSchedule SetSystemDependentSchedule
SetAccessControlSchedule SetCameraSchedule
Version 1
Section 2.3.27.1 2.3.27.2 2.3.27.3 2.3.27.4 2.3.27.5 2.3.27.6 2.3.27.7 2.3.27.8 2.3.27.9
Availability Surveillance Station 6.3
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
2.3.27.1 GetAccessControlControllerSchedule method
Get schedule of access control controller
Request
Parameter doorId
Value <integer>
Description Id of the specified door
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? doorId=1&api="SYNO.SurveillanceStation.Notification.Schedule"&version="1"&method="GetAccessControl ControllerSchedule"
Response
Key list
Value
Array of <EventSch Object>
Description List of event scheduling
Availability 4 and onward
<EventSch Object> definition:
Key
Value
eventType
0 ... 46
Description
Type of event � 0 : Testing email � 1 : Camera added � 2 : Camera deleted � 3 : Camera connection lost � 4 : Camera connection resumed
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
227
Synology Surveillance Station Web API
schedule
Array of <integer>
� 5 : Motion detected � 6 : SS_ALARM_TRIGGERRED � 7 : SS_MD_ALARM_TRIG � 8 : Audio detected � 9 : Tampering detected � 10: Rotation limit reached � 11: VisualStation added � 12: VisualStation deleted � 13: VisualStation connection lost � 14: VisualStation connection resumed � 15: SS_SLAVE_DS_ADDED � 16: SS_SLAVE_DS_DELETED � 17: SS_SLAVE_DS_CONN_LOST � 18: SS_SLAVE_DS_CONN_RESUMED � 19: New device added � 20: Device deleted � 21: Device connection lost � 22: Device connection resumed � 23: recording failed � 24: recording storage removed � 25: recording storage installed � 26: External event 1 � 27: External event 2 � 28: External event 3 � 29: External event 4 � 30: External event 5 � 31: External event 6 � 32: External event 7 � 33: External event 8 � 34: External event 9 � 35: External event 10 � 36: Snapshot archive limit reached � 37: Door connection lost � 38: Door connection resumed � 39: Access granted � 40: Access denied � 41: Door alarm triggered � 42: Door tampering detected � 43: Controller alarm logged � 44: Controller case opened � 45: Fan failed � 46: VisualStation overheating
Actually a 7*48 integer array to indicate on/off on each half hour in a week
4 and onward
Example:
{ list:[{ "eventType": 37, "schedule":
Copyright � Synology Inc. All rights Reserved.
228
Synology Surveillance Station Web API
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
} ] }
2.3.27.2 GetCameraAlarmSchedule method
Get schedule of camera alarm
Request
Parameter cameraId alarmIdx
Value <integer> <integer>
Description Id of the selected camera Index of the alarm
Availability 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? alarmIdx=1&api="SYNO.SurveillanceStation.Notification.Schedule"&version="1"&cameraId=97&method=" GetCameraAlarmSchedule"
Response
Key list
Value
Array of <EventSch Object>
Description List of event scheduling
Availability 4 and onward
Example:
{ list:[{ "eventType": 10, "schedule": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
} ] }
Copyright � Synology Inc. All rights Reserved.
229
Synology Surveillance Station Web API
2.3.27.3 GetSystemDEpendentSchedule method
Get schedule of system dependent events
Request
Parameter
Value
eventGroupTypes 0 ... 6
Description
Type of event group to show � 0:NONE � 1:SYSTEM � 2:CAMERA � 3:ACS_CTRL � 4:VS � 5:SERVER � 6:EXT_DEVICE
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="GetSystemDependentSchedule"&api="SYNO.SurveillanceStation.Notification.Schedule"&version= "1"&eventGroupTypes=4
Response
Key list
Value
Description
Array of <EventSchGrp List of event group scheduling
Object>
Availability 4 and onward
<EventSchGrp Object> definition:
Key
Value
eventGroupType 1 ... 6
eventType
0 ... 46
Description
Type of event group. � 1: System � 2: Camera � 3: Access Control � 4: VisualStation � 5: Server � 6: External Device
Type of event � 0 : Testing email � 1 : Camera added � 2 : Camera deleted � 3 : Camera connection lost � 4 : Camera connection resumed � 5 : Motion detected � 6 : SS_ALARM_TRIGGERRED � 7 : SS_MD_ALARM_TRIG � 8 : Audio detected � 9 : Tampering detected
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
230
Synology Surveillance Station Web API
schedule
Array of <integer>
� 10: Rotation limit reached � 11: VisualStation added � 12: VisualStation deleted � 13: VisualStation connection lost � 14: VisualStation connection resumed � 15: SS_SLAVE_DS_ADDED � 16: SS_SLAVE_DS_DELETED � 17: SS_SLAVE_DS_CONN_LOST � 18: SS_SLAVE_DS_CONN_RESUMED � 19: New device added � 20: Device deleted � 21: Device connection lost � 22: Device connection resumed � 23: recording failed � 24: recording storage removed � 25: recording storage installed � 26: External event 1 � 27: External event 2 � 28: External event 3 � 29: External event 4 � 30: External event 5 � 31: External event 6 � 32: External event 7 � 33: External event 8 � 34: External event 9 � 35: External event 10 � 36: Snapshot archive limit reached � 37: Door connection lost � 38: Door connection resumed � 39: Access granted � 40: Access denied � 41: Door alarm triggered � 42: Door tampering detected � 43: Controller alarm logged � 44: Controller case opened � 45: Fan failed � 46: VisualStation overheating
Actually a 7*48 integer array to indicate on/off on each half hour in a week
4 and onward
Example:
{ list:[{ "eventGroupType": 4, "eventType": 37, "schedule": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
Copyright � Synology Inc. All rights Reserved.
231
Synology Surveillance Station Web API
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
} ] }
2.3.27.4 SetBatchSchedule method
Batch set schedule. Group id, camera id are required if needed
Request Parameter
eventTypes schedule
cameraIds cameraGroupIds filter
Value
<string> Array of <Sch Object> <string>
<string> <integer>
Description
Type of events The specified schedule. Actually a 7 * 48 array of "schedule" object Id of specified cameras
Id of specified camera groups Number of filter
Availability 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward
<Sch Object> definition:
Key schedule
Value <string>
Description
An integer indicate the schedule type of each half hour
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?version="1"&schedule=[{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
Copyright � Synology Inc. All rights Reserved.
232
Synology Surveillance Station Web API
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "0"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}]&cameraIds=""&filter=0&api="SYNO.SurveillanceStation.Notification.Schedule"&cameraGroupIds="1" &eventTypes="23,3"&method="SetBatchSchedule"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.27.5 GetAccessControlDoorSchedule method
Get schedule of access control door
Request
Copyright � Synology Inc. All rights Reserved.
233
Synology Surveillance Station Web API
Parameter doorId
Value <integer>
Description Id of the specified door
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? doorId=1&api="SYNO.SurveillanceStation.Notification.Schedule"&version="1"&method="GetAccessControl DoorSchedule"
Response
Key list
Value
Array of <EventSch Object>
Description List of event scheduling
Availability 4 and onward
Example:
{ list:[{ "eventType": 37, "schedule": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
} ] }
2.3.27.6 GetCameraSchedule method
Get schedule of camera
Request
Parameter CameraId
Value <CAMERA_ID>
Description Id of the specified camera
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.Schedule"&version="1"&cameraId=97&method="GetCameraSc hedule"
Response
Copyright � Synology Inc. All rights Reserved.
234
Synology Surveillance Station Web API
Key list
Value Array of <EventSch Object>
Description List of event scheduling
Availability 4 and onward
Example:
{ list:[{ "eventType": 3, "schedule": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
} ] }
2.3.27.7 SetSystemDependentSchedule method
Set schedule of system dependent events
Request
Parameter eventType schedule
Value
Description
<integer> Type of event
Array of <Sch The specified schedule. Actually a 7 * 48 array of
Object>
"schedule" object
Availability 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? eventType=14&method="SetSystemDependentSchedule"&api="SYNO.SurveillanceStation.Notification.Sche dule"&version="1"&schedule=[{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
Copyright � Synology Inc. All rights Reserved.
235
Synology Surveillance Station Web API
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}]
Response
This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
236
Synology Surveillance Station Web API
2.3.27.8 SetAccessControlSchedule method
Set schedule of access control
Request Parameter
eventType schedule
doorId
Value
Description
<integer> Type of event
Array of <Sch The specified schedule. Actually a 7 * 48 array of
Object>
"schedule" object
integer
Id of the specified door
Availability 4 and onward 4 and onward
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?version="1"&schedule=[{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
Copyright � Synology Inc. All rights Reserved.
237
Synology Surveillance Station Web API
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "0"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}]&eventType=38&api="SYNO.SurveillanceStation.Notification.Schedule"&doorId=1&method="SetAcces sControlSchedule"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.27.9 SetCameraSchedule method
Set schedule of camera
Request Parameter
eventType schedule
cameraId
Value <integer> Array of <Sch Object> <CAMERA_ID>
Description Type of event The specified schedule. Actually a 7 * 48 array of "schedule" object Id of specified camera
Availability 4 and onward 4 and onward
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?version="1"&schedule=[{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
Copyright � Synology Inc. All rights Reserved.
238
Synology Surveillance Station Web API
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "0"}, {"schedule": "1"},
Copyright � Synology Inc. All rights Reserved.
239
Synology Surveillance Station Web API {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}]&eventType=4&cameraId=97&api="SYNO.SurveillanceStation.Notification.Schedule"&method="SetCa meraSchedule"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.27.10 API Error Code
Code 400 401 402 403 404
Execution failed. Parameter invalid. Camera disabled. Insufficient license. Codec acitvation failed
Description
Copyright � Synology Inc. All rights Reserved.
240
Synology Surveillance Station Web API
2.3.28 SYNO.SurveillanceStation.Notification.Email
This API provides a method to acquire information of email notification in Surveillance Station. (Ex: get/set setting, send test email)
API Name SYNO.SurveillanceStation.Notification.Email
GetSetting SendTestMail SetSetting
Method Name
Version 1
Section 2.3.28.1 2.3.28.2 2.3.28.3
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward
2.3.28.1 GetSetting method
Get the setting of email notification.
Request No parameter is required.
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.Email"&version="1"&method="GetSetting"
Response
Key attachSnapshot auth authPassword authUserName enableInterval mailEnable mailMethod
msgInterval primaryEmail
Value <boolean> <boolean> <string> <string> <boolean> <boolean> <integer>
<integer> <string>
Description Attach snapshot of event or not. Need authority or not. Password. User name. Enable the limitation of email interval or not. Enable the email notification service or not. Method of mail. 0: no notifications 1: Use system-wide notification setting 2: Use setting specific to SS Interval for sending email. Primary email.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
241
Synology Surveillance Station Web API
secondaryEmail senderMail senderName smtpServer smtpServerPort ssl subjectPrefix oauthApply
<string> <string> <string> <string> <integer> <boolean> <string> <boolean>
Secondary email. Sender of notification email. Name of the sender in email. SMTP server. Port of smtp server. SSL connection or not. Prefix of subject. Use Google OAuth 2.0
Example:
{ "attachSnapshot": true, "primaryEmail": "bismarckh@synology.com", "enableInterval": false, "smtpServerPort": 587, "subjectPrefix": "Hi", "senderMail": "bismarckh@synology.com", "auth": true, "msgInterval": 1, "mailMethod": 2, "ssl": true, "authUserName": "syno.bismarckh@hotmail.com", "secondaryEmail": "syno.bismarckh@hotmail.com", "mailEnable": true, "smtpServer": "smtp.live.com", "senderName": "", "authPassword": "********", "oauthApply": false
}
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.28.2 SendTestMail method
Send the test email of email notification.
Request No parameter is required.
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.Email"&version="1"&method="SendTestMail"
Response
Copyright � Synology Inc. All rights Reserved.
242
Synology Surveillance Station Web API This method has no specific response data. It returns an empty success response if it completes without error.
2.3.28.3 SetSetting method
Set the setting of email notification. Because of the authorization flow of Google policy, if you want to use Gmail to be SMTP server, please set it by Surveillance Station WebUI/Client.
Request Parameter
attachSnapshot auth authPassword authUserName enableInterval mailEnable mailMethod
msgInterval primaryEmail
Value <boolean> <boolean> <string> <string> <boolean> <boolean> <integer>
<integer> <string>
Optional.
Description
Attach snapshot of event or not.
Availability 1 and onward
If not specified, the default value will be true. Optional. Need authority or not.
1 and onward
If not specified, the default value will be false.
Optional (Needed when enable auth). Password.
1 and onward
Optional (Needed when enable auth). User name.
1 and onward
Optional. Enable the limitation of email interval or not.
1 and onward
If not specified, the default value will be false.
Optional. Enable the email notification service or not.
1 and onward
If not specified, the default value will be false.
Optional (Needed when email notification service 1 and onward is enabled). Method of mail.
0: no notifications
1: Use system-wide notification setting
2: Use setting specific to SS
If not specified, the default value will be 0.
*If you want to use setting specific to SS, please
uncheck "Show DSM notifications and sync
Email/SMS/Push Service settings with DSM" in
Notification App first.
Optional. Interval for sending email.
1 and onward
If not specified, the default value will be 1.
Optional (Needed when use setting specific to SS). 1 and onward
Copyright � Synology Inc. All rights Reserved.
243
Synology Surveillance Station Web API
secondaryEmail senderMail senderName smtpServer smtpServerPort
ssl
subjectPrefix
<string> <string> <string> <string> <integer>
<boolean>
<string>
Primary email.
Optional.
1 and onward
Secondary email.
Optional.
1 and onward
Sender of notification email.
Optional.
1 and onward
Name of the sender in email.
Optional (Needed when use setting specific to SS). 1 and onward
SMTP server.
Optional (Needed when use setting specific to SS). 1 and onward
Port of smtp server.
If not specified, the default value will be 0. Optional. SSL connection or not.
1 and onward
If not specified, the default value will be false.
Optional. Prefix of subject.
1 and onward
Example: GET /webapi/entry.cgi? subjectPrefix="Hi"&version="1"&attachSnapshot=true&senderMail="bismarckh@synology.com"&auth=tru e&mailMethod=2&ssl=true&authUserName="syno.bismarckh@hotmail.com"&senderName="1"&authPass word="********"&mailEnable=true&primaryEmail="bismarckh@synology.com"&enableInterval=false&ms gInterval=1&api="SYNO.SurveillanceStation.Notification.Email"&secondaryEmail="syno.bismarckh@hotmai l.com"&smtpServerPort=587&smtpServer="smtp.live.com"&method="SetSetting"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.28.4 API Error Code
Code 400 401
Execution failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
244
Synology Surveillance Station Web API
2.3.29 SYNO.SurveillanceStation.Notification.Filter
This API provides a method to acquire information of notification filter in Surveillance Station. (Ex: get/set the setting of nofitication filter)
API Name SYNO.SurveillanceStation.Notification.Filter
Method Name Set Get
Version 1
Section 2.3.29.1 2.3.29.2
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward
2.3.29.1 Set method
Set information of filter in advance tab.
Request Parameter
X
Value <integer>
Description Optional. X is a number equivalent to a event type and the
value means the setting of filter.
[value]: refer to "filter" in filter_element
[X]: refer to "eventType" in filter_element
If not specified, the default value will be false.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? X=1&api="SYNO.SurveillanceStation.Notification.Filter"&version="1"&method="Set"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.29.2 Get method
Get information of filter in advance tab.
Request No parameter is required.
Example:
Copyright � Synology Inc. All rights Reserved.
245
Synology Surveillance Station Web API GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Notification.Filter"&version="1"&method="Get"
Response Key
list
Value Array of
Description List of filter element.
<filter_eleme
nt>
Availability 1 and onward
<filter_element> definition:
Key
Value
eventGroupType
<integer>
eventType
<integer>
Description Type of event group. 1: System 2: Camera 3: Access Control 4: VisualStation 5: Server 6: External Device Type of event. 0 : Testing email 1 : Camera added 2 : Camera deleted 3 : Camera connection lost 4 : Camera connection resumed 5 : Motion detected 6 : SS_ALARM_TRIGGERRED 7 : SS_MD_ALARM_TRIG 8 : Audio detected 9 : Tampering detected 10: Rotation limit reached 11: VisualStation added 12: VisualStation deleted 13: VisualStation connection lost 14: VisualStation connection resumed 15: SS_SLAVE_DS_ADDED 16: SS_SLAVE_DS_DELETED 17: SS_SLAVE_DS_CONN_LOST 18: SS_SLAVE_DS_CONN_RESUMED 19: New device added 20: Device deleted
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
246
Synology Surveillance Station Web API
21: Device connection lost
22: Device connection resumed
23: recording failed
24: recording storage removed
25: recording storage installed
26: External event 1
27: External event 2
28: External event 3
29: External event 4
30: External event 5
31: External event 6
32: External event 7
33: External event 8
34: External event 9
35: External event 10
36: Snapshot archive limit reached
37: Door connection lost
38: Door connection resumed
39: Access granted
40: Access denied
41: Door alarm triggered
42: Door tampering detected
43: Controller alarm logged
44: Controller case opened
45: Fan failed
46: VisualStation overheating
filter
<integer> Setting of filter.
1: Email
2: SMS
4: Mobile
7: Email+SMS+Mobile
1 and onward
Example:
{ "list": [ { "filter": 1, "eventType": 3, "eventGroupType": 2
Copyright � Synology Inc. All rights Reserved.
247
Synology Surveillance Station Web API
}, {
"filter": 1, "eventType": 4, "eventGroupType": 2 }, ... ] }
2.3.29.3 API Error Code
Code 400 401
Execution failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
248
Synology Surveillance Station Web API
2.3.30 SYNO.SurveillanceStation.Notification.SMS.ServiceProvider
This API provides a method to acquire information of SMS service provider in Surveillance Station. (Ex: get/set/create/delete the setting of SMS service provider)
API Name SYNO.SurveillanceStation.Notification.SMS.Servi
ceProvider
Create Set List Delete
Method Name
Version 1
Section 2.3.30.1 2.3.30.2 2.3.30.3 2.3.30.4
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward
2.3.30.1 Create method
Create SMS service provider.
Request Parameter
providerName providerPort
providerUrl providerTemplate providerSepChar providerNeedSSL
Value <string> <integer>
<string> <string> <string> <boolean>
Description Optional. Name of SMS provider. Optional. Port of SMS provider.
If not specified, the default value will be 0.
Optional. URL of SMS provider. Optional. Template of SMS provider field. Optional. The substitution of blank space in URL. Optional. Is SMS provider need SSL or not.
If not specified, the default value will be false.
Availability 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? providerNeedSSL=false&providerTemplate="https://api.clickatell.com/http/sendmsg? user=@@USER@@&password=@@PASS@@&api_id=3148203&to=@@PHONE@@&text=@@TEXT@@" &api="SYNO.SurveillanceStation.Notification.SMS.ServiceProvider"&providerPort=554&providerName="Pr ovider"&providerUrl="https://api.clickatell.com/http/sendmsg? user=TestUser&password=TestPassword&api_id=3148203&to=886123456789&text=Hello+world"&provid erSepChar="+"&version="1"&method="Create"
Copyright � Synology Inc. All rights Reserved.
249
Synology Surveillance Station Web API
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.30.2 Set method
Set SMS service provider
Request Parameter
providerName providerPort
providerUrl providerTemplate providerSepChar providerNeedSSL
providerOldName
Value <string> <integer>
<string> <string> <string> <boolean>
<string>
Description Optional. Name of SMS provider. Optional. Port of SMS provider.
If not specified, the default value will be 0.
Optional. URL of SMS provider. Optional. Template of SMS provider field. Optional. The substitution of blank space in URL. Optional. Is SMS provider need SSL or not.
If not specified, the default value will be false.
Is SMS provider need SSL or not.
Availability 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? providerNeedSSL=false&providerTemplate="https://api.clickatell.com/http/sendmsg? user=@@USER@@&password=@@PASS@@&api_id=3148203&to=@@PHONE@@&text=@@TEXT@@" &providerOldName="ProviderOld"&providerPort=554&providerName="Provider"&api="SYNO.Surveillance Station.Notification.SMS.ServiceProvider"&providerUrl="https://api.clickatell.com/http/sendmsg? user=TestUser&password=TestPassword&api_id=3148203&to=886123456789&text=Hello+world"&provid erSepChar="+"&version="1"&method="Set"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.30.3 List method
List SMS service provider
Copyright � Synology Inc. All rights Reserved.
250
Synology Surveillance Station Web API
Request No parameter is required.
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.SMS.ServiceProvider"&version="1"&method="List"
Response Key
list
Value Array of
Description Information of provider.
<provider_inf
o>
Availability 1 and onward
<provider_info> definition:
Key
Value
fullUrl
<string>
id
<integer>
name
<string>
template
<string>
Description Full URL of SMS provider. Id of SMS provider. Name of SMS provider. Template URL of SMS provider.
Availability 1 and onward
1 and onward
1 and onward
1 and onward
Example:
{ "list": [ { "template": "https://api.clickatell.com/http/sendmsg?
user=@@USER@@&password=@@PASS@@&api_id=3148203&to=@@PHONE@@&text=@@TEXT@@", "fullUrl": "http://api.clickatell.com/http/sendmsg?
user=Syno&password=1234&api_id=3148203&to=886&text=Hello+world", "name": "clickatell", "id": 1
} ] }
2.3.30.4 Delete method
Delete SMS service provider.
Request Parameter
providerName
Value <string>
Optional.
Description
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
251
Synology Surveillance Station Web API Name of SMS provider.
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Notification.SMS.ServiceProvider"&version="1"&providerName="Provider" &method="Delete"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.30.5 API Error Code
Code 400 401
Execution failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
252
Synology Surveillance Station Web API
2.3.31 SYNO.SurveillanceStation.Addons
This API provides method to get Addons service information.
API Name SYNO.SurveillanceStation.Addons
Method Name GetUpdateInfo
Enable CheckUpdateInfo
GetInfo List
Update CheckEnableDone
Disable SetAutoUpdate
2.3.31.1 GetUpdateInfo method
Get number of addon services which needs to update.
Version 1
Section 2.3.1.1 2.3.31.2 2.3.31.3 2.3.31.4 2.3.31.5 2.3.31.6 2.3.31.7 2.3.31.8 2.3.31.9
Availability DSM 5.1-1594
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Request No parameter is required.
Example: Get number of addon services which needs to update. GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.AddOns"&version="1"&method="GetUpdateInfo"
Response
Key
Value
newUpdateCnt <integer>
Description
Availability
number of addon services which needs to update. 1 and onward
Example:
{ "data": {
"newUpdateCnt": 1 }, "success": true }
Copyright � Synology Inc. All rights Reserved.
253
Synology Surveillance Station Web API
2.3.31.2 Enable method
Enable specific addon service.
Request
Parameter service
Value <integer>
servicename
<string>
Description
Addon Service type of SurveillanceStation. 0: Undefined 1: SERVICE_DEVICE_PACK. 2: SERVICE_CMS 3: SERVICE_VS 4: SERVICE_JOYSTICK 5: SERVICE_ACSCTRL
Optional. Addon service Name.
Availability 1 and onward
1 and onward
Example:
Make speficic addon Service enable.
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AddOns"&serviceName="Joystick"&version="1"&service=4&method="Enabl e"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
254
Synology Surveillance Station Web API
2.3.31.3 CheckUpdateInfo method
Check specific addon service update information. At present, only SERVICE_DEVICE_PACK supported. Request
Parameter service
Value <integer>
Description
Addon Service type of SurveillanceStation. 0: Undefined 1: SERVICE_DEVICE_PACK. 2: SERVICE_CMS 3: SERVICE_VS 4: SERVICE_JOYSTICK 5: SERVICE_ACSCTRL
Availability 1 and onward
Example: Check Device_Pack service whether it needs to update or not. http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AddOns"&version="1"&service=1&method="CheckUpdateInfo"
Response
Key Status
Value <integer>
Example:
{ "data" : {
"status": 1 }, "success": true }
Description
number of addon services which needs to update.Status of Addon Service. 0: Undefined. 1: No new update. 2: New update avaliable. 3: It is Ready to upgrade. 4: Downloading the service. 5: Download error. 6: Upgrading. 7: Error.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
255
Synology Surveillance Station Web API
2.3.31.4 GetInfo method
Get specific Addon information by sending service id. Request
Parameter service
Value <integer>
Description
Addon Service type of SurveillanceStation. 0: Undefined 1: SERVICE_DEVICE_PACK. 2: SERVICE_CMS 3: SERVICE_VS 4: SERVICE_JOYSTICK 5: SERVICE_ACSCTRL
Example: Get Joystick service information. http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AddOns"&version="1"&service=3&method="GetInfo"
Availability 1 and onward
Response
Name Info
blEnabled modelName autoUpdate
Value <Info Object>
<boolean> <string> <boolean>
Description Info Object to represent Information of requested service. Requested service is enabled or not.
Name of DS. This package can be auto updated or not.
Availability 1 and onward
1 and onward 1 and onward 1 and onward
<Info Object> definition
Name
Value
date
<string>
maintainer
<string>
ssMinVersion <string>
Version
<string>
Description Release date of service. Maintainer of this service. Minimum SurveillanceStation version is supported. Version of service.
Availability 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
256
Synology Surveillance Station Web API
Example: { "data" : {
"Info": { "date": "2015/02/02-15:11:53", "version": "3.1-0582", "maintainer": "Synology Inc.", "ssMinVersion": "7.0-3728"
}, "blEnabled": true, "modelName": "DS713+", "autoUpdate": false }, "success": true }
2.3.31.5 List method
Get total addOns package information List.
Request No parameter is required.
Example: Get total addOns package information List. http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AddOns"&version="1"&method="List"
Response
Key list
Value
Array of <packageInfo Object>
Description Information of requested service.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
257
Synology Surveillance Station Web API
<packageInfo Object> definition
Name
Value
info service
<serviceInfo Object> <integer>
Description
Information of this service.
Addon Service type of SurveillanceStation. 0: Undefined 1: SERVICE_DEVICE_PACK. 2: SERVICE_CMS 3: SERVICE_VS 4: SERVICE_JOYSTICK 5: SERVICE_ACSCTRL
Availability 1 and onward 1 and onward
<serviceInfo Object> definition
Name info blEnabled modelName autoUpdate
Value <Info Object> <boolean> <string> <boolean>
Description Information of this service. This service is enabled or not. Name of DS. This service is support autoupdated or not.
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Example:
{ "data": {
"list": [ {
"info": { "Info": { "date": "2015/02/02-15:11:53", "version": "3.1-0582", "maintainer": "Synology Inc.", "ssMinVersion": "7.0-3728" } blEnabled": true, "modelName": "DS713+", "autoUpdate": false
}, "service": 1 }, { "info": {
"Info": { "date": "", "version": "", "maintainer": "", "ssMinVersion": ""
}, "blEnabled": true, "modelName": "DS713+" },
Copyright � Synology Inc. All rights Reserved.
258
Synology Surveillance Station Web API
"service": 2 }, {
"info": { "Info": { "date": "", "version": "", "maintainer": "", "ssMinVersion": "" }, "blEnabled": true, "modelName": "DS713+"
}, "service": 3 }, { "info": {
"Info": { "date":"", "maintainer":"", "ssMinVersion":"", "version":""
}, "blEnabled":true, "modelName":"DS713+" }, "service":4 }, { "info": { "Info": {
"date":"", "maintainer":"", "ssMinVersion":"", "version":"" }, "blEnabled":true, "modelName":"DS713+" }, "service":5 }] }, "success": true }
Copyright � Synology Inc. All rights Reserved.
259
Synology Surveillance Station Web API
2.3.31.6 Update method
Update package by service type of package file.
Request
Parameter service
Value <integer>
filePath
<string>
Description
Addon Service type of SurveillanceStation. 0: Undefined 1: SERVICE_DEVICE_PACK. 2: SERVICE_CMS 3: SERVICE_VS 4: SERVICE_JOYSTICK 5: SERVICE_ACSCTRL
Optional. Path of package file. If the package is installed manually, then the path is needed.
Availability 1 and onward
1 and onward
Example: Get total addOns package information List.
http://192.168.1.1:5000/webapi/entry.cgi? method="Update"&api="SYNO.SurveillanceStation.AddOns"&version="1"&service=1&filePath="/path/to/p ackagefile"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
260
Synology Surveillance Station Web API
2.3.31.7 CheckEnableDone method
Check specific addon service is successfully enabled or disabled.
Request
Parameter service
Value <integer>
Description
Addon Service type of SurveillanceStation. 0: Undefined 1: SERVICE_DEVICE_PACK. 2: SERVICE_CMS 3: SERVICE_VS 4: SERVICE_JOYSTICK 5: SERVICE_ACSCTRL
Availability 1 and onward
Example: Check Joystick service is successfully enabled or disabled. http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AddOns"&version="1"&service=4&method="CheckEnableDone"
Response
Parameter blDone
Value <boolean>
Description Service is successfully enabled or disabled.
Example:
Get total addOns package information List.
{ "data" : {
"blDone": true }, "success": true }
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
261
Synology Surveillance Station Web API
2.3.31.8 Disable method
Disable specific addon service.
Request
Parameter service
Value <integer>
serviceName
<string>
Description
Addon Service type of SurveillanceStation. 0: Undefined 1: SERVICE_DEVICE_PACK. 2: SERVICE_CMS 3: SERVICE_VS 4: SERVICE_JOYSTICK 5: SERVICE_ACSCTRL
Optional. Addon service Name.
Availability 1 and onward
1 and onward
Example: Check Joystick service is successfully enabled or disabled.
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AddOns"&serviceName="Joystick"&version="1"&service=4&method="Disab le"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
262
Synology Surveillance Station Web API
2.3.31.9 SetAutoUpdate method
Set AutoUpdate functionality of addon service. At present, only SERVICE_DEVICE_PACK supported.
Request
Parameter service
Value <integer>
BlEnabled
<true>
Description
Availability
Addon Service type of SurveillanceStation.
1 and onward
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
this service is enabled autoUpdate functionality 1 and onward
or not.
Example: Check Joystick service is successfully enabled or disabled.
http://192.168.1.1:5000/webapi/entry.cgi? blEnabled=true&api="SYNO.SurveillanceStation.AddOns"&version="1"&service=1&method="SetAutoUpdat e"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.31.10 API Error Code
Code 400
Execution failed.
Description
Copyright � Synology Inc. All rights Reserved.
263
Synology Surveillance Station Web API
2.3.32 SYNO.SurveillanceStation.Alert
This API provides several methods to access analytics event information of Surveillance Station. (Ex: Count event number, List the information of event, Lock/Unlock event, Delete event, Trigger event)
API Name SYNO.SurveillanceStation.Alert
Method Name RecServerClear
EventCount ClearSelected
Clear Enum RecServerEnum Unlock Trigger EventFlushHeader Lock RecServerEventCount
2.3.32.1 RecServerClear method
Version 1
Section 2.3.2.1 2.3.2.2 2.3.32.3 2.3.32.4 2.3.32.5 2.3.32.6 2.3.32.7 2.3.32.8 2.3.32.9 2.3.32.10 2.3.32.11
Availability DSM 4.0-2198
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Delete specific camera's all events in recording server.
Request
Parameter camIdList
Value <string>
Description The deleted camera ID list.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Alert"&camIdList="5,7"&version="1"&method="RecServerClear"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
264
Synology Surveillance Station Web API
2.3.32.2 EventCount method
Get cameras' analytics event count.
Request
Parameter camIdList
Value <string>
Description The deleted camera ID list.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Alert"&camIdList="3,7,12"&version="1"&method="EventCount"
Response
Key eventCount
Value
Array of <eventCount Object>
Description Cameras' event count info.
Availability 1 and onward
<eventCount Object> definition
Name dsId id archived
Value <integer> <integer> <boolean>
Example:
{ "data": {
"eventCount": [ {
"eventCnt": 10, "dsId": 0, "cameraId": 3 }, { "eventCnt": 0, "dsId": 0, "cameraId": 7 }, { "eventCnt": 3, "dsId": 6, "cameraId": 2 }] }, "success": true }
Description Events' owner dsId. Unique analytics event id. Point out that this is archived or not.
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
265
Synology Surveillance Station Web API
2.3.32.3 ClearSelected method
Delete selected events.
Request
Parameter dsIdList idList
Value <string> <string>
Description
Availability
Event ds id lists.
1 and onward
Ds ID with Unique event ID. "DS_ID : EVENT_ID" 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? dsIdList="0,6"&api="SYNO.SurveillanceStation.Alert"&idList="{\"0\":\"14,35\",\"6\":\"278\"}"&version="1" &method="ClearSelected"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.32.4 Clear method
Delete specific camera's all events
Request
Parameter camIdList
Value <string>
Description The deleted camera ID list.
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Alert"&camIdList="3,7,12"&version="1"&method="EventCount"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
266
Synology Surveillance Station Web API
2.3.32.5 Enum method
Enumerate analytics history event list by specific filter conditions.
Request
Parameter camIdList typeListstring
Value <string> <string>
typeListstring <string>
Description
The deleted camera ID list.
Optional. Archive status. 0: EL_UNKNOWN 1: EL_NONLOCK 2: EL_LOCK
Optional. Analytics type of event. 0: ANALYTICS_TYPE_NONE 1: ANALYTICS_TYPE_MOTION 2: ANALYTICS_TYPE_MISSING_OBJ 3: ANALYTICS_TYPE_FOREIGN_OBJ 4: ANALYTICS_TYPE_CAM_OCCLUSION 5: ANALYTICS_TYPE_FOCUS_LOST 6: ANALYTICS_TYPE_LOITERING 7: ANALYTICS_TYPE_OBJ_COUNTING 8: ANALYTICS_TYPE_VIRTUAL_FENCE
Availability 1 and onward 1 and onward
1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camIdList="1,3,11"&api="SYNO.SurveillanceStation.Alert"&typeList="1,2,7"&lock=0&version="1"&method ="Enum"
Response
Key history total
Value <history Object> <integer>
Description The selected cameras' analytics events. Total count of selected events.
Availability 1 and onward 1 and onward
<history Object> definition
Name Id name Reason
Value <integer> <string> <integer>
Description
Unique analytics event id.
Path of event.
Analytics type of event. 0: ANALYTICS_TYPE_NONE 1: ANALYTICS_TYPE_MOTION 2: ANALYTICS_TYPE_MISSING_OBJ 3: ANALYTICS_TYPE_FOREIGN_OBJ
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
267
Synology Surveillance Station Web API
startTime stopTime archived frameCount video_type recording is_complete
eventSize audio_format closing fisheye_type
<integer> <integer> <boolean> <integer> <integer> <boolean> <boolean>
<float> <string> <boolean> <integer>
fisheye_origin_vie <boolean>
w
snapshot_medium <string>
mountId
<integer>
dsId
<integer>
cameraId
<integer>
camera_name <string>
volume
<integer>
mute
<boolean>
imageEnhanceme <imageEnhancement
nt
Object>
4: ANALYTICS_TYPE_CAM_OCCLUSION
5: ANALYTICS_TYPE_FOCUS_LOST
6: ANALYTICS_TYPE_LOITERING
7: ANALYTICS_TYPE_OBJ_COUNTING
8: ANALYTICS_TYPE_VIRTUAL_FENCE
Start time of event.
1 and onward
Stop time of event.
1 and onward
Point out that this is archived or not.
1 and onward
Frame count of event.
1 and onward
Video type of Event.
1 and onward
Point out that this is recording or not.
1 and onward
Point out that this has finished recording or 1 and onward
not.
Size of event in MB.
1 and onward
Audio format of event.
1 and onward
Point out that this is closing or not.
1 and onward
Type of fisheye region.
1 and onward
-1: FISHEYE_NOT_REGION
0: FISHEYE_REGION
1: FISHEYE_PANORAMA
2: FISHEYE_DOUBLE_PANORAMA
3: FISHEYE_TRIPLE_VIEW
4: FISHEYE_QUAD_VIEW
5: FISHEYE_SUB_REGION
6: FISHEYE_SUB_PANORAMA
Point out that this is fisheye origin view or not. 1 and onward
Snapshot of event. Mount id of event. (always be 0 in analytics event) Event's owner dsId. Unique camera id. (id on recording server) Camera name. Camera volume. Point out that the camera is mute or not. Camera's image enhancement info.
1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
<imageEnhancement Object> definition
Key brightness
contrast
saturation
sharpness
Value <integer>
<integer>
<integer>
<integer>
Description
Camera's brightness parameter of image enhancement.
Camera's contrast parameter of image enhancement.
Camera's saturation parameter of image enhancement.
Camera's sharpness parameter of image enhancement.
Availability 1 and onward
1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
268
Synology Surveillance Station Web API
Example:
{ "data": {
"total": 1, "history": {
"mute": false, "fisheye_type": 0, "id": 278, "frameCount": 175, "archived": true, "cameraId": 3, "mountId": 0, "stopTime": 1421985306, "audio_format": "MPEG4-GENERIC", "fisheye_origin_view": true, "video_type": 3, "volume": 0, "reason": 1, "startTime": 1421985287, "eventSize": 6.570010185241699, "dsId": 0, "snapshot_medium": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKC goKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABaAHgDASIAAhEBAxEB/8QAHwAAA QUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUE GE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZ WZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ 2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgE CBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJ ygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkp aanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA PwDxW18I38SBdmkS428yIxPH4d+9Rt8NdTZwftdiC54UFuP0r0XT4/MmBP3V5NacJzdE4JCjaD6HvXo/VoHlPF 1Dy0fCvVT/AMv1j+b/APxNOHwo1Y9L6x/N/wD4mvYAAy7SOD1qYFVXHHToKf1aAvrlQ8ZPwn1Yf8v1h+b/APx NQy/DDU4kLPf2AUd8t/8AE16xf6qkeVixI/t0H+NYc80ty+6VifbsKpYSAfW6p5nL4FvUbC3dq/uN3+FMHge+P/L zbfm3+FelCE96URY7VX1SmP63UPN/ +EEvtuftVrn0+b/CmHwPfj/l5tvzb/CvTfLOKa0dH1SmP63UPNP+EHvv+fm2/Nv8KQ+CL4f8vFt+bf4V6Ts56U0x5 NL6pTD63UPNj4LvR/y8W35t/hTT4OvP+fi3/wDHv8K9GkjwKgdKPqlMpYqZ583hC8H/AC3t/wAz/hRXeOnFFL6 pT7D+szOuswILTcR8xGTVu0XbEuep5NVJ2UKqsQB1b6VXuNUOCtv/AN9VskcW5rXF5Hbrlj83YDrWPc301zlQd sfoO9VVDOxZiST61Yjj6VooisRJDmpUi56VbiiqURe1VYVymIalgghJfz2dRtO3aM5PvVoRYpTFRYVzOMdM8qr7R ZHSmeVRYLme0ftUbR1pNFVrTtGu9Rl2W0JYd2PAH41LaS1LWpz7JxxUDpn613l3o2m6XbMsrm9viOEQ/Kv49 6465T5icY56CpjJS2Ks0ZrpRU0iZPFFUO4slxJcSEsevapoEzTIU6cVehixjNCRLY6GPNXUTpxRBHx0q3HHmqM2xI o+lWkh5qSKPIFXIYcjpzTIuUvI9qGh46VqC3JHTj1oa346UgMcw4qJoq1pIcCq7x0wuaelaRYRW63OoSea55WBP 6n+grXZLu+jeGCMWtoozsQYwPc9vxyfaoPD5tYrcPIrSzHhUXqfx6/lWnLa3V9CHupI7OxXjGdqj8e/4Z+tcU7uW p0Qemhg3X2GySSK3j+2XBGTjPlj6nqfx4rg9RRvPcyKAxPQDAFelfaLeLbb6JaGeUgjzpE4z6qv9eTXDeIbeeK9f7U 26djlucmrpaMcnoc5IuKKnkXNFdFiRIE5FX4k4qC3StCJOKCGyWFc4FXIk55qGFOeKvQpk0yGTW8eccVq2sGcCq 9rFyK39Pt93QZPpQSQJYuFHBAP61HJakA8dK7uz0RpoVfHUfkaoarpTW64K4J5NQqkW7DscJPDycjmqUsddBe QbWPFZU6YPSrES6Bcm2lYR26zSn7qt938R3rcvrQsftPiC8wBgrCOuPQL2/H8q5m2uJLSfzYWKPjGR1FVr6eS4k3 yMzN6k5rKVNt3RpGdkauo+IkhRodLi+zxd3H32H1/z9K4m9czSF26nv61emHNU5F4IqowUdh8zZnSiipZF4NFU MLcdK0oVzUWkWM17cLFbruc+ +APxrsdP06xsNhk/wBNuiAwRfuA9wf84qZTUQ5WzKs9NuZoXlSI+Wg3FjwMU+BAfrXTTRXF1Gkl3MsFqMmN
Copyright � Synology Inc. All rights Reserved.
269
Synology Surveillance Station Web API
M7VHqo7n8PzrmtYvNP0xmnmnENsT8hk4LH2HU/hShO+5MoW2NK1XkV1WiBBhpCFUdWJwB+NeK6r8SLa2 +XTIg5x/rJs/og5/MiuYvfGOoam7C6uHdc/cY4UD2UcfzNEpxehUaE3qfa+g3dleW7CzmSdUwCycrn69DXmfxl8Z z+HWNvaRWs08gypYnMQx3HfnpzXB+AvH83h6wCFhJLcsFjDkkKoHX8Tx+Fcv8VNaOo6wbtiCs4DDJ6ZHI/A5Fc kKTjNyOh2lFQtsWvAvii91TxLdW+pXTTGeLdGCcBSvOAB04J/Ku3uF5zXg+gX39n+IbK9+6sMozj+70P6E175Lhh nOQa7abuYV4cr0M2Uc1UkGc1emFVJFNWYFKRapyrya1o7eW4kCQozuewFFzp8cEbK8vm3P/POH5gv1b/Cpc ktC0jnpVoqWZaKCrkulTuDsDlB6g/zrt9OukeMLYQ75T992HAP94D/HNef2fWux0l3jtJWjZkLYBKnGR6VjUirXKi 3exJ4tuE0rS57vUZbi4uSwBS2ILoT0b0A7dyM15rqsGr+IoC88UOl6XkbyzZYtjhi5yzfhkfSvYvDkEU7Ik8UciusgYO oIbjvnrXiPji4mku7VZJpHVkKsGYnIB4B9hXDiG1JJHVQtJM87vYWtrxotwfaxXcOjDPUVNZHdPhu7DNQTktcMW JJyeT9aS1J84nvz/Krizqa0OnjvJZVkaI4WMiJPULSa5fi5gG4MZEweWyT6/wBKqacTscZOPlqoeZnz6n+Vdb+G5zx XvDGZzJvySmOte9+ENR/tPwvYXBOZBGI3/wB5eD/KvBl/1f8AwD+or1n4REnwzcgkkC5bHt8q06T94yxKvFM6+ aktY45Jgsqyv6JH1Y+maWWokZlYlSQcdQa2lscSNSfhfs74jU9LW1GWY/7Tf/rqhdnbG0XyxA9Le3+Zj/vN/n6Vfl/ deHg8fyO0mGZeCR6GqF2BHo0RQbS7EMRxu+vrWBre5zM64J4op83eitiT/9k=",
"imageEnhancement": { "saturation": 0, "sharpness": 0, "contrast": 0, "brightness": 0
}, "name": "laRec/20150123AM/Q603520150123-115447-1421985287.mp4", "camera_name": "Q6035-Rec---", "recording": false, "closing": false, "is_complete": true } }, "success": true }
Copyright � Synology Inc. All rights Reserved.
270
Synology Surveillance Station Web API
2.3.32.6 RecServerEnum method
Enumerate analytics history event list by specific filter conditions from host to recording server.
Request Parameter
camIdList dsId
lock
Value <string> <integer>
<integer>
typeList
<string>
Description The deleted camera ID list.
server's ds id.
Optional. Archive status. 0: EL_UNKNOWN 1: EL_NONLOCK 2: EL_LOCK Optional. Analytics type of event. 0: ANALYTICS_TYPE_NONE 1: ANALYTICS_TYPE_MOTION 2: ANALYTICS_TYPE_MISSING_OBJ 3: ANALYTICS_TYPE_FOREIGN_OBJ 4: ANALYTICS_TYPE_CAM_OCCLUSION 5: ANALYTICS_TYPE_FOCUS_LOST 6: ANALYTICS_TYPE_LOITERING 7: ANALYTICS_TYPE_OBJ_COUNTING 8: ANALYTICS_TYPE_VIRTUAL_FENCE
Availability 1 and onward 1 and onward 1 and onward
1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? camIdList="5,8"&api="SYNO.SurveillanceStation.Alert"&typeList="1,2,7"&lock=0&version="1"&dsId=6&me thod="RecServerEnum"
Response
Key history
Value
Description
<history Object> The selected cameras' analytics events.
Example:
{ "data": {
"history": { "mute": false, "fisheye_type": 0, "id": 313, "frameCount": 175, "archived": true, "cameraId": 5, "mountId": 0, "stopTime": 1421985306, "audio_format": "MPEG4-GENERIC",
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
271
Synology Surveillance Station Web API
"fisheye_origin_view": true, "video_type": 3, "volume": 0, "reason": 1, "startTime": 1421985287, "eventSize": 6.570010185241699, "dsId": 6, "snapshot_medium": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKC goKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABaAHgDASIAAhEBAxEB/8QAHwAAA QUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUE GE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZ WZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ 2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgE CBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJ ygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkp aanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA PwDxW18I38SBdmkS428yIxPH4d+9Rt8NdTZwftdiC54UFuP0r0XT4/MmBP3V5NacJzdE4JCjaD6HvXo/VoHlPF 1Dy0fCvVT/AMv1j+b/APxNOHwo1Y9L6x/N/wD4mvYAAy7SOD1qYFVXHHToKf1aAvrlQ8ZPwn1Yf8v1h+b/APx NQy/DDU4kLPf2AUd8t/8AE16xf6qkeVixI/t0H+NYc80ty+6VifbsKpYSAfW6p5nL4FvUbC3dq/uN3+FMHge+P/L zbfm3+FelCE96URY7VX1SmP63UPN/ +EEvtuftVrn0+b/CmHwPfj/l5tvzb/CvTfLOKa0dH1SmP63UPNP+EHvv+fm2/Nv8KQ+CL4f8vFt+bf4V6Ts56U0x5 NL6pTD63UPNj4LvR/y8W35t/hTT4OvP+fi3/wDHv8K9GkjwKgdKPqlMpYqZ583hC8H/AC3t/wAz/hRXeOnFFL6 pT7D+szOuswILTcR8xGTVu0XbEuep5NVJ2UKqsQB1b6VXuNUOCtv/AN9VskcW5rXF5Hbrlj83YDrWPc301zlQd sfoO9VVDOxZiST61Yjj6VooisRJDmpUi56VbiiqURe1VYVymIalgghJfz2dRtO3aM5PvVoRYpTFRYVzOMdM8qr7R ZHSmeVRYLme0ftUbR1pNFVrTtGu9Rl2W0JYd2PAH41LaS1LWpz7JxxUDpn613l3o2m6XbMsrm9viOEQ/Kv49 6465T5icY56CpjJS2Ks0ZrpRU0iZPFFUO4slxJcSEsevapoEzTIU6cVehixjNCRLY6GPNXUTpxRBHx0q3HHmqM2xI o+lWkh5qSKPIFXIYcjpzTIuUvI9qGh46VqC3JHTj1oa346UgMcw4qJoq1pIcCq7x0wuaelaRYRW63OoSea55WBP 6n+grXZLu+jeGCMWtoozsQYwPc9vxyfaoPD5tYrcPIrSzHhUXqfx6/lWnLa3V9CHupI7OxXjGdqj8e/4Z+tcU7uW p0Qemhg3X2GySSK3j+2XBGTjPlj6nqfx4rg9RRvPcyKAxPQDAFelfaLeLbb6JaGeUgjzpE4z6qv9eTXDeIbeeK9f7U 26djlucmrpaMcnoc5IuKKnkXNFdFiRIE5FX4k4qC3StCJOKCGyWFc4FXIk55qGFOeKvQpk0yGTW8eccVq2sGcCq 9rFyK39Pt93QZPpQSQJYuFHBAP61HJakA8dK7uz0RpoVfHUfkaoarpTW64K4J5NQqkW7DscJPDycjmqUsddBe QbWPFZU6YPSrES6Bcm2lYR26zSn7qt938R3rcvrQsftPiC8wBgrCOuPQL2/H8q5m2uJLSfzYWKPjGR1FVr6eS4k3 yMzN6k5rKVNt3RpGdkauo+IkhRodLi+zxd3H32H1/z9K4m9czSF26nv61emHNU5F4IqowUdh8zZnSiipZF4NFU MLcdK0oVzUWkWM17cLFbruc+ +APxrsdP06xsNhk/wBNuiAwRfuA9wf84qZTUQ5WzKs9NuZoXlSI+Wg3FjwMU+BAfrXTTRXF1Gkl3MsFqMmN M7VHqo7n8PzrmtYvNP0xmnmnENsT8hk4LH2HU/hShO+5MoW2NK1XkV1WiBBhpCFUdWJwB+NeK6r8SLa2 +XTIg5x/rJs/og5/MiuYvfGOoam7C6uHdc/cY4UD2UcfzNEpxehUaE3qfa+g3dleW7CzmSdUwCycrn69DXmfxl8Z z+HWNvaRWs08gypYnMQx3HfnpzXB+AvH83h6wCFhJLcsFjDkkKoHX8Tx+Fcv8VNaOo6wbtiCs4DDJ6ZHI/A5Fc kKTjNyOh2lFQtsWvAvii91TxLdW+pXTTGeLdGCcBSvOAB04J/Ku3uF5zXg+gX39n+IbK9+6sMozj+70P6E175Lhh nOQa7abuYV4cr0M2Uc1UkGc1emFVJFNWYFKRapyrya1o7eW4kCQozuewFFzp8cEbK8vm3P/POH5gv1b/Cpc ktC0jnpVoqWZaKCrkulTuDsDlB6g/zrt9OukeMLYQ75T992HAP94D/HNef2fWux0l3jtJWjZkLYBKnGR6VjUirXKi 3exJ4tuE0rS57vUZbi4uSwBS2ILoT0b0A7dyM15rqsGr+IoC88UOl6XkbyzZYtjhi5yzfhkfSvYvDkEU7Ik8UciusgYO oIbjvnrXiPji4mku7VZJpHVkKsGYnIB4B9hXDiG1JJHVQtJM87vYWtrxotwfaxXcOjDPUVNZHdPhu7DNQTktcMW JJyeT9aS1J84nvz/Krizqa0OnjvJZVkaI4WMiJPULSa5fi5gG4MZEweWyT6/wBKqacTscZOPlqoeZnz6n+Vdb+G5zx XvDGZzJvySmOte9+ENR/tPwvYXBOZBGI3/wB5eD/KvBl/1f8AwD+or1n4REnwzcgkkC5bHt8q06T94yxKvFM6+ aktY45Jgsqyv6JH1Y+maWWokZlYlSQcdQa2lscSNSfhfs74jU9LW1GWY/7Tf/rqhdnbG0XyxA9Le3+Zj/vN/n6Vfl/ deHg8fyO0mGZeCR6GqF2BHo0RQbS7EMRxu+vrWBre5zM64J4op83eitiT/9k=", "imageEnhancement": {
"saturation": 0,
Copyright � Synology Inc. All rights Reserved.
272
Synology Surveillance Station Web API
"sharpness": 0, "contrast": 0, "brightness": 0 }, "name": "laRec/20150123AM/OutDoor-115447-1421985287.mp4", "camera_name": "OutDoor", "recording": false, "closing": false, "is_complete": true } }, "success": true }
2.3.32.7 Unlock method
Unlock the selected events.
Request
Parameter dsId idList
Value <integer> <string>
Events' ds id. Event id list
Description
Availability 1 and onward 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Alert"&dsId=6&idList="13,25"&version="1"&method="Unlock"
Response
Key events
Value Array of <events Object>
Description selected events' lock info.
Availability 1 and onward
<events Object> definition
Key dsId id archived
Value <integer> <integer> <boolean>
Description Events' owner dsId. Unique analytics event id. Point out that this is archived or not.
Availability 1 and onward 1 and onward 1 and onward
Example:
{ "data": {
"events": [
Copyright � Synology Inc. All rights Reserved.
273
Synology Surveillance Station Web API
{ "archived": false, "dsId": 6, "id": 13
}, {
"archived": false, "dsId": 6, "id": 25 } ] }, "success": true }
Copyright � Synology Inc. All rights Reserved.
274
Synology Surveillance Station Web API
2.3.32.8 Trigger method
Set cameras' analytics triggered
Request
Parameter trigCamIdList
Value <string>
Description The triggered camera ID list.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? trigCamIdList="3,5"&api="SYNO.SurveillanceStation.Alert"&version="1"&method="Trigger"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.32.9 EventFlushHeader method
Flush event header.
Request
Parameter eventId
Value <integer>
Event ID.
Description
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? eventId=157&api="SYNO.SurveillanceStation.Alert"&version="1"&method="EventFlushHeader"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
275
Synology Surveillance Station Web API
2.3.32.10 Lock method
Lock the selected events.
Request
Parameter dsId idList
Value <integer> <string>
Events' ds id. Event id list
Description
Availability 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Alert"&dsId=6&idList="13,25"&version="1"&method="Lock"
Response
Key events
Value Array of <events Object>
Description selected events' lock info.
Example:
{ "data": {
"events": [ { "archived": true, "dsId": 6, "id": 13 }, { "archived": true, "dsId": 6, "id": 25 }
] }, "success": true }
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
276
Synology Surveillance Station Web API
2.3.32.11 RecServerEventCount method
Get cameras' analytics event count in recording server.
Request
Parameter camIdList idList
Value <string> <integer>
Description Camera ID list. Camera's owner ds ID.
Availability 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.Alert"&camIdList="10,13"&dsId=6&version="1"&method="RecServerEventC ount"
Response
Key eventCount
Value
Array of <eventCount Object>
<eventCount Object> definition
Key dsId cameraId eventCnt
Value <integer> <integer> <integer>
Example:
{ "data": {
"eventCount": [ { "eventCnt": 2, "dsId": 6, "cameraId": 10 }, { "eventCnt": 0, "dsId": 6, "cameraId": 13 }
] }, "success": true }
Description selected events' lock info.
Availability 1 and onward
Description Events' owner dsId. Unique camera id. (id on recording server) Total analytics event count of the specific camera.
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
277
Synology Surveillance Station Web API
2.3.32.12 API Error Code
Code 400 401 407
Execution failed. Parameter invalid. CMS closed.
Description
Copyright � Synology Inc. All rights Reserved.
278
Synology Surveillance Station Web API
2.3.33 SYNO.SurveillanceStation.Alert.Setting
This API provides method to get analytics settings
API Name SYNO.SurveillanceStation.Alert.Setting
Method Name Save
2.3.33.1 Save method
Version 1
Section 2.3.3.1
Availability Surveillance Station 6.0-2337
Availability 1 and onward
Save analytics settings
Request
Parameter camId type
Value <integer> <integer>
showFrame
<boolean>
showLine
<boolean>
showVirtualFence <boolean>
beep
<boolean>
sens
<integer>
dwellTime
direction objSize
region
<integer>
<integer> <integer>
<string>
Description
The selected camera id.
Analytics type. 0: ANALYTICS_TYPE_NONE 1: ANALYTICS_TYPE_MOTION 2: ANALYTICS_TYPE_MISSING_OBJ 3: ANALYTICS_TYPE_FOREIGN_OBJ 4: ANALYTICS_TYPE_CAM_OCCLUSION 5: ANALYTICS_TYPE_FOCUS_LOST 6: ANALYTICS_TYPE_LOITERING 7: ANALYTICS_TYPE_OBJ_COUNTING 8: ANALYTICS_TYPE_VIRTUAL_FENCE
Point out that show frame or not.
Point out that show line or not.
Point out that show virtual fence or not.
Point out that beep or not.
Analytics sensitivity. 0: ANALYTICS_SENS_LOW 1: ANALYTICS_SENS_MEDIUM 2: ANALYTICS_SENS_HIGH
Analytics dwellTime for ANALYTICS_TYPE_LOITERING.
Analytics direction (no longer relevent).
Analytics objSize for ANALYTICS_TYPE_FOREIGN_OBJ.
Analytics region.
Availability 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? direction=0&camId=32&version="1"&showFrame=true&api="SYNO.SurveillanceStation.Alert.Setting"�ion= "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Copyright � Synology Inc. All rights Reserved.
279
Synology Surveillance Station Web API
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111"&d wellTime=5&beep=false&objSize=25&sens=2&showLine=false&showVirtualFence=false&type=1&method= "Save"
Response
Name success
Value <boolean>
Description Success or not.
Example:
{ "data": {
"success": boolean }, "success": true }
2.3.33.2 API Error Code
Code 400 401 407
Execution failed. Parameter invalid. CMS closed.
Description
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
280
Synology Surveillance Station Web API
2.3.34 SYNO.SurveillanceStation.SnapShot
This API provides functions on snapshot, including taking, editing and deleting snapshots.
API Name SYNO.SurveillanceStation.SnapShot
Method Name ChkFileExist Edit
CountByCategory ChkContainLocked
UnlockFiltered List
Unlock TakeSnapshot
GetSetting DeleteFiltered LoadSnapshot
Lock Download LockFiltered SaveSetting
Save ChkSnapshotValid GetCapabilityByCamIdDelete
Version 1
Section 2.3.4.1 2.3.4.3 2.3.34.3 2.3.4.4 2.3.4.5 2.3.34.6 2.3.34.7 2.3.34.8 2.3.34.9 2.3.34.10 2.3.34.11 2.3.34.12 2.3.34.13 2.3.34.14 2.3.34.15 2.3.34.16 2.3.34.17 2.3.34.18
Availability Surveillance Station 6.0-2337
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.34.1 ChkFileExist method
Check if the snapshot file is exist.
Request
Parameter id
Value <integer>
Description Id of the snapshot file to check if exist.
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.SnapShot"&id=1&version="1"&method="ChkFileExist"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
281
Synology Surveillance Station Web API
2.3.34.2 Edit method
Save the modification of snapshot.
Request Parameter
id createCopy
width height byteSize imageData
Value <integer> <boolean>
<integer> <integer> <integer> <string>
Description Id of the snapshot. Optional. Set true to create another snapshot and save modification to it. Width of snapshot. Height of snapshot. File size of snapshot in byte. Image data of snapshot in base64 format.
Availability 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? width=480&api="SYNO.SurveillanceStation.SnapShot"&version="1"&imageData="/9j/4AAQSkZJRgABAQAA AQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg 8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAKAAeADASIAAhEBAxEB/8QAHwAAAQUBAQEB AQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxF DKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3 R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5uf o6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcF BAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg 5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsr O0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9EvEXjL SG0+bVdMv7e5hTRLzUIpoZPMR/uIh/Wq1hr2y+XSvM+aHVrLSdv+3Hbee9fL0dhr3wf8aXPgDXI/8AQfE9zY6db zfwW269jd9n+xIn/j9eqJ4lgs5J/EUcg2x3/i3xG2/+5ap9lT/0bW2HlGpTNT0G+8ZxXHhm8vYJP3r6Dfagn/baX9z WsvhR20rU7ZINlxNp6WCOIkjOwJ/f/wDi68z8J2k2qzXGjuY3jttO8MaPL/vt/pM36S19EJ90VrXUaXwkzPCvEOm 3VnfalqXl+X5Mutamn/bGyjsof/RtZlkjafrFnBIn7mw1WztHT+4mn6NI7/8AkSvc9S0Kw1SKSOeIDzo2hZv9hm+c f8CrgPFPhqTTGv8AV7SON3S01a7Tf9x57jy0T/xypg4S0QHm3/CJ3Nh4V0zXLuWN31DRm1b5IvufuYESP/vuX/y LXK+J9Ne2sdQsfM+5LfeSn/XN44a+p7nwzZTadaaVKEkihjgg+fukbo+P+BeVXAeIfAz3M9ojx/667td7/wDXTUJL mb/xyvExeX+2nz0yDM+EGtanP4mXQ7uSR0SXUrh3f+Py/Ihrqvif4YEN3p/xI0fT5LnWPDb+b5UP37m2b5Jo/wD visT4N6dMmtNqF1G8LrpfnOh/v3V5O/8A7Sr1zzo/ +etd9NSoxjCRqJZ3MV5FHdQn5Jo1dasj734VznhmWwtoRo2nW80cdv5jok3VR5r/APjmfu+1dBVzIDZ+831ia/4 a07XYY4LqAOEljf8A75mjf/2lVnWNSGkxx3B5UtI7/wC4qO/9KW21W2uCm1vvysn/AHzv/wDjVQZHh3x6+FC2/ wAP9Y8QaOxvLvTYPOa2ki/1kO/95/OV6/KfWIUTUp5E/wBmv268fzRxeB/EE7v+6TSrt2+nkvX4izJ9su5/3n39vz /8Arx8Zye1LHWb741qZ6zNKm+7Wm9cQENFFFADXqulWKqQ/wAX+81AD0ov/wDjxuf+uEn/AKBQlS3H/HvL/ wBcmoQI/Vn9j/U5fiN+zH4T/wCEgMge0hl0wun7rekLvGP/AByuB/4KUon/AArLw5J/Gmr7P+ +kpf8Agmv4qn174K654d8zY+ia1IiO/wD02TfR/wAFE3t7D4L+HdOvtR8+9fW1ETv9+bbDJvr1sTy/VzWHxH5wa x/yDp/92tuz+4tYWq/8eE/ +5W7Yf8e8VeatjJlK5/5DN5/1wh/9qVzOpQ73l/266u5TZqtzJ/fto6x4bO41K+Sxgj3yzNsSiAFvXk2eFfC8f+1ff+hx 1iXP/LL/AHa2/Ej/APFP+Gk/ufbP/Q465rVdStbDyPtcmzevyf7ddxjAneztbyPy7u3jnT/brQR/Jj/1cj1Ss5kuYIp0+4 676ZretroNj9uk+55ip/31WBZrJeXH/LDS7iT/AL4/+Lqpreq6zYaVeXUGlyI6QNsfzU+SucvPiL9j8qS1t7e63/P8kr1 btviLLNPBBfW9unnMqbPN/vPVckzY7DTbl5tD0yef78yxu7/3/kro7T/UrXM6xNs+wwfx10FnN/oq1kUcf4//AOQ
Copyright � Synology Inc. All rights Reserved.
282
Synology Surveillance Station Web API
la/8AXBa5d/8AVv8A7rV1HxC/5CsH/XBa5eb/AFEv+61cEv4h1Q+A8Xu5tlxLJ/tV9eWuqtc/B/4ead/c0tpX/wC+9 iV8fam+6ST/AHq9z8K/Ejw2fCWjadd6xHBcWFktpsff/C8n+xXXmNCc8PFwLw04HrvgPQYtb1ny57fz0RfufwfNU vj/AOIXwi8AeI7zwzfeA7i9uLNY97wy/JvkTf8A365Lwl8Y9E8MSNJY6pp87vt+d/8AZroNS+N+kaxB/wATnT/D90 k38b/x7a8HBx9hVlOrCRtXfP8AAekeBvCXg3xb4ctvEEnheS1+0/Ps+1P/APF1p3PhLRvDcGq32gWfkXH9n3Hz+b 5v8FeeWH7QmlpBFaWNtoaRQrsREuvuV6Gmqy3n2OC+j2S6laXXyf8AbGSu6FT3jgnz/bPknUtV8YPfT+R4ouIE eeT5PKT5PnqKHWPEqJ5c+sSTv/f8pKt36bL6VP8Apo1V/JFdr5LGJpaJ4q1nR9Vg1Ke3t72KFvntp/uOlfS2m6b8P vE/hyC+0rR7OfTLxfO8nyvnR/46+WXSrH/CW+KtNsYtNsfEF5a2kLfJDBL5VRPn+wRM+mIdB8PpHr19o+nyJ/xL5 oX+/wDf2f7deRIkqSXzySSOk0u9K2/G3xXuvAEF94cg1CSB9V02xe33xPKnzJJ5yff/AIq8n1Xxnq/iHw5PPptnHay 23zzXMET7Jk/4HW1GMx/UKnxnS36eYkv+7Xi/xOhaGSxf/ZkWvTfCvip9VnttGgjjvW/juXl+fZ/ubFrjfjFbIm7Z/Bc 1vTn+8M4UZ05nk/nL/wA85alS4jSnolS+Sr12ylE6CWHUoqtpeW71ShtoP+edaENpZv0tI6xnyGRn6xfolrsgk+d6 5wSY7Vt+ILaC2ePyYI031BZ+Gdbv7Rb600+SaF2K7krvpW5CD+hj44eF/D/xf8HywWMsCahCi3Fjcp9+aFv7lfPXg /xNq954Z17wPrFrNBqWg+HofC77/wDl5fUNV/16f7yV7WPFRvEV4bLyLq5luoWs8+Vs1CH/AI/LFP8AeT9/F/t1 5F43S1tvE3h/4r6dBJqP9mz2d9qCQffvNP8AO3pJ/wB/Iv8AgDxbP40ry8Nmn+2wpfYkelCB738LwNQ8Va5fD7s vjG+RP9yzs47X/wBDr29a8Z/Z7dbzwtomqx/8xS21DW3/AO36889K9kTv9K+kxi/eWfQ46nxj6yvENsl1YfZZPu3 M0MTf991q1XlXfJD/ANdP/ZK5iByXMLuyB+UbZVTV0VrUv/cEjf8AkN68/wDEHidrP+0GRZ9ywaky/wC+tzBbJTr 7xq1tLeW5idwqaiF/7Z3sFsn860SA6Dw4mn6HdX0c80cT+Xa2/wA//TOFP/jtdcu2vn34l69511beRJ8qazNvf+5t mjh/9pU74Y/GG/tYI9L8TXAmiMe+KZ/9yd//AGlXl1MfFYl0ZgejeOfE48Garp+r3aKLC4uYbS7lbpFC3mfP/wABfy q7iuS1HTdM+Inhm90+7j2Lcxx/8AZoUcf+jah+F+t32raA1hrkkf8AbeiTNp+ooB911+4//A4/Kf8AGvQKOo1TSLX VY0S5/g+7XKS"&createCopy=false&byteSize=51039&method="Edit"&id=156744&height=640
Response
Key recordData snapshotId success
Value <Details Object> <integer> <boolean>
Description
Availability
Information and image about the snapshot. 1 and onward
Id of the saevd snapshot.
1 and onward
Success or not.
1 and onward
<Details Object> definition
Key
Value
id
<integer>
height width
<integer> <integer>
recordId
<string>
camName fileName
<string> <string>
imageData modifiedCnt markAsDel
<string> <integer> <boolean>
locked byteSize createdTm
<boolean> <integer> <integer>
lastModifiedTm <integer>
update_time
<integer>
Description
Id of snapshot. Height of snapshot.
Width of snapshot. Identification in cms "{server_id}_{id_on_server}".
Camera name of the snapshot. File path where the snapshot is saved.
Image data in base64 format. Modified count.
True if the snapshot is mark as deleted. True if the snapshot is locked.
File size of snapshot in byte. Timestamp of the last modification of snapshot image. Timestamp of the last modification of snapshot image. Timestamp of the last modification of snapshot database.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
283
Synology Surveillance Station Web API
{ "data": {
"snapshotId": 156744, "recordData": {
"modifiedCnt": 1, "update_time": 1425360178, "imageData": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQk KDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQ EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAKAAeADASIAAhEBAx EB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDA AQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFV WV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJ ytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL /8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNO El8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZa XmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADA MBAAIRAxEAPwD9EvEXjLSG0+bVdMv7e5hTRLzUIpoZPMR/uIh/Wq1hr2y+XSvM+aHVrLSdv+3Hbee9fL0dhr3 wf8aXPgDXI/8AQfE9zY6dbzfwW269jd9n+xIn/j9eqJ4lgs5J/EUcg2x3/i3xG2/+5ap9lT/0bW2HlGpTNT0G+8ZxXH hm8vYJP3r6Dfagn/baX9zWsvhR20rU7ZINlxNp6WCOIkjOwJ/f/wDi68z8J2k2qzXGjuY3jttO8MaPL/vt/pM36S1 9EJ90VrXUaXwkzPCvEOm3VnfalqXl+X5Mutamn/bGyjsof/RtZlkjafrFnBIn7mw1WztHT+4mn6NI7/8AkSvc9S0K w1SKSOeIDzo2hZv9hm+cf8CrgPFPhqTTGv8AV7SON3S01a7Tf9x57jy0T/xypg4S0QHm3/CJ3Nh4V0zXLuWN31 DRm1b5IvufuYESP/vuX/yLXK+J9Ne2sdQsfM+5LfeSn/XN44a+p7nwzZTadaaVKEkihjgg+fukbo+P+BeVXAeIfAz3 M9ojx/667td7/wDXTUJLmb/xyvExeX+2nz0yDM+EGtanP4mXQ7uSR0SXUrh3f+Py/Ihrqvif4YEN3p/xI0fT5LnW PDb+b5UP37m2b5Jo/wDvisT4N6dMmtNqF1G8LrpfnOh/v3V5O/8A7Sr1zzo/ +etd9NSoxjCRqJZ3MV5FHdQn5Jo1dasj734VznhmWwtoRo2nW80cdv5jok3VR5r/APjmfu+1dBVzIDZ+831ia/4 a07XYY4LqAOEljf8A75mjf/2lVnWNSGkxx3B5UtI7/wC4qO/9KW21W2uCm1vvysn/AHzv/wDjVQZHh3x6+FC2/ wAP9Y8QaOxvLvTYPOa2ki/1kO/95/OV6/KfWIUTUp5E/wBmv268fzRxeB/EE7v+6TSrt2+nkvX4izJ9su5/3n39vz /8Arx8Zye1LHWb741qZ6zNKm+7Wm9cQENFFFADXqulWKqQ/wAX+81AD0ov/wDjxuf+uEn/AKBQlS3H/HvL/ wBcmoQI/Vn9j/U5fiN+zH4T/wCEgMge0hl0wun7rekLvGP/AByuB/4KUon/AArLw5J/Gmr7P+ +kpf8Agmv4qn174K654d8zY+ia1IiO/wD02TfR/wAFE3t7D4L+HdOvtR8+9fW1ETv9+bbDJvr1sTy/VzWHxH5wa x/yDp/92tuz+4tYWq/8eE/ +5W7Yf8e8VeatjJlK5/5DN5/1wh/9qVzOpQ73l/266u5TZqtzJ/fto6x4bO41K+Sxgj3yzNsSiAFvXk2eFfC8f+1ff+hx 1iXP/LL/AHa2/Ej/APFP+Gk/ufbP/Q465rVdStbDyPtcmzevyf7ddxjAneztbyPy7u3jnT/brQR/Jj/1cj1Ss5kuYIp0+4 676ZretroNj9uk+55ip/31WBZrJeXH/LDS7iT/AL4/+Lqpreq6zYaVeXUGlyI6QNsfzU+SucvPiL9j8qS1t7e63/P8kr1 btviLLNPBBfW9unnMqbPN/vPVckzY7DTbl5tD0yef78yxu7/3/kro7T/UrXM6xNs+wwfx10FnN/oq1kUcf4//AOQ la/8AXBa5d/8AVv8A7rV1HxC/5CsH/XBa5eb/AFEv+61cEv4h1Q+A8Xu5tlxLJ/tV9eWuqtc/B/4ead/c0tpX/wC+9 iV8fam+6ST/AHq9z8K/Ejw2fCWjadd6xHBcWFktpsff/C8n+xXXmNCc8PFwLw04HrvgPQYtb1ny57fz0RfufwfNU vj/AOIXwi8AeI7zwzfeA7i9uLNY97wy/JvkTf8A365Lwl8Y9E8MSNJY6pp87vt+d/8AZroNS+N+kaxB/wATnT/D90 k38b/x7a8HBx9hVlOrCRtXfP8AAekeBvCXg3xb4ctvEEnheS1+0/Ps+1P/APF1p3PhLRvDcGq32gWfkXH9n3Hz+b 5v8FeeWH7QmlpBFaWNtoaRQrsREuvuV6Gmqy3n2OC+j2S6laXXyf8AbGSu6FT3jgnz/bPknUtV8YPfT+R4ouIE eeT5PKT5PnqKHWPEqJ5c+sSTv/f8pKt36bL6VP8Apo1V/JFdr5LGJpaJ4q1nR9Vg1Ke3t72KFvntp/uOlfS2m6b8P vE/hyC+0rR7OfTLxfO8nyvnR/46+WXSrH/CW+KtNsYtNsfEF5a2kLfJDBL5VRPn+wRM+mIdB8PpHr19o+nyJ/xL5 oX+/wDf2f7deRIkqSXzySSOk0u9K2/G3xXuvAEF94cg1CSB9V02xe33xPKnzJJ5yff/AIq8n1Xxnq/iHw5PPptnHay 23zzXMET7Jk/4HW1GMx/UKnxnS36eYkv+7Xi/xOhaGSxf/ZkWvTfCvip9VnttGgjjvW/juXl+fZ/ubFrjfjFbIm7Z/Bc 1vTn+8M4UZ05nk/nL/wA85alS4jSnolS+Sr12ylE6CWHUoqtpeW71ShtoP+edaENpZv0tI6xnyGRn6xfolrsgk+d6 5wSY7Vt+ILaC2ePyYI031BZ+Gdbv7Rb600+SaF2K7krvpW5CD+hj44eF/D/xf8HywWMsCahCi3Fjcp9+aFv7lfPXg /xNq954Z17wPrFrNBqWg+HofC77/wDl5fUNV/16f7yV7WPFRvEV4bLyLq5luoWs8+Vs1CH/AI/LFP8AeT9/F/t1 5F43S1tvE3h/4r6dBJqP9mz2d9qCQffvNP8AO3pJ/wB/Iv8AgDxbP40ry8Nmn+2wpfYkelCB738LwNQ8Va5fD7s vjG+RP9yzs47X/wBDr29a8Z/Z7dbzwtomqx/8xS21DW3/AO36889K9kTv9K+kxi/eWfQ46nxj6yvENsl1YfZZPu3 M0MTf991q1XlXfJD/ANdP/ZK5iByXMLuyB+UbZVTV0VrUv/cEjf8AkN68/wDEHidrP+0GRZ9ywaky/wC+tzBbJTr
Copyright � Synology Inc. All rights Reserved.
284
Synology Surveillance Station Web API
7xq1tLeW5idwqaiF/7Z3sFsn860SA6Dw4mn6HdX0c80cT+Xa2/wA//TOFP/jtdcu2vn34l69511beRJ8qazNvf+5t mjh/9pU74Y/GG/tYI9L8TXAmiMe+KZ/9yd//AGlXl1MfFYl0ZgejeOfE48Garp+r3aKLC4uYbS7lbpFC3mfP/wABfy q7iuS1HTdM+Inhm90+7j2Lcxx/8AZoUcf+jah+F+t32raA1hrkkf8AbeiTNp+ooB911+4//A4/Kf8AGvQKOo1TSLX VY0S5/g+7XKS",
"height": 640, "lastModifiedTm": 1425371053, "fileName": "P1347-20150303-1624131444-Modified-1.jpg", "id": 156744, "locked": true, "recordId": "0_156744", "byteSize": 51039, "width": 480, "camName": "P1347", "createdTm": 1423539583, "markAsDel": false }, "success": true } }
2.3.34.3 CountByCategory method
Get the count number of snapshots in category.
Request Parameter
keyword
from
Value <string>
<integer>
to
<integer>
timezoneOffset <integer>
Description
Optional. Name of the camera vendor.
Optional. UTC unix timestamp, used to select all snapshots later than this timestamp from database, 0 means no filter.
Optional. UTC unix timestamp, used to select all snapshots earlier than this timestamp from database, 0 means no filter.
Optional. The offset to be shifted in the total result. If not specified, the offset will be 0.
Availability 1 and onward 1 and onward
1 and onward
1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? from=0&keyword=""&api="SYNO.SurveillanceStation.SnapShot"&to=0&version="1"&method="CountByCat egory"&timezoneOffset=480
Copyright � Synology Inc. All rights Reserved.
285
Synology Surveillance Station Web API
Response
Key date total
Value
Description
<CountByDate Object> Count of snapshot.
<integer>
Total number of snapshots.
<CountByDate Object> definition:
Key -1 yyyy/mm/dd
Value <integer> <TimeCnt Object>
Description Total number count. Number count of log of yyyy/mm/dd. (Ex:1990/05/09)
<TimeCnt Object> definition:
Key -1 am pm
Value <integer> <integer> <integer>
Description Total number count in this day. Number count of snapshot in am. Number count of snapshot in pm.
Example:
{ "data": {
"date": { "2015/01/03": { "am": 0, "-1": 2, "pm": 2 }, "-1": 2
}, "total": 2 } }
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
286
Synology Surveillance Station Web API
2.3.34.4 ChkContainLocked method
Check if there is any snapshot locked.
Request
Parameter id
Value <string>
from to keyword
<integer> <integer> <string>
Description
Availability
Optional.
1 and onward
The specified snapshot id selected from database.
If not specified, the id list will be empty string and have no
effect.
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots later than
this timestamp from database, 0 means no filter.
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots earlier
than this timestamp from database, 0 means no filter.
Optional.
1 and onward
Query keyword.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? from=0&idList=""&keyword=""&api="SYNO.SurveillanceStation.SnapShot"&to=0&version="1"&method="C hkContainLocked"
Response
Key containLocked total
<integer> <integer>
Value
Example:
{ "data": {
"total": 3, "containLocked": false }, "success": true }
Description
Availability
True if there is any snapshot locked. 1 and onward
The number of snapshots selected by 1 and onward
the given filter condition.
Copyright � Synology Inc. All rights Reserved.
287
Synology Surveillance Station Web API
2.3.34.5 UnlockFiltered method
Unlock snapshots selected by filter condition.
Request
Parameter from
Value <integer>
to
<integer>
keyword
<string>
Description
Optional. UTC unix timestamp, used to select all snapshots later than this timestamp from database, 0 means no filter.
Optional. UTC unix timestamp, used to select all snapshots earlier than this timestamp from database, 0 means no filter.
Optional. Query keyword.
Availability 1 and onward
1 and onward
1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? from=1423497600&version="1"&keyword=""&to=1423584000&api="SYNO.SurveillanceStation.SnapShot" &method="UnlockFiltered"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
288
Synology Surveillance Station Web API
2.3.34.6 List method
List snapshots information.
Request
Parameter idList
Value <string>
start limit from to keyword imgSize
<integer > <integer > <integer > <integer > <string> <integer >
blIncludeAuInfo <boolean>
blIncludeRecCnt <boolean>
camId
<integer >
Description
Availability
Optional.
1 and onward
The specified snapshot id selected from database.
If not specified, the id list will be empty string and have
no effect.
Optional.
1 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
Optional.
1 and onward
The number of the snapshots to be selected in database.
If not specified, the limit will be 0.
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots later
than this timestamp from database, 0 means no filter.
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots earlier
than this timestamp from database, 0 means no filter.
Optional.
1 and onward
Query keyword.
Optional.
1 and onward
Set image size that will append in the return data.
0: Do not append image
1: Icon size
2: Full size
Optional.
1 and onward
Set true to append snapshot auto-update information in
the return data.
Optional.
1 and onward
Set true to append snapshot category count in the
return data.
Optional.
1 and onward
The sanpshots of the specified camera id selected from
database.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? from=0&idList=""&keyword=""&to=0&api="SYNO.SurveillanceStation.SnapShot"&blIncludeRecCnt=false&st art=0&blIncludeAuInfo=false&limit=3&camId="16"&version="1"&method="List"
Response
Copyright � Synology Inc. All rights Reserved.
289
Synology Surveillance Station Web API
Name auInfo data
timestamp total
Value
<string> Array of <Details Object> <boolean>
<integer>
Description Information for auto update Details of snapshot.
Time stamp Total number of snapshots.
Availability 4 4
4 and onward 4 and onward
<Details Object> definition
Key byteSize camId camName createdTm DisplayTm fileName height id total width recordId imageData modifiedCnt markAsDel locked lastModifiedTm
Value <integer> <integer> <string> <integer> <integer> <string> <integer> <integer> <integer> <integer> <string> <string> <integer> <boolean> <boolean> <integer>
update_time
<integer>
Description The snapshot size. The camera Id of snapshot. The camera name of snapshot. The timestamp of snapshot created. The timestamp of snapshot displayed. The file name of snapshot. The image height of snapshot. The Id of snapshot. Total number of snapshots. Width of snapshot. Identification in cms "{server_id}_{id_on_server}". Image data in base64 format. Modified count. True if the snapshot is mark as deleted. True if the snapshot is locked. Timestamp of the last modification of snapshot image. Timestamp of the last modification of snapshot database.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Example:
{ "data" : { "data" : [ { "byteSize" : 81917, "camId" : 16, "camName" : "IP8331-001", "createdTm" : 1545965208, "displayTm" : 1545965208, "fileName" : "IP8331-001-20181228-1046483242.jpg", "height" : 480, "id" : 12, "imageData" :
"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKC goKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABaAHgDASIAAhEBAxEB/8QAHwAAA QUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEG E1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZ WZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ
Copyright � Synology Inc. All rights Reserved.
290
Synology Surveillance Station Web API
2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgE CBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJ ygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkp aanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA PwD5/wDD8M91DH5sUCwx4CkxAk/nWs9hDFyipnGOUB7Af0FacMKQxLHGMKBUFwM8VNxGOtmkZYqsZLO ZDujU85zjBGMe1SRwgMcLGAW3HbEq8/UDNWmXmp7eHcRQA+1g6GtKKHpT7S34HFaMNv7UwIYYeKuxw8 dKljh4q5DD7UwKqQe1PEJrQWHA6U4Rc9KAKAt/apFg46VoLDkdKkWD2oAy3hwprHvIdxPFdRcxbUNZ9tZ/abx ExkZyaTAhsrDybEEjBPJoro7u3Cx7QOBRSsKx5gOlVphk1OflFQuc0DIUj3NWnY2+SOKr2ke5xXQ2VvgCmBJa2/A 4q/Hb47VPbQe1Xlh44pgUkh9qtQw+1SbKsRJigZF5WBTli5qU4FKtACpHT1QU5OadjANAGbfkAYq94ds8xvcM OvArOuVaacRp1Y4FdlaW629nHEo+6tIDGvY+DRVu9TrRTA8XnXjiqnOcVo3SYFQRxZOakRZ06Ms4rqLOLIFY+m QYxxXUWUWFFMCe3jx2q0VwKfHHgUrDApjK5GDSmQIuaimkAPJ4qk8xkfA6UAXBJuNWolLDpTLG0LAE1qxwq g5oAghjx1ptyRGpJq1uQHArE1mdy+xAaAL/AIftvtF485GVj4H1rpTwKoaBAttp8ceQXIy31rSZaSAzbtetFWbiPIN FMDxG55waSAAuBU16ERFZXV425R1OQRTbTbvBzUiNq0UKoNXU1m0t3CM+W9BXO6zqItbfZGfnIrm7SVpZg MksxpgexWF9Bdr+6bn0ovZPLiJrA0aN7GSDeuN/c1e1i8jMnlLIrEddvSmMpyzNKxA6U+1kjjbL8n0re8O+HTqCC W5k2RntXVx6BotqvzFC3ck0rMDl7C6aVMIoFW1hlkb5m/WujSy0XGI2TPsabc6Zp4jPlsQf96qsBlQWaqpZjVe10 4Xd0z7fkj5P17VYawYbhHcvj0zTrSG+toykUilScnIosBUnS4tHLLkrSjVxJbyIGCTbTtJ9auzS3e3bJArj2rn9XtQ6lhG 0T+1KwHRaddpf6fFOhB3Dkeh70V51pN7f6NeTooL2zneAexPWikK5wPiLwp4m8KxyBEe707Od8QLKPcjqtVvC N9c6ldbCjBE+8ccV7z4h8VQzI0GmQlEPy+Y/LH/CuJ1JYrK1dkjRC3J2jGT602rCOI8Svm6AB6Va8IWivqMMso/dq wPSsi9c3V4Mc5OK6aHR/FNpbxXGg/ZWjP3kkIz+R/xpdRndeIIIvtsaKzAFfwHFVbPSLNXDFt59S1afidLqLTobqKF JbowKxh/vPt6fnXCweKfEcK/P4KnJ9VLY/lVMD0Xe0EICTbVHYGs2eVXYlpGY/jXKnxf4nlTbF4MlHu8hH9BVRtX8 ZSnK+G7aMH+/L/8AZUh3OztrgwyAqDiuha5Mlmkig89a8xtrrxk7gvotiV7gTYP4fNXf6BqEV/pMkUsUlvfQnbLbS Ah1PbHqD60CuS6RNLd6udxYW8Iy3uT0H9a1rzU4LQ/M2OelVrKznittsUZDMSzM3HNMn02ds70Rs09RmrYaj BdjCspb071ZntEnH3P0rjrzTZ4SJoEaGVeRjoa6fwtra34Nrcr5d2g5U/xe4ouxGbqGjo4OForsJ7ZHHIop6Dsbll4E8 P8AhHRbi9khF7exxH9/cDPzY/hXoP5+9fOfjeXdHMx6sTX0v8T3YaUVDHb6Z4r5f8b/AHPxpCZzHhiw+1anEXHy A5NexRNBFCkUQJB6nHSuF+HqKZmyqn6ivR9qi3kwoHynt7UISM/Xw6XNpKUzH5QAb1x2rPbUJJ49sMbADqxF S+IXZdP04BmA8mQ8HvXIa5czp4btmSaVWY4JDkE9aN2M6aW42xiR5QqjqWOAafbaxpbymAXMTTYBCodxb2 AHU14PrN1cNDNunlOCMZc8V6x+z/bwlNUnMMZmXCiQqNwG0cZ64pCO5Cx20JlkJjOM7T94f4Umg67a6tqZs rMtCVHzSEA7j6AmuW8ZO32qwTcdski7xnhvmHX1p/hsBfEJ2jG25dVx2AdsAUN2C56FdwXFq4PmyOD/AHjVU y3QYFZMH0xmtvxFxbcetZdpy659KZRftpWnTbcwjp1FY+s6XsmW6tG2TIcq47ex9q6u2A2DgVl6rw7gdMUxFrQ tTTUrQM2FnX5ZE9DRXH6C7L4nnVWIBVSQD1oqQP/Z",
"lastModifiedTm" : 1545965208, "locked" : false, "markAsDel" : false, "modifiedCnt" : 0, "recordId" : "0_12", "update_time" : 1545965210, "videoTm" : 1545965208, "width" : 640 }, { "byteSize" : 88795, "camId" : 16, "camName" : "IP8331-001", "createdTm" : 1545964940, "displayTm" : 1545964940, "fileName" : "IP8331-001-20181228-1042206839.jpg", "height" : 480, "id" : 11, "imageData" : "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKC
Copyright � Synology Inc. All rights Reserved.
291
Synology Surveillance Station Web API
goKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABaAHgDASIAAhEBAxEB/8QAHwAAA QUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEG E1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZ WZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ 2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgE CBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJ ygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkp aanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA PwD5+0CKe5ij8yKBYYxhSYgSfz61qPZRRcqqZxjlAewH9BWlBCkMSxxjCgVBcDmpuIyVtEjLELGSzmQ7o1POc4w RjHtUkUADEhYxk54QA/nVllzU0EOW6UwH20Oe1aMUPtUlrb8dK0Ibf2pjIIYauxQ8VNHBjFXIYaAKqW/tTxBWg sPtThFzQBQEHtT1gz2rREPFPWH2oAypIMA1j3sOWNdTcRYSs62tDc3iJjjOTSYmQ2Vh5NkCR8zcmiuju7cJHtA6 CiiwHmY6VWlGTU7fKKhY5pARJGSa0rK356VXtU3MK6Cyt8YOKaAltbbgcVfjt8DpU9rB04q8sOBTGUUh9qswxe 1SbOasRR8UAR7OKVI8mpWwDilQgUAKsYxTggxT0GaXGAaAM6+IAxV3w5Z5ie4YdeBWfdK004ReSxwK7G1t1t 7OOJR90YoAx72Pg0VavE60UAeNTpgVUwc4rRuVwBUCRZNIRY0+PLDiuos4sgcVj6bDyK6iyiwopgWLePAFWSv FPjTApWwBzQMrEYNKZAiVFNIASc8VSeYyPgdKALgkLGrUKFu1NsbRnAJrVjhWMc4oAghix1pl0RGpq3vUdDW HrU7l9kYNAF7w/bfabxpyMpHwPrXTEYqhoEC22nxR5BcjLH3NaTJ6UIDNul5NFWLiPIJooA8TuOcUQDcwAqW8 VERWV1eN+UdTkEU2027gc0hG1aIEAJq6ms2luwRny3tXO6xqItoNkZ+YiuctJmlmHJLMaLjPYLC/gu0/dNz6UXk nlxE1gaNE9jJDvXBfuavavexmXylkVj329KYFSaZpGIHSn2skcbZfk+lbvh7w7/aCiW5k2RntXVx6BotqnJQnuWNFg OZsbppUwigfWrIgkkb5n4rpEstFxiMpn2NMuNMsBGfLYg/WnYDLgs1VCx7VWtdOF3ds5X5E5P17VYewYbhHcv j0zT7WG+toykUilScnI60WApzrcWjllyVFOGriS3lQNsm2naT61cmlu9u2SBXHqK5/V7UOpYRtG/tRYDotOu0v9Pi nQglh8w9D3orzrSb6/wBGvJ0ALWzHeAexPWipFc4TxF4U8S+FY5Akb3WnZzviBZR7kdVqv4TvrnUrnYUZVT7xxx XvHiHxXBOjwaXDsQ/KZH5Y/wCFcPqSxWVq7JGiFvmOBjJqmgOI8SPm62irXhG1V9RhllH7tWB6VlXshurzjkk10s Gj+KLS2iuNC+ytGeqSEZ/I/wCNIDufEEEX21I1dlBH4DiqtlpFmG3bt59WatPxPHdRadBdRQpLcmBWMX959vT86 4eHxT4hhXD+DJyfVS2P5U2M9C3tBCAk21QOgNZ08gZjukY1y58XeJpUKxeDZBx1eQj+gqo2reMZWyvhy2jB/vy //ZUgOxtrgxSAqDjNdE1yZLNJFB5rzG1ufGLuGfRbEr3Amwfw+avQNA1CK/0mSKWKS2voTiW2kGHUnpj1B9aY D9Jllu9XO4kW8Iy3+0T0H9a1rzU4LQ/Me/Sq9nZzxW+2KIhmO5mbjJqOfTbhs70Riexo1A1bDUYLsfKylvTvVie0S dTlK4+806eEiaBGhlXkY6Gum8La0t+ptblfLu0HKn+L3FO4GbqOjo4OEFFdhNbo45WijQDobLwH4e8IaJcXskIvb2 OI/v7kZ+bH8K9B/P3r5v8AG8xZJ2PViTX018UXYaSVDNtz0zxXy741+431oEzmPDNh9q1OLePkBya9iiMEUKxRA kHqfSuH+HqI0p3Kp+or0RlAhkwAPlPT6UrAZ+vh0ubSXblPKADdjjtVBr9548QIwUcFiKf4gdxYacAzAeVIeD35rk9 duZ08PWrJNKrNwSHIJ60DOmluNkayPKqoOpYgA0+21jS3lNv9piabAYKh3FvYAdTXhGr3Vw8Eu+eVsMMZcmv V/gHbwldUmMUZmXCiTaNwG0cZ9KQkdwBHbQmWQlDjO0/eH+FN0HW7XVtUNnZl4So+aUgHcfQE1y/i92+1 2SbjskkXeueG+YdfWpPDQC+IjtAG25dVx2AdsAUXs7Bc9AvLe4tWB86Vwe7GqpmugwKybT6YyTW54k4thjjms qz5cZ9KoZetpGnTbdQ9uorI1jS/LlW6tG2Socqw7fX2rq7YDYOBWXqnDyAdMUAWdC1JNSswx+WZflkT0NFcjoT svieZVYhSikgHrRUgf//Z",
"lastModifiedTm" : 1545964940, "locked" : false, "markAsDel" : false, "modifiedCnt" : 0, "recordId" : "0_11", "update_time" : 1545964958, "videoTm" : 1545964940, "width" : 640 }, { "byteSize" : 87135, "camId" : 16, "camName" : "IP8331-001", "createdTm" : 1545964940, "displayTm" : 1545964940, "fileName" : "IP8331-001-20181228-1042205291.jpg", "height" : 480,
Copyright � Synology Inc. All rights Reserved.
292
Synology Surveillance Station Web API
"id" : 10, "imageData" : "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKC goKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABaAHgDASIAAhEBAxEB/8QAHwAAA QUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEG E1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZ WZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ 2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgE CBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJ ygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkp aanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA PwD5+0CKe5hj8yKBYYwApMQJP59a1HsoouVVM4xygPYD+grSghSGJY4xhQKhuBzipuIyFtEjLELGSzlzuiU85zjB GMe1SRQAMSFjGSDkIAfzq0y5NS28OTTAktYc9q0Y4fan2tvwOK0Ibf2pjIYYfarsUPHSpY4MYq5DDQBVSD2p4gr QWHA6U4Rc0AUPI9qkWD2rQEPFPWHjpQBlSQYBrHvIsseK6m5i2pWfbWn2m8RMZGcmkxENlY+TYgkctyaK6 K7twkeAOgopWA8zHSq8wyTUzfKKhY5oAhSPca07K35qC0Tc4rfsrfGDimgJbW24HFaEdvxU1rB04q8sOBTGUV h9qswxVL5fNTxR8UAR7OKVI8mpWwDilQgUAKsYxzTlQYp6DNLtwDQBnXxAGKu+HLPMclww6nArPuVaacIvJY 4Fdja2629nHEo+6MUgMe9j4NFWrxOtFMDxmdMCq2DmtC5XAFQJFk0hFjT48sOK6iziyo4rH02HkV1FlFhRTAs W8eMVZK8U+NMClOAOaBlZhg0pkCJUU0gDE54qk8xkfA6UAXBIWNWoULdqbY2jOATWrHCsY5xQBBDFjrTLoi NTVveo6GsPWp3L7IwaAL2gW32i8acj5I+B9a6YjFUNAgW20+KPILkbm+prSZPShAZt2uc0VYuI8gmigDxO45xRA MuAKlvFREVldXjflHU5BFNtNu4HNSI2rNAgBNXU1m0t3CM+W9q53WNRFtBsjPzEda5y0maWYcksxpjPYLC/gu 0/dNz6UXknlxE1gaNE9jJDvXBfuavavexmXylkVj329KYFSaZpGwOlPtZI42y/J9K3fD3h3+0FEtzJsjPaurj0DRbVOS hPcsaLAczY3TSphFA+tWRBJI3zPxXSJZaLjEZTPsaZcaZYCM+WxB+tOwGXBZqqFj2qta6cLu7ZyvyJyfr2qw9gw3C O5fHpmn2sN9bRlIpFKk5OR1osBTnW4tHLLkqKcNXElvKgbZNtO0n1q5NLd7dskCuPUVz+r2odSwjaN/aiwHRafd x3+nxToQSw+Yeh70V51pN7f6NeToNzWzneAexPWipuK5wviLwp4l8KxyBI3utOznfECyj3I6rVbwne3OpXWwo wVPvHHFe8eIfFcE6PBpcOxT8pkflj/hXD6ksVlbO6RojNliQMZNU0BxHiR83O0dKteEbVX1GGWYfu1YHpWVeyG 6vBjqTXTQaP4otLaO40L7KyHqkhGfyP+NIDuPEEEX21I1dlBH4DiqtlpFmG3bt59WatPxPHdRadBdRQpLcmBW MX959vT864eHxT4ihX5/Bk5PqpbH8qbGeheY0EICTbVHYGs2eQMxLSMa5g+LvE0qFYvBsg92kI/oKqNq3jGVsr 4ctox/ty/wD2VIDsba4MUgKg4zXRNcmSzSRQea8xtbrxg7hn0WyK9wJsH/0KvQNA1CK/0iSKSKS3voTtktpBh1P bHqD60wH6TLLd6udxIt4RlvcnoP61rXmpwWh+Y9+lVrKzuIbbbFEQzHczNxk0yfTbhs70Riexo1A1bDUYLsfKylvT vVie0SdTlK4+ 806eAiaBGhlXkY6Gum8La0t+v2W5Xy7tByp/i9xTuBm6jo6ODhBRXYTW6OOVoo0A6Gy8B+HvCGiXF7LCL29jiP 7+5G75sfwr0H8/evm/xtMWSdj1Zia+mvii7DSSoZtuemeK+XfGv3T9aBHM+GLD7Vqce8fIDk17DEYIoViiBIPU+lc P8PERpDuVT9RXojKBDJgAfKen0pAZ+vh0ubSXblPKADeuO1UGv3mjxAhCjgkin+IZHWw04B2A8qQ4B781yeuX M6eHbZkmlVjwSHIJ60DOmluNsayPKqoOpYgA0+11jS3lMH2mJpsAhUO4t7ADvXg+r3Vw8Mu+eVsEYy5NesfA K3hK6pMYozMuFEhUbgNo4z6UhHcgR20JlkJQ4ztP3h+fSmaDrdrq2pmztC8JUfNKQDuPoCa5fxe7fa7JNx2ySLv GeG+YdfWpPDYC+IjtGNty6rjsA7YAovZ2A9AvLe4tXB86Vwf7xqqZroMCsm0+mMk1ueJOLYY45rKs+XGfSqGXra Rp023UPbqKyNY0vy5VurRtkqHKsO3t9K6u2A2DgVmapw8gHTFPcCxoWpJqVmGPyzL8siehorkdCdl8TzKrEKU UkA9aKgD/2Q==", "lastModifiedTm" : 1545964940, "locked" : false, "markAsDel" : false, "modifiedCnt" : 0, "recordId" : "0_10", "update_time" : 1545964956, "videoTm" : 1545964940, "width" : 640 } ], "timestamp" : "1545965385", "total" : 12
Copyright � Synology Inc. All rights Reserved.
293
Synology Surveillance Station Web API
}, "httpd_restart" : false, "success" : true }
2.3.34.7 Unlock method
Unlock the snapshots to allow users to delete the snapshots.
Request
Parameter objList
Value
Description
Array of <ObjItem List of snapshots going to be locked.
Object>
Availability 1 and onward
<ObjItem Object> definition
Key
Value
id
<string>
Description
Availability
Snapshot id in "{server_id}:{snapshot_id}" format. 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&objList=[{"id": "0:1"}, {"id": "0:2"}]&version="1"&method="Unlock"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
294
Synology Surveillance Station Web API
2.3.34.8 TakeSnapshot method
Take a snapshot of the specified camera on the specified server.
Request
Parameter dsId camId blSave
Value <integer> <integer> <boolean>
Description
Availability
DS Id that user want to take snapshot.
1 and onward
Camera Id that user want to take snapshot.
1 and onward
Optional.
1 and onward
Set true to save taken snapshot into database.
true: the taken snapshot will be saved and only return
snapshot id.
false: the taken snapshot will not be saved and return
details of snapshot.
Example: Take Snapshot of camera which id is 69
http://192.168.1.1:5000/webapi/entry.cgi? camId=1&version="1"&blSave=true&api="SYNO.SurveillanceStation.SnapShot"&dsId=0&method="TakeSna pshot"
Response
Name id
Example: { "data": {
"id": 1 }, "success": true }
Value <integer>
Description Id of snapshot.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
295
Synology Surveillance Station Web API
2.3.34.9 GetSetting method
Get the setting of snapshot functions.
Request No parameter is required. Example: Take Snapshot of camera which id is 69 http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.SnapShot"&version="1"&method="GetSetting"
Response
Name setting
Value
Description
<Setting Object> Current setting of snapshot functions.
Availability 1 and onward
<Setting Object> definition
Key dispSnapshot dispDuration
Value <boolean> <integer>
limitTotalSize limitSizeInGb storageMode addTimestamp
<boolean> <integer> <integer> <boolean>
timestampPositio <integer> n
Description
Availability
Display the taken snapshot or not.
1 and onward
Duration that snapshot is showed. 0: Do not show 1 and onward
snapshot
1: 5 seconds after taking
2: 10 seconds after taking
3: 15 seconds after taking
4: 20 seconds after taking
5: Do not hide snapshot after taking
True if the total file size of snapshots is limited.
1 and onward
Limited size of snapshots in giga-byte.
1 and onward
Count of snapshot.0: On the top 1: On the bottom 1 and onward
Append timestamp or not on the downloaded
1 and onward
snapshot.
Position of the appended timestamp. 0: On the top 1 and onward
1: On the bottom
Example:
{ "data": {
"setting": { "timestampPosition": 0, "limitSizeInGb": 1, "storageMode": 0, "dispDuration": 5,
Copyright � Synology Inc. All rights Reserved.
296
Synology Surveillance Station Web API
"dispSnapshot": true, "addTimestamp": true, "limitTotalSize": true } }, "success": true }
2.3.34.10 DeleteFiltered method
Delete snapshots selected by filter condition.
Request
Parameter
Value
deleteAllComman <boolean>
d
from
<integer>
to
<integer>
keyword
<string>
Description
Availability
Optional.
1 and onward
Specify to delete all snapshots or filtered snapshots.
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots later
than this timestamp from database, 0 means no filter.
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots
earlier than this timestamp from database, 0 means
no filter.
Optional.
1 and onward
Query keyword.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? from=1423497600&keyword=""&api="SYNO.SurveillanceStation.SnapShot"&to=1423584000&version="1" &deleteAllCommand=false&method="DeleteFiltered"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
297
Synology Surveillance Station Web API
2.3.34.11 LoadSnapshot method
Get snapshot image.
Request
Parameter Id imgSize
Value <integer> <integer>
Description
Id of the snapshot file to download.
Optional. Set image size that will append in the return data. 0: Do not append image 1: Icon size 2: Full size
Availability 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="LoadSnapshot"&api="SYNO.SurveillanceStation.SnapShot"&id=1&version="1"&imgSize=1
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.34.12 Lock method
Lock the snapshots to prevent users to mistakenly delete the important snapshots.
Request
Parameter objList
Value
Description
Array of <ObjItem List of snapshots going to be locked.
Object>
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&objList=[{"id": "0:1"}, {"id": "0:2"}]&version="1"&method="Lock"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
298
Synology Surveillance Station Web API
2.3.34.13 Download method
Download single snapshot image.
Request
Parameter id
Value <integer>
Description Id of the snapshot file to download.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.SnapShot"&id=1&version="1"&method="Download"
Availability 1 and onward
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.34.14 LockFiltered method
Lock snapshots selected by filter condition.
Request
Parameter from
Value <integer>
to
<integer>
keyword
<string>
Description
Availability
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots
later than this timestamp from database, 0 means no
filter.
Optional.
1 and onward
UTC unix timestamp, used to select all snapshots
earlier than this timestamp from database, 0 means
no filter.
Optional.
1 and onward
Query keyword.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.SnapShot"&id=1&version="1"&method="Download"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
299
Synology Surveillance Station Web API
2.3.34.15 SaveSetting method
Save and apply new setting to snapshot functions.
Request
Parameter dispSnapshot dispDuration
Value <boolean> <integer>
limitTotalSize limitSizeInGb addTimestamp
<boolean> <integer> <boolean>
timestampPositio <integer> n
Description
Display the taken snapshot or not.
Duration that snapshot is showed. 0: Do not show snapshot 1: 5 seconds after taking 2: 10 seconds after taking 3: 15 seconds after taking 4: 20 seconds after taking 5: Do not hide snapshot after taking
True if the total file size of snapshots is limited.
Limited size of snapshots in giga-byte.
Append timestamp or not on the downloaded snapshot.
Position of the appended timestamp. 0: On the top 1: On the bottom
Availability 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? timestampPosition=0&limitSizeInGb=2&api="SYNO.SurveillanceStation.SnapShot"&dispSnapshot=true&ver sion="1"&addTimestamp=true&limitTotalSize=true&dispDuration=5&method="SaveSetting"
Response
Name setting
Value
Description
<Setting Object> Current setting of snapshot functions.
Example:
{ "data": {
"setting": { "timestampPosition": 0, "limitSizeInGb": 1, "storageMode": 0, "dispDuration": 5, "dispSnapshot": true, "addTimestamp": true, "limitTotalSize": true
}
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
300
Synology Surveillance Station Web API
}, "success": true }
2.3.34.16 Save method
Save snapshot.
Request
Parameter camName createdTm width height byteSize imageData
Value <string> <integer> <integer> <integer> <integer> <string>
Description Camera name of the snapshot. Created time of the snapshot. Width of snapshot. Height of snapshot. File size of snapshot in byte. Image data of the snapshot in base64 format.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? width=480&camName="P1347"&version="1"&imageData="/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAM CAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8 QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA QEBAQEBAQEBAQEBAQEBD/wAARCAKAAeADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAEC AwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fA kM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4i JipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/ 8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEE BSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RV VldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbH yMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9EvEXjLSG0+bVdMv7e5hTRLz UIpoZPMR/uIh/Wq1hr2y+XSvM+aHVrLSdv+3Hbee9fL0dhr3wf8aXPgDXI/8AQfE9zY6dbzfwW269jd9n+xIn/j9 eqJ4lgs5J/EUcg2x3/i3xG2/+5ap9lT/0bW2HlGpTNT0G+8ZxXHhm8vYJP3r6Dfagn/baX9zWsvhR20rU7ZINlxNp6 WCOIkjOwJ/f/wDi68z8J2k2qzXGjuY3jttO8MaPL/vt/pM36S19EJ90VrXUaXwkzPCvEOm3VnfalqXl+X5Mutamn /bGyjsof/RtZlkjafrFnBIn7mw1WztHT+4mn6NI7/8AkSvc9S0Kw1SKSOeIDzo2hZv9hm+cf8CrgPFPhqTTGv8AV7 SON3S01a7Tf9x57jy0T/xypg4S0QHm3/CJ3Nh4V0zXLuWN31DRm1b5IvufuYESP/vuX/yLXK+J9Ne2sdQsfM+5L feSn/XN44a+p7nwzZTadaaVKEkihjgg+fukbo+P+BeVXAeIfAz3M9ojx/667td7/wDXTUJLmb/xyvExeX+2nz0yDM +EGtanP4mXQ7uSR0SXUrh3f+Py/Ihrqvif4YEN3p/xI0fT5LnWPDb+b5UP37m2b5Jo/wDvisT4N6dMmtNqF1G8 LrpfnOh/v3V5O/8A7Sr1zzo/ +etd9NSoxjCRqJZ3MV5FHdQn5Jo1dasj734VznhmWwtoRo2nW80cdv5jok3VR5r/APjmfu+1dBVzIDZ+831ia/4 a07XYY4LqAOEljf8A75mjf/2lVnWNSGkxx3B5UtI7/wC4qO/9KW21W2uCm1vvysn/AHzv/wDjVQZHh3x6+FC2/ wAP9Y8QaOxvLvTYPOa2ki/1kO/95/OV6/KfWIUTUp5E/wBmv268fzRxeB/EE7v+6TSrt2+nkvX4izJ9su5/3n39vz /8Arx8Zye1LHWb741qZ6zNKm+7Wm9cQENFFFADXqulWKqQ/wAX+81AD0ov/wDjxuf+uEn/AKBQlS3H/HvL/ wBcmoQI/Vn9j/U5fiN+zH4T/wCEgMge0hl0wun7rekLvGP/AByuB/4KUon/AArLw5J/Gmr7P+ +kpf8Agmv4qn174K654d8zY+ia1IiO/wD02TfR/wAFE3t7D4L+HdOvtR8+9fW1ETv9+bbDJvr1sTy/VzWHxH5wa x/yDp/92tuz+4tYWq/8eE/
Copyright � Synology Inc. All rights Reserved.
301
Synology Surveillance Station Web API
+5W7Yf8e8VeatjJlK5/5DN5/1wh/9qVzOpQ73l/266u5TZqtzJ/fto6x4bO41K+Sxgj3yzNsSiAFvXk2eFfC8f+1ff+hx 1iXP/LL/AHa2/Ej/APFP+Gk/ufbP/Q465rVdStbDyPtcmzevyf7ddxjAneztbyPy7u3jnT/brQR/Jj/1cj1Ss5kuYIp0+4 676ZretroNj9uk+55ip/31WBZrJeXH/LDS7iT/AL4/+Lqpreq6zYaVeXUGlyI6QNsfzU+SucvPiL9j8qS1t7e63/P8kr1 btviLLNPBBfW9unnMqbPN/vPVckzY7DTbl5tD0yef78yxu7/3/kro7T/UrXM6xNs+wwfx10FnN/oq1kUcf4//AOQ la/8AXBa5d/8AVv8A7rV1HxC/5CsH/XBa5eb/AFEv+61cEv4h1Q+A8Xu5tlxLJ/tV9eWuqtc/B/4ead/c0tpX/wC+9 iV8fam+6ST/AHq9z8K/Ejw2fCWjadd6xHBcWFktpsff/C8n+xXXmNCc8PFwLw04HrvgPQYtb1ny57fz0RfufwfNU vj/AOIXwi8AeI7zwzfeA7i9uLNY97wy/JvkTf8A365Lwl8Y9E8MSNJY6pp87vt+d/8AZroNS+N+kaxB/wATnT/D90 k38b/x7a8HBx9hVlOrCRtXfP8AAekeBvCXg3xb4ctvEEnheS1+0/Ps+1P/APF1p3PhLRvDcGq32gWfkXH9n3Hz+b 5v8FeeWH7QmlpBFaWNtoaRQrsREuvuV6Gmqy3n2OC+j2S6laXXyf8AbGSu6FT3jgnz/bPknUtV8YPfT+R4ouIE eeT5PKT5PnqKHWPEqJ5c+sSTv/f8pKt36bL6VP8Apo1V/JFdr5LGJpaJ4q1nR9Vg1Ke3t72KFvntp/uOlfS2m6b8P vE/hyC+0rR7OfTLxfO8nyvnR/46+WXSrH/CW+KtNsYtNsfEF5a2kLfJDBL5VRPn+wRM+mIdB8PpHr19o+nyJ/xL5 oX+/wDf2f7deRIkqSXzySSOk0u9K2/G3xXuvAEF94cg1CSB9V02xe33xPKnzJJ5yff/AIq8n1Xxnq/iHw5PPptnHay 23zzXMET7Jk/4HW1GMx/UKnxnS36eYkv+7Xi/xOhaGSxf/ZkWvTfCvip9VnttGgjjvW/juXl+fZ/ubFrjfjFbIm7Z/Bc 1vTn+8M4UZ05nk/nL/wA85alS4jSnolS+Sr12ylE6CWHUoqtpeW71ShtoP+edaENpZv0tI6xnyGRn6xfolrsgk+d6 5wSY7Vt+ILaC2ePyYI031BZ+Gdbv7Rb600+SaF2K7krvpW5CD+hj44eF/D/xf8HywWMsCahCi3Fjcp9+aFv7lfPXg /xNq954Z17wPrFrNBqWg+HofC77/wDl5fUNV/16f7yV7WPFRvEV4bLyLq5luoWs8+Vs1CH/AI/LFP8AeT9/F/t1 5F43S1tvE3h/4r6dBJqP9mz2d9qCQffvNP8AO3pJ/wB/Iv8AgDxbP40ry8Nmn+2wpfYkelCB738LwNQ8Va5fD7s vjG+RP9yzs47X/wBDr29a8Z/Z7dbzwtomqx/8xS21DW3/AO36889K9kTv9K+kxi/eWfQ46nxj6yvENsl1YfZZPu3 M0MTf991q1XlXfJD/ANdP/ZK5iByXMLuyB+UbZVTV0VrUv/cEjf8AkN68/wDEHidrP+0GRZ9ywaky/wC+tzBbJTr 7xq1tLeW5idwqaiF/7Z3sFsn860SA6Dw4mn6HdX0c80cT+Xa2/wA//TOFP/jtdcu2vn34l69511beRJ8qazNvf+5t mjh/9pU74Y/GG/tYI9L8TXAmiMe+KZ/9yd//AGlXl1MfFYl0ZgejeOfE48Garp+r3aKLC4uYbS7lbpFC3mfP/wABfy q7iuS1HTdM+Inhm90+7j2Lcxx/8AZoUcf+jah+F+t32raA1hrkkf8AbeiTNp+ooB911+4//A4/Kf8AGvQKOo1TSLX VY0S5/g+7XKS"&api="SYNO.SurveillanceStation.SnapShot"&createdTm=1423499773&byteSize=51039&me thod="Save"&height=640
Response
Name createdTm snapshotId success
Value <integer> <integer> <boolean>
Example:
{ "data": {
"createdTm": 1423539583, "snapshotId": 156744, "success": true }, "success": true }
Description Created time of the snapshot. Id of the saevd snapshot. Success or not.
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
302
Synology Surveillance Station Web API
2.3.34.17 ChkSnapshotValid method
Check status of the snapshot.
Request
Parameter dispSnapshot
Value <boolean>
Description Id of snapshot checked.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.SnapShot"&id=1&version="1"&method="ChkSnapshotValid"
Response
Name itemStatus
Value <integer>
Example:
{ "data": {
"itemStatus": integer }, "success": boolean }
Description Current setting of snapshot functions.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
303
Synology Surveillance Station Web API
2.3.34.18 Delete method
Delete the selected snapshots.
Request
Parameter objList
Value
Description
Array of <ObjItem List of snapshots going to be locked.
Object>
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&objList=[{"id": "0:1"}, {"id": "0:2"}]&version="1"&method="Delete"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.34.19 API Error Code
Code 105 400 418
No permission. Execution failed. Object is not exist.
Description
Copyright � Synology Inc. All rights Reserved.
304
Synology Surveillance Station Web API
2.3.35 SYNO.SurveillanceStation.VisualStation
This API provides method to get information of VisualStation.
API Name SYNO.SurveillanceStation.VisualStation
Method Name Enable
ReqNetConfig Edit Lock Enum
Unlock Disable Delete
2.3.35.1 Enable method
Version 1
Section 2.3.9.1 2.3.9.2 2.3.35.3 2.3.35.4 2.3.35.5 2.3.9.3 2.3.9.4 2.3.9.5
Availability Surveillance Station 6.0-2337
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Enable specific VisualStations by VS IDs.
Request
Parameter vslists
Value <string>
Description The enabled VisualStation list.
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="Enable"&api="SYNO.SurveillanceStation.VisualStation"&version="1"&vslists="8"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Successful or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
305
Synology Surveillance Station Web API
2.3.35.2 ReqNetConfig method
Update network configuration of the VisualStation.
Request Parameter
vsMac
ip
mask
gateway
blDhcp
name
Value <string> <string> <string> <string> <boolean> <string>
Description Optional. MAC address of this VisualStation. Optional. IP address of this VisualStation. Optional. Subnet mask of this VisualStation. Optional. Gateway address of this VisualStation. Optional. The IP address is set by DHCP or not. Optional. The name of this VisualStation.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="ReqNetConfig"&api="SYNO.SurveillanceStation.VisualStation"&blDhcp=true&version="1"&vsMac ="FE:A5:1D:7E:C0:7B"&ip="10.13.13.71"&mask="255.255.240.0"&gateway="10.13.15.254"&name="Visual Station Name"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Successful or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
306
Synology Surveillance Station Web API
2.3.35.3 Edit method
Save the setting of VisualStation.
Request
Parameter data
Value <EditParam Object>
Description Optional. Updated setting of VisualStation.
Availability 1 and onward
<EditParam Object> definition
Key vsId name ip mac platform version maxch capflags
Value <integer> <string> <string> <string> <string> <string> <string> <string>
dhcp
newIP
subnet gateway timezone language
<string>
<string>
<string> <string> <string> <string>
Description ID of VisualStation.
Name of VisualStation. IP address of this VisualStation.
Mac address of this VisualStation. Platform of this VisualStation.
Version of this VisualStation. Maximum channel number of this VisualStation.
VisualStation capability. 0: FLAG_VS_CAP_NONE 1: FLAG_VS_CAP_TIMEZONE Point out that IP address of this VisualStation is assigned by dhcp or manual. New IP address of this VisualStation by manual setting. Subnet mask of this VisualStation.
gateway address of this VisualStation. Timezone of this VisualStation.
Language of this VisualStation.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="ReqNetConfig"&api="SYNO.SurveillanceStation.VisualStation"&blDhcp=true&version="1"&vsMac ="FE:A5:1D:7E:C0:7B"&ip="10.13.13.71"&mask="255.255.240.0"&gateway="10.13.15.254"&name="Visual Station Name"
Response Key
success
Example: {
Value <boolean>
Description Successful or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
307
Synology Surveillance Station Web API
"data": { "success": true
}, "success": true }
2.3.35.4 Lock method
Lock specific VisualStations by VS IDs.
Request
Parameter vslists
Value <string>
Description The locked VisualStation list.
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="Lock"&api="SYNO.SurveillanceStation.VisualStation"&version="1"&vslists="8"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Successful or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
308
Synology Surveillance Station Web API
2.3.35.5 Enum method
Enumerate all Visualstation ownered by SurveillanceStation.
Request No parameter is required. Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.VisualStation"&version="1"&method="Enum"
Response
Key VS total
Value Array of <VS Object> <integer>
Description Saved Layout ID. Number of VisualStation.
Availability 1 and onward 1 and onward
<VS Object> definition
Key
Value
capFlags
<integer>
defLayout
dhcp
dsStatus enable gateway id idOnRecServer ip language Lock macaddr mask maxch name ownerDsId platform status timezone version
Array of <integer>
<boolean>
<integer> <boolean> <string> <integer> <integer> <string> <string> <integer> <string> <string> <integer> <string> <integer> <string> <integer> <string> <string>
Description VisualStation capability. 0: FLAG_VS_CAP_NONE 1: FLAG_VS_CAP_TIMEZONE Point out that IP address of this VisualStation is assigned by dhcp or not. Point out that IP address of this VisualStation is assigned by dhcp or not. DS status of the camera. This VisualStation is enabled or not. gateway address of this VisualStation. ID of VisualStation. ID of this VisualStation on recording server. IP address of this VisualStation. Language of this VisualStation. VisualStation is locked or not. MAC address of this VisualStation. Netmask of this VisualStation. Maximum channel number of this VisualStation. Name of this VisualStation. Owner DS ID of this VisualStation. Platform of this VisualStation. Status of this VisualStation. Timezone of this VisualStation. Package version of VisualStation.
Availability 1 and onward
1 and onward
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
309
Synology Surveillance Station Web API
Example:
{ "data": {
"total": 1, "VS": [
{ "status": 0, "enable": true, "language": "enu", "defLayout": [ 11, 11 ], "platform": "VS240HD", "ownerDsId": 0, "ip": "10.13.13.71", "version": "2.1-1291", "mask": "255.255.240.0", "id": 8, "timezone": "Taipei", "capFlags": 0, "macAddr": "FE:A5:1D:7E:C0:7B", "dsStatus": 0, "idOnRecServer": 0, "lock": 1, "dhcp": false, "maxch": 36, "gateway": "10.13.15.254", "name": "VS Name"
} ] }, "success": true }
Copyright � Synology Inc. All rights Reserved.
310
Synology Surveillance Station Web API
2.3.35.6 Unlock method
Unlock specific VisualStations by VS IDs.
Request
Parameter vslists
Value <string>
Description The unlocked VisualStation list.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? method="Unlock"&api="SYNO.SurveillanceStation.VisualStation"&version="1"&vslists="8"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Successful or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
311
Synology Surveillance Station Web API
2.3.35.7 Disable method
Disable specific VisualStations by VS Ids.
Request
Parameter vslists
Value <string>
Description The unlocked VisualStation list.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? method="Disable"&api="SYNO.SurveillanceStation.VisualStation"&version="1"&vslists="8"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Successful or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
312
Synology Surveillance Station Web API
2.3.35.8 Delete method
Delete specific VisualStations from SurveillanceStation.
Request
Parameter vslists
Value <string>
Description The unlocked VisualStation list.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? method="Delete"&api="SYNO.SurveillanceStation.VisualStation"&version="1"&vslists="7,9"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Successful or not.
2.3.35.9 API Error Code
Code 100 400 419
Unknown error. Execution failed. Visualstation name repetition.
Description
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
313
Synology Surveillance Station Web API
2.3.36 SYNO.SurveillanceStation.VisualStation.Layout
This API provides method to get layout information of VisualStation.
API Name SYNO.SurveillanceStation.VisualStation.Layout
Method Name Enum Save Delete
Version 1
Section 2.3.10.1 2.3.36.2 2.3.36.3
Availability Surveillance Station 6.0-2337
Availability 1 and onward 1 and onward 1 and onward
2.3.36.1 Enum method
Enumerate Layout Inforamtion of VisualStation.
Request
Parameter vsId
Value <Integer>
Description ID of VisualStation.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.VisualStation.Layout"&version="1"&vsId=35&method="Enum"
Response
Key data success
Value
Description
Array of <layoutList Object> Layout List of VisualStation.
<boolean>
Successful or not.
Availability 1 and onward 1 and onward
<layoutList Object> definition
Key camGrpName camGrpId
Value <string> <integer>
channelList layoutType
Array of <cameraList Object>
<integer>
Description camera Group Name. camera Group ID. -1: normal camera. other than -1, camera group ID. Camera list of the layout.
Channel number of layout type. 1: SYNO.SS.Layout.Def.TYPE_1. 4: SYNO.SS.Layout.Def.TYPE_4. 6: SYNO.SS.Layout.Def.TYPE_6.
Availability 1 and onward 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
314
Synology Surveillance Station Web API
isFixAspectRatio customPosList
id isDefault name
<string> Array of <customPosList Object>
<integer> <boolean>
<string>
9: SYNO.SS.Layout.Def.TYPE_9. 10: SYNO.SS.Layout.Def.TYPE_10. 13: SYNO.SS.Layout.Def.TYPE_13. 14: SYNO.SS.Layout.Def.TYPE_13_B. 16: SYNO.SS.Layout.Def.TYPE_16. 25: SYNO.SS.Layout.Def.TYPE_25. 36: SYNO.SS.Layout.Def.TYPE_36. 49: SYNO.SS.Layout.Def.TYPE_49. 64: SYNO.SS.Layout.Def.TYPE_64. -2: SYNO.SS.Layout.Def.TYPE_CAMERA_GROUP. 0: SYNO.SS.Layout.Def.TYPE_SEQUENCE The layout is FixAspectRatio or not. Customized Channel location list of this layout.
The layout ID. The layout is default or not. The name of layout.
1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
<cameraList Object> definition
Key
Value
name dsId
<string> <integer>
dsName
<string>
location type
<integer> <integer>
id
<integer>
Description The camera name. The DS ID of the camera. The DS name of the camera. The location of the camera in specific layout. The type of camera. The ID of the camera.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
<customPosList Object> definition
Key
Value
customPosList
Array of <posList Object>
Description Customized channel display information of layout.
Availability 1 and onward
<posList Object> definition
Key posList
Value
Description
Array of <integer> Customized channel width and height Information
of layout.
Length of Array is 4.
Array[0]: top-left x position relative to to base
width.
Array[1]: top-left y position relative to base height.
Array[2]: customized width ratio of base width.
Array[3]: customized height ratio of base height.
Availability 1 and onward
Example:
{ "data": {
"data": [
Copyright � Synology Inc. All rights Reserved.
315
Synology Surveillance Station Web API
{ "camGrpName": "", "camGrpId": -1, "layoutType": 6, "isFixAspectRatio": false, "channelList": [ { "name": "Camera Name", "dsId": 0, "dsName": "Name of DS", "location": 1, "type": 2, "id": 1 }, { "name": "Camera Name", "dsId": 0, "dsName": "Name of DS", "location": 4, "type": 1, "id": 1 } ], "customPosList": [], "id": 11, "isDefault": true, "name": "Default"
} ] }, "success": true }
Copyright � Synology Inc. All rights Reserved.
316
Synology Surveillance Station Web API
2.3.36.2 Save method
Save layout inforamtion into VisualStation
Request Parameter
id vsId name canGrpId isDefault isFixAspectRatio layoutType
channelList customPosList
Value <Integer> <Integer> <string> <Integer> <Integer> <Integer> <Integer>
Array of <channelList Object> <string>
Description
Availability
The DS ID of the VisualStation.
1 and onward
ID of VisualStation.
1 and onward
Optional.
1 and onward
Name of VisualStation.
Optional.
1 and onward
camera Group Id.
-1: normal camera.
otherwise, camera group.
This layout is default or not.
1 and onward
0: false
1: true
Optional.
1 and onward
This layout is FixAspectRatio or not.
0: false
1: true
Channel number of layout type.
1 and onward
1: SYNO.SS.Layout.Def.TYPE_1.
4: SYNO.SS.Layout.Def.TYPE_4.
6: SYNO.SS.Layout.Def.TYPE_6
9: SYNO.SS.Layout.Def.TYPE_9.
10: SYNO.SS.Layout.Def.TYPE_10.
13: SYNO.SS.Layout.Def.TYPE_13.
14: SYNO.SS.Layout.Def.TYPE_13_B.
16: SYNO.SS.Layout.Def.TYPE_16.
25: SYNO.SS.Layout.Def.TYPE_25.
36: SYNO.SS.Layout.Def.TYPE_36.
49: SYNO.SS.Layout.Def.TYPE_49.
64: SYNO.SS.Layout.Def.TYPE_64.
-2: SYNO.SS.Layout.Def.TYPE_CAMERA_GROUP.
0: SYNO.SS.Layout.Def.TYPE_SEQUENCE
Channel information list of this layout.
1 and onward
Optional. Customized channel display information of layout.
1 and onward
<channelList Object> definition
Key
Value
location itemType
<integer> <Integer>
Description
Camera location in layout.
Item type in layout. 0: ITEM_TYPE_CAM
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
317
Synology Surveillance Station Web API
camId camName regionId
<Integer> <string> <Integer>
dsId dsName mountId
regionName fisheyeType
<Integer> <string> <Integer>
<string> <Integer>
regionType
<Integer>
resolution id name type
<string> <Integer> <string> <Integer>
1: ITEM_TYPE_EMAP
2: ITEM_TYPE_DOOR
3: ITEM_TYPE_CAMGRP
Camera ID.
1 and onward
Name of the camera.
1 and onward
Region ID of the fisheye camera.0: for other kinds of 1 and onward
camera.other than 0, The region ID of the fisheye
camera.
The DS ID of the camera.
1 and onward
The DS name of the camera.
1 and onward
Mounted ID of the camera.0: Not mounted
1 and onward
cameraother than, mounted ID.
Region name of the fisheye camera.
1 and onward
Type of fisheye.
1 and onward
0: no fisheye
other than 0: one of vendor
Type of fisheye region.
1 and onward
-1: FISHEYE_REGION_NOT_REGION
0: FISHEYE_REGION_TYPE_REGION
1: FISHEYE_REGION_TYPE_PANORAMA
2: FISHEYE_REGION_TYPE_DOUBLE_PANORAMA
3: FISHEYE_REGION_TYPE_TRIPLE_VIEW
4: FISHEYE_REGION_TYPE_QUAD_VIEW
5: FISHEYE_REGION_TYPE_SUB_REGION
6: FISHEYE_REGION_TYPE_SUB_PANORAMA
7: FISHEYE_REGION_TYPE_CNT
The resolution of the camera.
1 and onward
The ID of the camera.
1 and onward
The name of the camera.
1 and onward
The type of the camera.
1 and onward
0: VS_LCT_UNKNOWN
1: VS_LCT_CAMERA
2: VS_LCT_EMAP
Example:
http://192.168.1.1:5000/webapi/entry.cgi?name="Layout Name"&channelList=[{"itemType": 0, "regionId": 0, "dsName": "....", "dsId": 0, "id": 1, "regionName": "", "camId": 1, "name": "VisualStation Name", "type": 1, "regionType": -1, "mountId": 0, "camName": "Camera Name", "location": 5, "fisheyeType": 0, "resolution": "640x480"}, {"itemType": 1, "regionId": 0, "dsName": "....", "dsId": 0, "id": 1, "regionName": "", "camId": 1, "name": "VisualStation Name", "type": 2, "regionType": 5, "mountId": 0, "camName": "Camera Name", "location": 10, "fisheyeType": 1, "resolution": "640x480"}]&customPosList="0,0,1,1,1,0,2,1,2,0,0,0,0,1,1,1,1,1,1,1,2,1,1,1"&vsId=8&method="Save"&api=" SYNO.SurveillanceStation.VisualStation.Layout"&isFixAspectRatio=1&version="1"&layoutType=25&id=0&is Default=1&camGrpId=-1
Response
Key id
Value <Integer>
Description The saved layout ID.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
318
Synology Surveillance Station Web API
success Example:
<boolean>
{ "data": {
"id": 12, "success": true }, "success": true }
Successful or not.
1 and onward
2.3.36.3 Delete method
Delete specific Layout of VisualStation.
Request
Parameter id vsId
Value <string> <integer>
Description The deleted ID list of layout. The VisualStation ID of the layout.
Availability 1 and onward 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="Delete"&api="SYNO.SurveillanceStation.VisualStation"&version="1"&vslists="7,9"
Response
Key newDefLayoutId success
Value <integer> <boolean>
Example:
{ "data": {
"newDefLayoutId": 0, "success": true }, "success": true }
Description New default layout ID. Successful or not.
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
319
Synology Surveillance Station Web API
2.3.36.4 API Error Code
Code 100 418
Description Unknown error. The VisualStation ID does not exist.
Copyright � Synology Inc. All rights Reserved.
320
Synology Surveillance Station Web API
2.3.37 SYNO.SurveillanceStation.VisualStation.Search
This API provides method to query visual station information.
API Name SYNO.SurveillanceStation.VisualStation.Search
Method Name Start
SearchIP Stop
InfoGet
Version 1
Section 2.3.11.1 2.3.37.2 2.3.37.3 2.3.37.4
Availability Surveillance Station 6.0-2337
Availability 1 and onward 1 and onward 1 and onward 1 and onward
2.3.37.1 Start method
Clear previous search result and check avaliable visualstation.
Request No parameter is required.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.VisualStation.Search"&version="1"&method="Start"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Success or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
321
Synology Surveillance Station Web API
2.3.37.2 SearchIP method
Get specific VisualStation Information by IP address.
Request
Parameter ip
Value <string>
Description IP address of the VisualStation.
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? ip="10.13.13.71"&api="SYNO.SurveillanceStation.VisualStation.Search"&version="1"&method="SearchIP"
Response Key
vsInfo
success
Value
Description
Array of <vsList Information of this VisualStation.
Object>
<boolean>
If the action of delete succuess.
Availability 1 and onward
1 and onward
<vsList Object> definition:
Key capFlags
Value <integer>
dhcp
gateway ip lock macAddr mask maxch name platform version
<boolean>
<string> <string> <boolean> <string> <string> <integer> <string> <string> <string>
Description
Availability
VisualStation capability.
1 and onward
0: FLAG_VS_CAP_NONE
1: FLAG_VS_CAP_TIMEZONE
Point out that IP address of this VisualStation is assigned by 1 and onward
dhcp or not.
Gateway address of this VisualStation.
1 and onward
IP address of this VisualStation.
1 and onward
VisualStation is locked or not.
1 and onward
MAC address of this VisualStation.
1 and onward
Netmask of this VisualStation.
1 and onward
Maximum channel number of this VisualStation.
1 and onward
Name of this VisualStation.
1 and onward
Platform of this VisualStation.
1 and onward
Version of this VisualStation.
1 and onward
Example:
{ "data": {
"vsInfo": { "lock": true, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "FE:A5:1D:7E:C0:7B",
Copyright � Synology Inc. All rights Reserved.
322
Synology Surveillance Station Web API "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1291", "ip": "10.13.13.71", "dhcp": false
}, "success": true }, "success": true }
2.3.37.3 Stop method
Clear previous search result and check avaliable visualstation.
Request No parameter is required.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.VisualStation.Search"&version="1"&method="Start"
Response
Key success
Value <boolean>
Example:
{ "data": {
"success": true }, "success": true }
Description Success or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
323
Synology Surveillance Station Web API
2.3.37.4 InfoGet method
Get VisualStation information List and indexed by offset.
Request
Parameter offset
Value <integer>
Description Optional. The offset of visualstation list.
Availability 1 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? method="InfoGet"&api="SYNO.SurveillanceStation.VisualStation.Search"&version="1"&offset=0
Response Parameter
vsList
success
Value
Array of <vsList Object>
<boolean>
Description The offset of visualstation list.
Success or not.
Availability 1 and onward
1 and onward
Example:
{ "data": {
"success": true, "vsList": [
{ "lock": false, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "00:11:32:1A:48:DC", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1270", "ip": "10.13.13.76", "dhcp": true
}, {
"lock": true, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254",
Copyright � Synology Inc. All rights Reserved.
324
Synology Surveillance Station Web API
"macAddr": "00:11:32:1A:EA:C5", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.0-1252", "ip": "10.13.11.211", "dhcp": true }, { "lock": true, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "00:11:32:1A:48:FA", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1279", "ip": "10.13.13.106", "dhcp": true }, { "lock": true, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "00:11:32:1C:96:4B", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1290", "ip": "10.13.11.187", "dhcp": false }, { "lock": true, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "00:11:32:1A:49:01", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1291", "ip": "10.13.11.1", "dhcp": true }, { "lock": true, "capFlags": 0, "maxch": 36,
Copyright � Synology Inc. All rights Reserved.
325
Synology Surveillance Station Web API
"gateway": "10.13.15.254", "macAddr": "00:11:32:1A:48:F6", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.0-1233", "ip": "10.13.13.85", "dhcp": true }, { "lock": false, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "E6:81:13:66:8C:58", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1291", "ip": "10.13.11.217", "dhcp": true }, { "lock": true, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "FE:A5:1D:7E:C0:7B", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1291", "ip": "10.13.13.71", "dhcp": false }, { "lock": false, "capFlags": 0, "maxch": 36, "gateway": "10.13.15.254", "macAddr": "86:F1:FF:5E:4C:A5", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS240HD", "version": "2.1-1291", "ip": "10.13.1.63", "dhcp": false }, { "lock": false, "capFlags": 1,
Copyright � Synology Inc. All rights Reserved.
326
Synology Surveillance Station Web API
"maxch": 9, "gateway": "10.13.15.254", "macAddr": "00:11:32:05:C2:BF", "name": "VisualStation Name", "mask": "255.255.240.0", "platform": "VS60", "version": "1.2-0145", "ip": "10.13.13.211", "dhcp": true } ] }, "success": true }
2.3.37.5 API Error Code
Code 100 417
Unknown error. Test Connection Error.
Description
Copyright � Synology Inc. All rights Reserved.
327
Synology Surveillance Station Web API
2.3.38 SYNO.SurveillanceStation.AxisAcsCtrler
This API provides several methods to access controller information, include enumerate/modify/delete/add controller related members in SurveillanceStation, and some sync action to modify data in controller device.
Name SYNO.SurveillanceStation.AxisAcsCtrler
Method Name GetUpdateInfo CountByCategoryCardHolder EnumLogConfig GetCardholderPhoto CountByCategoryLog EnumCardHolder RetrieveLastCard
EnableCtrler AckAlarm
SaveLogConfig Save
DownloadLog GetDoorNames
TestConnect Enum
SaveCardHolder ListDoor ClearLog
DoorControl SavePrivilege ListPrivilege
ListLog Delete Retrieve BlockCardHolder CountByCategory
2.3.38.1 GetUpdateInfo method
Version 1
Section 2.3.38.1 2.3.38.2 2.3.38.3 2.3.38.4 2.3.38.5 2.3.38.6 2.3.38.7 2.3.38.8 2.3.38.9 2.3.38.10 2.3.38.11 2.3.38.12 2.3.38.13 2.3.38.14 2.3.38.15 2.3.38.16 2.3.38.17 2.3.38.18 2.3.38.19 2.3.38.20 2.3.38.21 2.3.38.22 2.3.38.23 2.3.38.24 2.3.38.25 2.3.38.26
Availability Surveillance Station 7.0
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Get number of controller need to retrieve.
Request This method specifies no parameters. Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="GetUpdateInfo"
Copyright � Synology Inc. All rights Reserved.
328
Synology Surveillance Station Web API
Response
Key data
Value <NeedToRetriveCnt Object>
Description Controller need to retrieve count data.
<NeedToRetriveCnt Object> definition:
Key
Value
newUpdateCnt <integer>
Description Number of controller need to retrieve.
Example:
{ "data": { "newUpdateCnt": 0 }
}
Availability 4 and onward
Availability 1 and onward
2.3.38.2 CountByCategoryCardHolder method
Get cardholder count of all categories.
Request
Parameter filterKeyword
Value <string>
Description Optional. Cardholders information keyword filter string.
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&filterKeyword="Jack"&method="CountByCateg oryCardHolder"
Response
Key data
Value
Description
<CardholderCategCnt Cardholder count of all categories.
Object>
Availability 4 and onward
<CardholderCategCnt Object> definition:
Key
Value
Description
ctrler_id
<CntByCtrlerId Object> Cardholer count of controller category.
status
<CardholderCntByStat Cardholer count of status category. us Object>
total
<integer>
Id of source DS.
Availability 4 and onward 4 and onward
4 and onward
Copyright � Synology Inc. All rights Reserved.
329
Synology Surveillance Station Web API
<CntByCtrlerId Object> definition:
Key
Value
-1
<integer>
X
<integer>
Description
Element count of all controllers.
Element count of specific controller, X is controller ID.
<CardholderCategCnt Object> definition:
Key -1 0 1 2
Value <integer> <integer> <integer> <integer>
Description Cardholder count of all status.
Cardholder count of normal status.
Cardholder count of expired status. Cardholder count of blocked status.
Example:
{ "data": { "status": { "1": 1, "0": 0, "2": 0, "-1": 1 }, "total": 1, "ctrler_id": { "91": 1, "-1": 1 } }
}
2.3.38.3 EnumLogConfig method
Availability 4 and onward 4 and onward
Availability 4 and onward 4 and onward 4 and onward 4 and onward
Enumerate all controllers logger configuration, for example, individual event to be logged or not.
Request This method specifies no parameter.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="EnumLogConfig"
Response
Key data
Value <LogConfigEnum Object>
Description All controller logger settings.
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
330
Synology Surveillance Station Web API
<LogConfigEnum> definition:
Key
Value
Description
data
Array of <LogConfigData Logger configuration of each controller.
Object>
total timestamp
<integer> <integer>
Total count of controller's logger configurations in this data. UTC timestamp for current system time.
<LogConfigData Object> definition:
Key
Value
id
<integer>
log_alarm
<string>
log_evt Example:
<string>
Description Logger configuration of each controller.
Total count of controller's logger configurations in this data. UTC timestamp for current system time.
{ "data": { "total": 1, "data": [ { "log_evt": "11111111111111111111111111111111111111", "id": 97, "log_alarm": "11111111111111111111111111111111111111" } ] }
}
Availability 4 and onward
4 and onward 4 and onward
Availability 4 and onward 4 and onward 4 and onward
2.3.38.4 GetCardholderPhoto method
Get cardholder photo, the response of this request is image binary data.
Request
Parameter photo_name isRedirectCgi
Value <string> <boolean>
Description
Cardholder photo name.
Set ture if this request is redirect from host server. For redirect request, recording server will encode
image data to base64 string and send back to host server after that host server will decode back to binary image.
Availability 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&photo_name="axisacsctrler_0_596.jpeg"&version="1"&met
Copyright � Synology Inc. All rights Reserved.
331
Synology Surveillance Station Web API hod="GetCardholderPhoto"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.5 CountByCategoryLog method
Get log count of all categories.
Request
Parameter start
Value <integer>
limit
<integer>
filterType
0,
1,
2
filterEventSource -1, 0, 1
filterSource
<integer>
filterEventSourceI <string> tem
filterTimeFrom <integer>
filterTimeTo
<integer>
filterKeyword <string> timezoneOffset <integer>
Description
Availability
Optional.
4 and onward
Offset of logs for database selection, used for log list
partial enumeration.
Optional.
4 and onward
Limitation of log number for database selection,
used for log list partial enumeration.
Optional.
4 and onward
Filter type of log level.
� 0: All types
� 1: Event level
� 2: Alarm level
Optional.
4 and onward
Filter type of event source.
� -1: All event source
� 0: Controller events
� 1: Door events
Optional.
4 and onward
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
Optional.
4 and onward
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
Optional.
4 and onward
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
Logs information keyword filter string.
Optional.
4 and onward
Minutes of timezone offset from UTC.
Copyright � Synology Inc. All rights Reserved.
332
Synology Surveillance Station Web API
doorIds eventTypes
<string> <string>
update
<integer>
Optional.
4 and onward
List of door ID separated by commas, used to filter
all logs from these doors.
Optional.
4 and onward
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
Optional.
4 and onward
UTC unix timestamp, used to find out all updated
logs after this timestamp.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? filterEventSource=1&filterEventSourceItem="225"&version="1"&filterTimeTo=1424019600&doorIds="15,2 4"&filterTimeFrom=1424016000&filterType=1&filterKeyword="Jack"&start=0&api="SYNO.SurveillanceStati on.AxisAcsCtrler"&limit=0&eventTypes="1,2,3,4"&filterSource=91&method="CountByCategoryLog"&timez oneOffset=480
Response
Key data
Value
Description
<LogCategCnt Object> Total number of export task.
Availability 4 and onward
<LogCategCnt Object> definition:
Key
Value
Description
ctrler_id
<CntByCtrlerId Object> Id of export task.
date
<LogCntByData
Name of export task.
Object>
log_level
<LogCntByLevel Object>
Id of source DS.
total
<integer>
Id of destination DS.
Availability 4 and onward 4 and onward
4 and onward
4 and onward
<LogCntByData Object> definition:
Key
Value
-1 YYYY/MM/DD
integer
<CntByHalfDate Object>
<LogCntByLevel Object> definition:
Key -1 1 2
Value <integer> <integer> <integer>
Description Log count of all dates. Log count in specific date. YYYY: 4 digit of years MM: 2 digit of month DD: 2 digit of day
Description Log count of all log level. Log count of event level. Log count of alarm level.
Availability 4 and onward 4 and onward
Availability 4 and onward 4 and onward 4 and onward
<CntByHalfDate Object> definition:
Key
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
333
Synology Surveillance Station Web API
-1
<integer>
Log count of specific day.
am
<integer>
Log count of specific day before midday.
pm
<integer>
Log count of specific day post midday.
Example:
{ "data": { "date": { "2015/02/16": { "am": 420, "-1": 842, "pm": 422 }, "-1": 842 }, "total": 842, "log_level": { "1": 628, "2": 214, "-1": 842 }, "ctrler_id": { "91": 842, "-1": 842 } }
}
4 and onward 4 and onward 4 and onward
2.3.38.6 EnumCardHolder method
Enumerate cardholder list information.
Request
Parameter start
Value <integer>
limit
<integer>
filterKeyword filterStatus
<string> <integer>
Description
Availability
Optional.
4 and onward
Offset of cardholder for database selection, used for
cardholder list partial enumeration.
Optional.
4 and onward
Limitation of cardholder number for database
selection, used for cardholder list partial
enumeration.
Optional.
4 and onward
Cardholders information keyword filter string.
Optional.
4 and onward
Cardholders status filter.
0: Normal
Copyright � Synology Inc. All rights Reserved.
334
Synology Surveillance Station Web API
filterCtrlerId
<integer>
1: Expired 2: Blocked
Optional. Controller ID filter, used to enumerate specific
controller.
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? version="1"&filterKeyword="5"&start=0&api="SYNO.SurveillanceStation.AxisAcsCtrler"&limit=100&filterSt atus=0&filterCtrlerId=95&method="EnumCardHolder"
Response
Key data
Value <CardholderEnum Object>
Description Cardholder list information data.
Availability 4 and onward
<CardholderEnum Onject> definition:
Key data
total timestamp
Value Array of <CardholderData Object> <integer >
<integer>
Description Cardholder data, include name, blocked or not, valid time, etc.
Total count of cardholders in this data.
UTC timestamp for current system time.
Availability 4 and onward
4 and onward 4 and onward
<CardholderData Onject> definition:
Key
Value
blocked
<boolean>
card_num
<string>
card_raw
<string>
card_token
<string>
ctrler_id
<integer>
enable_valid_fro <boolean>
m
enable_valid_until <boolean>
first_name
<string>
grp_id
<integer>
id last_access last_name name photo_height photo_name photo_tmstmp photo_width pin status
<integer> <integer> <string> <string> <integer> <string> <integer> <integer> <string> <integer>
Description If this cardholder is blocked. Cardholder's credential numbers. Cardholder's original credential hex numbers. Cardholder's serial numbers in controller. Controller ID. If this cardholder has valid from time bound.
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
If this cardholder has valid until time bound. First name of this cardholder. Peer connection group, controllers with the same grp_id are peer connected, except 0 means no peered controller. Cardholder ID. UTC timestamp of last access time. Last name of this cardholder. Full name of this cardholder. Cardholder photo height. Cardholder photo name. UTC timestamp of photo update time. Cardholder photo width. Cardholder's personal identification number. Credential status of cardholder.
4 and onward 4 and onward 4 and onward
4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
335
Synology Surveillance Station Web API
valid_from valid_until
<integer > <integer>
0: Normal 1: Expired 2: Blocked
Local unix timestamp of controller current
timezone for credential start time. Local unix timestamp of controller current timezone for credential end time.
Example:
{ "data": { "total": 1, "data": [ { "grp_id": 0, "status": 0, "first_name": "5", "card_num": "", "photo_name": "", "name": "5", "pin": "5555", "enable_valid_from": false, "enable_valid_until": false, "photo_width": 0, "valid_until": 0, "last_access": 0, "last_name": "", "ctrler_id": 97, "photo_tmstmp": 0, "card_raw": "", "card_token": "Axis-accc8e09c884:1422856613.833141000", "valid_from": 0, "id": 600, "photo_height": 0, "blocked": false } ] }
}
4 and onward 4 and onward
2.3.38.7 RetrieveLastCard method
Retrieve last access credential data from controller.
Request
Parameter ctrlerId
Value <integer>
Controller ID.
Description
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
336
Synology Surveillance Station Web API
idPtId
<integer>
IdPoint ID, used to get specific identification point information.
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? idPtId=113&api="SYNO.SurveillanceStation.AxisAcsCtrler"&ctrlerId=97&version="1"&method="RetrieveLas tCard"
Response
Key data
Value <CardData Object>
Description
Last request for access credential data of the specific IdPoint.
Availability 4 and onward
<CardData Object> definition:
Key
Value
card_num card_raw
<string> <string>
Description Cardholder's credential numbers. Cardholder's original credential hex numbers.
Availability 4 and onward 4 and onward
Example:
{ "data": { "card_raw": "12a456exf456f", "card_num": "123456879" }
}
2.3.38.8 EnableCtrler method
Enable/disable controllers.
Request
Parameter blEnable
Value <boolean>
arrayJson
<string>
Description
Decide enable or disable controller. true: Enable false: Disable
String array of enable/disable cardholder ID.
Availability 4 and onward
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? arrayJson="[93]"&method="EnableCtrler"&api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&blE nable=false
Copyright � Synology Inc. All rights Reserved.
337
Synology Surveillance Station Web API
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.9 AckAlarm method
Acknowledge all alarm level filtered logs, this action will modify log level to event in SurveillanceStation and delete alarm logs in controller.
Request
Parameter start
Value <integer>
limit
<integer>
filterEventSource -1, 0, 1
filterSource
<integer>
filterEventSourceI <string> tem
filterTimeFrom <integer>
filterTimeTo
<integer>
filterKeyword doorIds
<string> <string>
eventTypes
<string>
update
<integer>
Description
Availability
Optional.
4 and onward
Offset of logs for database selection, used for log list
partial enumeration.
Optional.
4 and onward
Limitation of log number for database selection,
used for log list partial enumeration.
Optional.
4 and onward
Filter type of event source.
� -1: All event source
� 0: Controller events
� 1: Door events
Optional.
4 and onward
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
Optional.
4 and onward
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
Optional.
4 and onward
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
Logs information keyword filter string.
Optional.
4 and onward
List of door ID separated by commas, used to filter
all logs from these doors.
Optional.
4 and onward
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
Optional.
4 and onward
Copyright � Synology Inc. All rights Reserved.
338
Synology Surveillance Station Web API
UTC unix timestamp, used to find out all updated logs after this timestamp.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&filterTimeFrom=1424836800&version="1"&filterTimeTo=14 24880000&method="AckAlarm"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.10 SaveLogConfig method
Modify controller logger configuration for each event.
Request
Parameter data
Value
<LogConfigData Object>
Description Logger configuration of controller.
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.AxisAcsCtrler"&data={"log_evt": "11111111111111111111111111111111111111", "id": 97, "log_alarm": "00111111111111111111111111111111111111"}&version="1"&method="SaveLogConfig"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.11 Save method
Save controller settings, include name, id, enabled/disabled, pair camera, hardware configuration, etc.
Request
Parameter arrayJson
Value <string>
Description
Availability
Controller settings Json format string, this string is a 4and onward
Json object array contain all settings below.
enable: Boolean, true to enable controller
id: Int, controller ID, 0 for new controller
Copyright � Synology Inc. All rights Reserved.
339
Synology Surveillance Station Web API
name: String, controller name host: String, controller ip address port: Int, controller port number model: String, controller model name username: String, controller user-name for authentication password: String, controller password for authentication time_server: String, controller ntp time server time_zone: String, timezone city door: Object array, door information (id, name, enable_cam) and paired camera settings (cam_id, cam_ds_id)
Example: http://192.168.1.1:5000/webapi/entry.cgi? arrayJson="[{\"enable\":true,\"id\":97,\"name\":\"ctrler1\",\"host\":\"10.13.12.173\",\"port\":80,\"model \":\"A1001\",\"username\":\"root\",\"password\":\"Q__Q-__-\",\"time_server\":\"Surveillance Station\",\"time_zone\":\"Fiji\",\"door\":[{\"id\":231,\"name\":\"Front Door\",\"enable_cam\":true,\"cam_ds_id\":0,\"cam_id\":13}]}]"&api="SYNO.SurveillanceStation.AxisAcsCt rler"&version="1"&method="Save"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.12 DownloadLog method
Download filtered logs, the response of this request is a html table list all filtered logs.
Request
Parameter start
Value <integer>
limit
<integer>
filterType
0,
1,
2
filterEventSource -1, 0, 1
Description
Availability
Optional.
4 and onward
Offset of logs for database selection, used for log list
partial enumeration.
Optional.
4 and onward
Limitation of log number for database selection,
used for log list partial enumeration.
Optional.
4 and onward
Filter type of log level.
� 0: All types
� 1: Event level
� 2: Alarm level
Optional.
4 and onward
Filter type of event source.
� -1: All event source
Copyright � Synology Inc. All rights Reserved.
340
Synology Surveillance Station Web API
filterSource
<integer>
filterEventSourceI <string> tem
filterTimeFrom <integer>
filterTimeTo
<integer>
filterKeyword doorIds
<string> <string>
eventTypes
<string>
update
<integer>
� 0: Controller events
� 1: Door events
Optional.
4 and onward
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
Optional.
4 and onward
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
Optional.
4 and onward
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
Logs information keyword filter string.
Optional.
4 and onward
List of door ID separated by commas, used to filter
all logs from these doors.
Optional.
4 and onward
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
Optional.
4 and onward
UTC unix timestamp, used to find out all updated
logs after this timestamp.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&filterTimeFrom=1424836800&version="1"&filterTimeTo=14 24880000&method="DownloadLog"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.13 GetDoorNames method
List door name from controller device.
Request
Parameter ctrlerId
Value <integer>
Description Controller ID, set 0 for new controller.
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
341
Synology Surveillance Station Web API
ip port userName password
<string> <integer> <string> <string>
IP address . Port bumber. Controller user-name for authentication. Controller password for authentication.
4 and onward 4 and onward 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? userName="root"&version="1"&ip="10.13.12.17"&ctrlerId=97&method="GetDoorNames"&api="SYNO.Sur veillanceStation.AxisAcsCtrler"&password="Q__Q-__-"&port=80
Response
Key Data
Value
Description
<DoorNames Object> Door name list from controller.
Availability 1 and onward
<DoorNames Object> definition:
Key count doors
Value <integer> Array of <string>
Description Number of door in controller. Array of door name from controller.
Availability 1 and onward 1 and onward
Example:
{ "data": { "count": 2, "doors": [ "Door1", "Door2" ] }
}
2.3.38.14 TestConnect method
Test connection and authentication of controller.
Request
Parameter ctrlerId ip port userName password
Value <integer> <string> <integer> <string> <string>
Description Controller ID, set 0 for new controller. IP address . Port bumber. Controller user-name for authentication. Controller password for authentication.
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
342
Synology Surveillance Station Web API http://192.168.1.1:5000/webapi/entry.cgi? userName="root"&version="1"&ip="10.13.12.173"&ctrlerId=97&method="TestConnect"&api="SYNO.Surve illanceStation.AxisAcsCtrler"&password="Q__Q-__-"&port=80
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.15 Enum method
Enumerate controller list information.
Request
Parameter start
Value <integer>
limit
<integer>
update
<integer>
blIncludeRecCnt <boolean>
blIncludeAuInfo <boolean>
Description
Availability
Optional.
4 and onward
Offset of controllers for database selection, used for
controller list partial enumeration.
Optional.
4 and onward
Limitation of controller number for database
selection, used for controller list partial
enumeration.
Optional.
4 and onward
UTC unix timestamp, used to find out all updated
controller after this timestamp.
Optional.
4 and onward
Set true to append controller category count in the
return data.
Optional.
4 and onward
Set true to append deleted controller ID after
update timestamp in the return data.
Example: http://192.168.1.1:5000/webapi/entry.cgi? start=0&api="SYNO.SurveillanceStation.AxisAcsCtrler"&limit=100&version="1"&method="Enum"
Response
Key data
Value
Description
<CtrlerEnum Object> Controller list information data.
Availability 4 and onward
<CtrlerEnum Object> definition:
Key data
total
Value Array of <CtrlerData Object> <integer>
Description Controller data, include host, name, port, etc.
Total count of controllers in this data.
Availability 4 and onward
4 and onward
Copyright � Synology Inc. All rights Reserved.
343
Synology Surveillance Station Web API
auInfo recCntData timestamp
<AutoUpdateInfo
Auto update information include deleted
Object>
controllers.
<AutoUpdateRecordCn Controller count of all category.
t Object>
<integer>
UTC timestamp for current system time.
4 and onward 4 and onward 4 and onward
<CtrlerData Object> definition:
Key door
enable grp_id
Value Array of <DoorData Object> <boolean>
<integer>
host
<string>
id
<integer>
idpoint
Array of <idPointData
Object>
mac_addr
<string>
model
<string>
name
<string>
need_to_retrieve <integer>
notifyschedule <string>
password
<string>
port
<integer>
retrieve_progress <integer>
status
<integer>
time_server time_zone username update_time
<string> <string> <string> <integer>
Description
Availability
Door data, include name, pair cam info, id, etc. 4 and onward
Show if controller enabled.
4 and onward
Peer connection group, controllers with the 4 and onward
same grp_id are peer connected, except 0
means no peered controller.
Controller ip address.
4 and onward
Controller ID.
4 and onward
Identification point data, include in/out,
4 and onward
reader/rex, door name, etc.
Controller MAC address.
4 and onward
Controller model.
4 and onward
Controller name.
4 and onward
Controller retrieve status.
4 and onward
0: No need to retrieve
1: Need to retrieve
2: Retrieving
List of half-hour notification schedule for a week 4 and onward
separated by commas, each half-hour schedule
is a hex number of bitwise notify options.
0x01: Controller alarm logged
0x02: Casing open
0x7FF: Select all above
Controller dummy password.
4 and onward
Controller port number.
4 and onward
Retrieve progress percentage, used when
4 and onward
controller is retrieving.
Controller status.
4 and onward
0: Normal
1: Disconnected
2: Disabled
3: Deleted
4: Unknown
5: Incompatible
Network time server.
4 and onward
City of the timezone.
4 and onward
Controller user-name for authentication.
4 and onward
UTC timestamp for last controller update time. 4 and onward
<DoorData Object> definition:
Key
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
344
Synology Surveillance Station Web API
cam_ds_id
<integer>
cam_id
<integer>
cam_id_on_serve <integer>
r
ctrler_id
<integer>
enable_cam
<boolean>
id
<integer>
name
<string>
notifyschedule <string>
status
<integer>
Paired camera server ID, 0 means local ds ID. 4 and onward
Paired camera ID in local ds.
4 and onward
Paired camera ID in recording server, used only 4 and onward
when camera is on recording server.
Controller ID of this door.
4 and onward
True if this door has paired camera.
4 and onward
Door ID.
4 and onward
Door name.
4 and onward
List of half-hour notification schedule for a week 4 and onward
separated by commas, each half-hour schedule
is a hex number of bitwise notify options.
0x01: Connection lost
0x02: Connection resume
0x04: Access granted
0x08: Access denied
0x10: Alarm detected
0x20: Tampering
0x7FF: Select all above
Door status construct by bitwise door, lock, and 4 and onward
alarm status.
0x00000: Status unknown
0x00001: Normal
0x00002: Physical open
0x00004: Physical close
0x00008: Locked
0x00010: Double locked
0x00020: Access
0x00040: Unlock
0x00080: Lock down
0x00100: Lock open
0x00200: Blocked
0x00400: Long open warning
0x00800: Open too long alarm
0x01000: Force open alarm
0x02000: Tampering
0x04000: Fault
0x08000: Disconnected
0x10000: Disabled
0x20000: Incompatible
<idPointData Object> definition:
Key ctrler_id direction
Value <integer> <integer>
door_id door_name id type
<integer> <string> <integer> <integer>
Description Controller ID. Direction. 0: In 1: Out Door ID. Door name. ID of this identification point. Device type.
Availability 4 and onward 4 and onward
4 and onward
4 and onward 4 and onward
Copyright � Synology Inc. All rights Reserved.
345
Synology Surveillance Station Web API
0: Reader 1: Rex (Request to Exit)
<AutoUpdataInfo Object> definition:
Key
Value
Description
deleteByRecordId <AutoUpdataDeleteDa Deleted element data.
te Object>
timestamp
<integer>
UTC timestamp of current ds time.
Availability 4 and onward
4 and onward
<AutoUpdataDeleteDate Object> definition:
Key
Value
Description
data
Array of
Deleted element data.
<DeletedElement
Object>
Availability 4 and onward
< DeletedElement Object> definition:
Key
Value
id
string
Description Deleted element ID string.
Availability 4 and onward
<AutoUpdateRecordCnt Object> definition:
Key recCnt
total
Value
Description
<AutoUpdateRecordCn Element count of category.
tData Object>
<integer>
Number of element in recCnt.
Availability 4 and onward
4 and onward
<AutoUpdateRecordCntData Object> definition:
Key
Value
Description
status
<CtrlerCntByStatus Object>
Controller count of status category, used for controller auto update.
ctrler_id
<CntByCtrlerId Object> Log count of controller category, used for log auto update.
date log_level
<LogCntByData Object> <LogCntByLevel Object>
Log count of date category, used for log auto update. Log count of log level category, used for log auto update.
Availability 4 and onward
4 and onward
4 and onward
4 and onward
<CtrlerCntByStatus Object> definition:
Key -1 0 1 2 4
Value <integer> <integer> <integer> <integer> <integer>
Description Controller count of all status. Controller count of normal status. Controller count of disconnected status. Controller count of disable status. Controller count of others status.
Availability 4 and onward 4 and onward 4 and onward 4 and onward 4 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
346
Synology Surveillance Station Web API
{ "data": { "total": 1, "data": [ { "status": 0, "username": "root", "update_time": 1424139223, "enable": true, "door": [ { "cam_ds_id": 0, "status": 4160, "name": "Door", "notifyschedule":
"7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF",
"cam_id_on_server": 13, "cam_id": 13, "ctrler_id": 94, "id": 228, "enable_cam": true } ], "name": "controller", "grp_id": 0, "need_to_retrieve": 0, "time_server": "Surveillance Station", "time_zone": "Fiji", "port": 80, "host": "10.13.11.9", "mac_addr": "AC:CC:8E:25:13:C9", "notifyschedule": "7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF
Copyright � Synology Inc. All rights Reserved.
347
Synology Surveillance Station Web API
,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF ,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF,7FF",
"idpoint": [ { "direction": 0, "door_name": "Door", "ctrler_id": 94, "type": 0, "id": 107, "door_id": 228 }
], "model": "A1001", "password": "Q__Q-__-", "id": 94, "retrieve_progress": 0 } ] } }
2.3.38.16 SaveCardHolder method
Save cardholder settings, include name, credential, photo, controller ID, photo information, etc.
Request
Parameter arrayJson
Value <string >
Description
Availability
Cardholder settings Json format string, this string is 4 and onward
a Json object array contain all settings below.
first_name: String, carholder first name
last_name: String, carholder last name
pin: String, personal identification number of
credential
card_num: String, card number of credential
card_raw: String, original card hex number of
credential
enable_valid_from: Boolean, true to set credential
start time
valid_from: Int, local timestamp in controller
timezone of credential start time
enable_valid_until: Boolean, true to set credential
end time
valid_until: Int, local timestamp in controller
Copyright � Synology Inc. All rights Reserved.
348
Synology Surveillance Station Web API
timezone of credential end time del_photo: Boolean, set true to delete cardholder photo id: Int, ID of this cardholder, read only ctrler_id: Int, controller ID of this cardholder, read only grp_id: Int, Controller group ID, 0 means no peer connected controllers, read only photo: String, photo binary base64 encode string, used only when adding an new photo photo_width: Int, photo width, used only when adding an new photo photo_height: Int, photo height, used only when adding an new photo blocked: Boolean, current cardholder blocked status, read only
Example:
http://192.168.1.1:5000/webapi/entry.cgi? arrayJson="[{\"first_name\":\"Cardholder1\",\"last_name\":\"\",\"pin\":\"1111\",\"card_num\":\"\",\"card _raw\":\"\",\"enable_valid_from\":false,\"valid_from\":1423612800,\"enable_valid_until\":true,\"valid_un til\":1423699199,\"del_photo\":true,\"id\":596,\"ctrler_id\":97,\"grp_id\":0,\"last_access\":0,\"name\":\" Cardholder1\",\"photo_name\":\"axisacsctrler_0_596.jpeg\",\"photo_width\":640,\"photo_height\":480,\ "photo_tmstmp\":1424847027,\"blocked\":true,\"status\":2}]"&api="SYNO.SurveillanceStation.AxisAcsCtrl er"&version="1"&method="SaveCardHolder"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.17 ListDoor method
Enumerate door information.
Request
Parameter DoorIds
Value <string>
Description
Optional. List of door ID separated by commas.
Availability 1 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? doorIds="15,24"&api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="ListDoor"
Response Key
Value
Description
Availability
Copyright � Synology Inc. All rights Reserved.
349
Synology Surveillance Station Web API
data
Array of <DoorData Door data, include name, pair cam info, id, etc. 1 and onward
Object>
<exporttask_info> definition:
Key
Value
id
<integer>
name
<string>
srcDsId dstDsId
<integer> <integer>
dstdir
<string>
start_time
<integer>
stop_time
<integer>
status
<integer>
total_count
<integer>
Description Id of export task. Name of export task. Id of source DS. Id of destination DS. Directory of destination. Start time of event. Stop time of event. Status of export task. Total count number of events.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
{ "exporttask": [ { "status": 0, "srcDsId": 0, "exported_count": 1, "start_time": 1425398400, "name": "asdf", "dstdir": "test", "total_count": 30, "dstDsId": 0, "id": 5, "stop_time": 1425484800 } ], "evtexptotal": 1
}
2.3.38.18 ClearLog method
Delete controller logs in SurveillanceStation, this action will not delete logs in controller.
Request
Parameter
Value
filterType
0,
1,
2
Description
Optional. Filter type of log level. � 0: All types � 1: Event level � 2: Alarm level
Availability 4 and onward
Copyright � Synology Inc. All rights Reserved.
350
Synology Surveillance Station Web API
filterEventSource -1, 0, 1
filterSource
<integer>
filterEventSourceI <string> tem
filterTimeFrom <integer>
filterTimeTo
<integer>
filterKeyword doorIds
<string> <string>
eventTypes
<string>
update
<integer>
Optional.
4 and onward
Filter type of event source.
� -1: All event source
� 0: Controller events
� 1: Door events
Optional.
4 and onward
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
Optional.
4 and onward
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
Optional.
4 and onward
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
Logs information keyword filter string.
Optional.
4 and onward
List of door ID separated by commas, used to filter
all logs from these doors.
Optional.
4 and onward
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
Optional.
4 and onward
UTC unix timestamp, used to find out all updated
logs after this timestamp.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&filterTimeFrom=1424836800&version="1"&filterTimeTo=14 24880000&method="ClearLog"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.19 ListPrivilege method
List all SurveillanceStation user privilege for each door.
Copyright � Synology Inc. All rights Reserved.
351
Synology Surveillance Station Web API
Request This method specifies no paremeters
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="ListPrivilege"
Response
Key data
Value <DoorPrivEnum Object>
Description
Availability
List all user privilege of door authentication and 4 and onward
manual lock ability.
<DoorPrivEnum Object> definition:
Key data
total timestamp
Value Array of <DoorPrivEnumData Object>
<integer> <integer>
Description Array of door privilege data.
Total count of door privilege in this data. UTC timestamp for current system time.
Availability 4 and onward
4 and onward 4 and onward
<DoorPrivEnumData Object> definition:
Key
Value
authorized
<boolean>
door_id id manual_lock uid
<integer> <string> <boolean> <integer>
Description Authorized or not, include ability to realize the door and view logs. Door ID.
Data ID, construct by uid and door_iD. Has manual lock ability of authorized user.
User ID.
Availability 4 and onward
4 and onward 4 and onward 4 and onward 4 and onward
Example:
{ "data": { "total": 4, "data": [ { "id": "1026_231", "manual_lock": true, "uid": 1026, "authorized": true, "door_id": 231 } ] }
}
Copyright � Synology Inc. All rights Reserved.
352
Synology Surveillance Station Web API
2.3.38.20 DoorControl method
Manual lock operation for specific door.
Request
Parameter doorId operation
Value <integer> <integer>
Description
Door ID.
Door lock operation. 0: Lock door 1: Unlock door 2: Access door
Availability 4 and onward 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? doorId=5&operation=1&api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="DoorControl "
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.21 SavePrivilege method
Save SurveillanceStation user's door privilege settings.
Request
Parameter arrayJson
Value <string>
Description
Availability
Door privilege settings Json format string, this string 1 and onward
is a Json object array contain all settings below.
uid: Int, SurveillanceStation user ID
door_id: Int, door ID
authorized: Boolean, ability to realize the door and
view logs
manual_lock: Boolean, manual lock ability of
authorized user
Example:
http://192.168.1.1:5000/webapi/entry.cgi? arrayJson="[{\"id\":\"1027_231\",\"uid\":1027,\"door_id\":231,\"authorized\":false,\"manual_lock\":false} ]"&api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="SavePrivilege"
Response
Copyright � Synology Inc. All rights Reserved.
353
Synology Surveillance Station Web API This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.22 ListLog method
List all logs.
Request
Parameter start
Value <integer>
limit
<integer>
filterType
0,
1,
2
filterEventSource -1, 0, 1
filterSource
<integer>
filterEventSourceI <string> tem
filterTimeFrom <integer>
filterTimeTo
<integer>
filterKeyword <string>
timezoneOffset <integer>
doorIds
<string>
eventTypes
<string>
Description
Availability
Optional.
4 and onward
Offset of logs for database selection, used for log list
partial enumeration.
Optional.
4 and onward
Limitation of log number for database selection,
used for log list partial enumeration.
Optional.
4 and onward
Filter type of log level.
� 0: All types
� 1: Event level
� 2: Alarm level
Optional.
4 and onward
Filter type of event source.
� -1: All event source
� 0: Controller events
� 1: Door events
Optional.
4 and onward
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
Optional.
4 and onward
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
Optional.
4 and onward
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
Optional.
4 and onward
Logs information keyword filter string.
Optional.
4 and onward
Minutes of timezone offset from UTC.
Optional.
4 and onward
List of door ID separated by commas, used to filter
all logs from these doors.
Optional.
4 and onward
Copyright � Synology Inc. All rights Reserved.
354
Synology Surveillance Station Web API
update
<integer>
blIncludeRecCnt <boolean>
blIncludeAuInfo <boolean>
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
Optional.
4 and onward
UTC unix timestamp, used to find out all updated
logs after this timestamp.
Optional.
4 and onward
Set true to append log category count in the return
data.
Optional.
4 and onward
Set true to append log category count in the return
data.
Example:
http://192.168.1.1:5000/webapi/entry.cgi? filterEventSource=1&filterEventSourceItem="225"&version="1"&filterTimeTo=1424019600&doorIds="15,2 4"&filterTimeFrom=1424016000&filterType=1&filterKeyword="Jack"&start=0&api="SYNO.SurveillanceStati on.AxisAcsCtrler"&limit=1&filterSource=91&eventTypes="1,2,3,45"&method="ListLog"
Response
Key data
Value <LogEnum Object>
Description Log list information.
Availability 4 and onward
<LogEnum Object> definition:
Key
Value
Description
data
total auInfo
Array of <LogEnumData Object>
<integer>
Array of <AutoUpdateInfo Object>
Array of log information.
Total count of logs in this data. Auto update information include deleted logs.
recCntData
Array of
log count of all category.
<AutoUpdateRecordCn
t Object>
timestamp
<integer>
UTC timestamp for current system time.
Availability 4 and onward
4 and onward 4 and onward
4 and onward
4 and onward
<LogEnumData Object> definition:
Key cam_ds_id
Value <integer>
cam_id
<integer>
cam_id_on_serve <integer>
Description
Availability
Paired camera server ID, 0 means local ds ID, 4 and onward
used only when event has playback ability
(event source from Door/IdPoint/AccessPoint).
Camera ID, used only when event has playback 4 and onward
ability (event source from
Door/IdPoint/AccessPoint).
Camera ID on recording server, used only when 4 and onward
Copyright � Synology Inc. All rights Reserved.
355
Synology Surveillance Station Web API
r
ctrler_id evt_grp
<integer> <integer>
evt_type
<integer>
event has playback ability (event source from Door/IdPoint/AccessPoint) and camera is from recording server.
Controller ID.
Event group type of this event. 0: Unknown 1: Access Control 2: Access Point 3: Configuration 4: Device 5: Door 6: Logger 7: Identification Point 8: Schedule 9: User Defined Schedule 10: Execute By SurveillanceStation
Event type of this event. 0: Unknown 1: Access Granted 2: Access Taken 3: Access Not Taken 4: Access Denied 5: Access Duress 6: Access Point Enabled 7: Access Point Disabled 8: Configuration Area Modify 9: Configuration Area Delete 10: Configuration Door Modify 11: Configuration Door Delete 12: Configuration Access Point Modify 13: Configuration Access Point Delete 14: Configuration Identification Point Modify 15: Configuration Identification Point Delete 16: Device Casing Open 17: Device Casing Close 18: Device IO Digital Input Active 19: Device IO Digital Input Normal 20: Device IO Virtual Input Active 21: Device IO Virtual Input Normal 22: Device Network Lost 23: Device Network Restore 24: Device Peer Connection Established 25: Device Peer Connection Lost 26: Device Peer Connection Failed 27: Device System Ready 28: Device System Unready 29: Device Action Failed 30: Door Alarm 31: Door Mode 32: Door Physical Status 33: Door Warning 34: Door Tampering
4 and onward 4 and onward
4 and onward
Copyright � Synology Inc. All rights Reserved.
356
Synology Surveillance Station Web API
id log_level
<integer> <integer>
owner_direct <integer>
owner_id
<integer>
owner_idpt_type <integer>
owner_info owner_name owner_type
<OwnerInfo Object> <string> <integer>
35: Logger Alarm
36: Logger Drop Event
37: Logger Drop Alarm
38: Identification Point Active
39: Identification Point Send Card Request For
Authenticate
40: Identification Point Send PIN Request For
Authenticate
41: Identification Point Send Rex Request For
Authenticate
42: Identification Point Tamper Active
43: Identification Point Tamper Normal
44: Identification Point Request Wait PIN
Timeout
45: Schedule Interval Begin
46: Schedule Interval End
47: Schedule Pulse
48: User Defined Schedule Interval Begin
49: User Defined Schedule Interval End
50: User Defined Schedule Pulse
51: Manual Lock
52: Manual Access
53: Manual Unlock
54: Hardware Auto Retrieve
55: Door Added By Controller Retrieve
56: Door Deleted By Controller Retrieve
57: Cardholder Added By Controller Retrieve
58: Cardholder Deleted By Controller Retrieve
Log ID.
4 and onward
Emergency level of this log.
4 and onward
1: Event
2: Alarm
Direction of element that caused this event, 4 and onward
used only when owner_type is IdPoint or
AccessPoint.
0: In
1: Out
ID of element that caused this event, combined 4 and onward
with owner_type to specify element.
Device type of element that caused this event, 4 and onward
used only when owner_type is IdPoint.
0: Reader
1: Rex (Request to Exit)
External owner information.
4 and onward
Name of the element that caused this event. 4 and onward
Element type that caused this event.
4 and onward
0: Unknown
1: SurveillanceStation User
2: Cardholder
3: Access Schedule
4: Event Schedule (Used Defined Schedule)
Copyright � Synology Inc. All rights Reserved.
357
Synology Surveillance Station Web API
photo_height photo_name photo_tmstmp photo_width playback
<integer> <string> <integer> <integer> <boolean>
src_direct
<integer>
src_id src_idpt_type
<integer> <integer>
src_name src_type
<string> <integer>
tmstmp update_time
<integer> <integer>
5: Controller
6: Door
7: AccessPoint
8: IdPoint
Photo height.
4 and onward
Photo name of event owner.
4 and onward
Photo update UTC timestamp.
4 and onward
Photo width.
4 and onward
If this event is possible to have camera video 4 and onward
playback (have pair camera info).
Direction of source place of this event, used 4 and onward
only when src_type is IdPoint or AccessPoint.
0: In
1: Out
ID of source place of this event, combined with 4 and onward
src_type to specify element.
Device type of source place of this event, used 4 and onward
only when src_type is IdPoint.
0: Reader
1: Rex (Request to Exit)
Name of source place of this event.
4 and onward
Element type of source place of this event.
4 and onward
0: Unknown
5: Controller
6: Door
7: AccessPoint
8: IdPoint
UTC unix timestamp of when this event happen. 4 and onward
UTC unix timestamp of when this event
4 and onward
retrieved by SurveillanceStation.
<OwnerInfo Object> definition:
Key
Value
port
<integer>
interface
<string>
mac_addr
<string>
description
<string>
status
<integer>
Category
<string>
log_num
<integer>
Reason
<string>
Action
<string>
Description
Availability
Port number of IO, external information of
4 and onward
device io event.
Network interface, external information of
4 and onward
device network event.
Controller MAC address, external information of 4 and onward
device peer connection event.
Description of event, external information of 4 and onward
device action failed event.
Door status, external information of door event, 4 and onward
see DoorData for more information.
Event group name, external information of
4 and onward
logger alarm event.
Log number, external information of logger
4 and onward
drop event/alarm.
Reason of event, external information of IdPoint 4 and onward
tamper/active/timeout event.
Action of authentication request, external
4 and onward
Copyright � Synology Inc. All rights Reserved.
358
Synology Surveillance Station Web API
PIN
<string>
REX
<string>
Card
<string>
information of IdPoint Card/PIN/REX request event.
Personal identification number, external information of IdPoint PIN request event.
Active or not, external information of IdPoint REX request event.
Card number, external information of IdPoint Card request event.
4 and onward 4 and onward 4 and onward
Example:
{ "data": { "total": 1, "data": [ { "photo_width": 0, "src_idpt_type": 1, "owner_direct": 0, "owner_info": {}, "photo_tmstmp": 0, "id": 7327, "photo_name": "Anonymous", "owner_idpt_type": 0, "playback": false, "ctrler_id": 97, "src_type": 5, "photo_height": 0, "owner_id": 0, "owner_name": "Office hours (Example)", "src_direct": 0, "tmstmp": 1424768400, "log_level": 2, "src_name": "ctrler", "src_id": 97, "evt_type": 45, "evt_grp": 8, "owner_type": 3 } ] }
}
2.3.38.23 Delete method
Delete select controllers. Request
Copyright � Synology Inc. All rights Reserved.
359
Synology Surveillance Station Web API
Parameter ids
Value <string>
Description Array string of select controller IDs.
Availability 4 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&ids="[91]"&version="1"&method="Delete"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.24 Retrieve method
Retrieve data from controller, include cardholders, hardware configuration, logger configuration.
Request
Parameter ctrlerId
Value <integer>
Description Controller ID for retrieve action.
Availability 4 and onward
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&ctrlerId=97&version="1"&method="Retrieve"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.25 BlockCardHolder method
Blocked cardholders to suspend their credential in controller, these cardholders can't access the door until unblocked.
Request
Parameter arrayJson
Value <string>
Description String array of block/unblock cardholder ID.
Availability 4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi? arrayJson="[576,577,578]"&api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="BlockCar dHolder"
Copyright � Synology Inc. All rights Reserved.
360
Synology Surveillance Station Web API Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.38.26 CountByCategory method
Get controller count of all categories.
Request This method specifies no parameter.
Example: http://192.168.1.1:5000/webapi/entry.cgi? api="SYNO.SurveillanceStation.AxisAcsCtrler"&version="1"&method="CountByCategory"
Response
Key data
Value <CtrlerCategCnt Object>
Description Controller count of all categories.
Availability 4 and onward
<CtrlerCategCnt Object> definition:
Key
Value
status total
<CtrlerCntByStatus Object>
<integer>
Description Controller count of status category.
Total count of all controllers.
Availability 4 and onward
4 and onward
Example:
{ "data": { "status": { "1": 0, "0": 1, "2": 0, "-1": 1, "4": 0 }, "total": 1 }
}
2.3.38.27 API Error Code
Copyright � Synology Inc. All rights Reserved.
361
Synology Surveillance Station Web API
Code 400 401 402 403 404
Execution failed. Parameter invalid. Camera disabled. Insufficient license. Codec acitvation failed
Description
Copyright � Synology Inc. All rights Reserved.
362
Synology Surveillance Station Web API
2.3.39 SYNO.SurveillanceStation.AxisAcsCtrler.Search
This API provides start and get result method for controller upnp search.
Name SYNO.SurveillanceStation.AxisAcsCtrler.Search
Method Name Start
InfoGet
Version 1
Section 2.3.40.1 2.3.39.2
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward
2.3.39.1 Start method
Start controller search and keep searching for 60 seconds.
Request No parameter is required. Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.AxisAcsCtrler.Search"&version="1"&method="Start"
Response Key
pid
Value <integer>
Description Controller search process ID, used as a
Availability 1 and onward
parameter to get search result by InfoGet action.
Example:
{ "pid": 10017
}
2.3.39.2 InfoGet method
Get controller search result, pid is from Start request.
Request
Parameter pid
Value <integer>
offset
<integer>
Description Required. The selected camera id. Optional. Search result data offset, used to skip old result.
If parameter is not specified, the default value will be 0.
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
363
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? method="InfoGet"&api="SYNO.SurveillanceStation.AxisAcsCtrler.Search"&pid=10017&version="1"&offset= 0
Response Key
alive
Value <boolean>
ctrlers
Array of <CtrlerDeviceInfo>
Description Controller search process ID, used as a
Availability 1 and onward
parameter to get search result by InfoGet action.
Controller device information, include IP, port, 1 and onward
MAC address, model, and vendor.
<SearchPid> definition:
Key ip
Value <string>
mac
<string>
model
<string>
port
<integer>
vendor
<string>
Description Controller IP address. Controller MAC address. Controller model name. Controller port number. Controller vendor name.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
{ "ctrlers": [{ "ip": "10.13.12.173", "mac": "AC:CC:8E:09:C8:84", "vendor": "AXIS", "model": "AXIS A1001", "port": 80 }], "alive": true
}
2.3.39.3 API Error Code
Code 400
Execution failed.
Description
Copyright � Synology Inc. All rights Reserved.
364
Synology Surveillance Station Web API
2.3.40 SYNO.SurveillanceStation.DigitalOutput
Digital output related WebAPI. e.g. Enumerate parameters and Long polling for current state and Save parameters.
Name SYNO.SurveillanceStation.DigitalOutput
Method Name Enum Save
PollState
Version 1
Section 2.3.40.1 2.3.40.2 2.3.40.3
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward 1 and onward
2.3.40.1 Enum method
Enumerate digital output parameters. e.g. keep setting, normal state, current state and trigger button toggle state.
Request
Parameter camId
Value <integer>
Description Required. The selected camera id.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.DigitalOutput"&camId=280&version="1"&method="Enum"
Response
Key list
Value Array of <list>
Description The digital output parameters in array list.
Availability 1 and onward
<list> definition:
Key idx
Value <integer>
keep_setting <boolean>
normal_state <integer>
current_state <integer>
trigger_state <boolean>
Description The digital output index. Define the keep the camera original setting. Define the camera normal state. Define the camera current state. Define the trigger button toggle state.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example: {
Copyright � Synology Inc. All rights Reserved.
365
Synology Surveillance Station Web API
"list": [ { "trigger_state": true, "current_state": 1, "keep_setting": true, "idx": 0, "normal_state": 0 }
] }
2.3.40.2 Save method
Save digital output parameters. e.g. keep setting, normal state and trigger state.
Request Parameter
camId
Value <integer>
idx
<integer>
keep_setting <boolean>
normal_state <integer>
trigger_state <boolean>
Required.
Description
The selected camera id.
Required.
The selected digital output index.
Required.
Define the keep the camera original setting.
Required.
Define the camera normal state.
Required.
Define the trigger button toggle state.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? camId=280&trigger_state=false&version="1"&idx=0&keep_setting=true&api="SYNO.SurveillanceStation.Di gitalOutput"&method="Save"&normal_state=1
Response
Key camId
Value <integer>
Description The selected camera id .
Availability 1 and onward
Example:
{ "camId": 280
}
Copyright � Synology Inc. All rights Reserved.
366
Synology Surveillance Station Web API
2.3.40.3 PollState method
Long polling digital output status. e.g. current state.
Request Parameter
camId idx keep setNormalCap normal trigger timeOut
Value <integer> <integer> <boolean> <boolean> <integer> <boolean> <integer>
Description The selected camera id. The selected digital output index. Define the keep the camera original setting. Define the setting camera normal state capability. Define the camera normal state. Define the trigger button toggle state. Define the max waiting time.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? version="1"&camId=280&timeOut=5000&idx=0&normal=1&api="SYNO.SurveillanceStation.DigitalOutput" &trigger=false&setNormalCap=true&method="PollState"&keep=true
Response
Key
Value
current_state <integer>
Example:
{ "current_state": 0
}
Description The camera current state.
Availability 1 and onward
2.3.40.4 API Error Code
Code 400 401 402
Execution failed. Parameter invalid. Camera disabled.
Description
Copyright � Synology Inc. All rights Reserved.
367
Synology Surveillance Station Web API
2.3.41 SYNO.SurveillanceStation.ExternalEvent
External event related WebAPI. The method "Trigger" is implemented.
Name SYNO.SurveillanceStation.ExternalEvent
Method Name Trigger
Version 1
Section 2.3.41.1
Availability Surveillance Station 7.0
Availability 1 and onward
2.3.41.1 Trigger method
Trigger the external event specified by eventId with event name specified by eventName.
Request
Parameter eventId
Value <integer>
eventName <string>
Description Required. ID of the to-be-triggered external event. Optional. Name of the to-be-triggered external event.
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.ExternalEvent"&eventId=1&version="1"&method="Trigger"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.41.2 API Error Code
Code 401
Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
368
Synology Surveillance Station Web API
2.3.42 SYNO.SurveillanceStation.IOModule
This API provides a set of methods to acquire IO module-related information and to enable/disable IO modules.
API Name SYNO.SurveillanceStation.IOModule
Method Name Enum
EnumPort EnumVendorModel
Save Enable Disable Delete TestConn GetCap PortSetting PollingDI PollingDO GetDevNumOfDs CountByCategory
Version 1
Section 2.3.42.1 2.3.42.2 2.3.42.3 2.3.42.4 2.3.42.5 2.3.42.6 2.3.42.7 2.3.42.8 2.3.42.9 2.3.42.10 2.3.42.11 2.3.42.12 2.3.42.13 2.3.42.14
Availability Surveillance Station 7.1
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.42.1 Enum method
Get the list of all IO modules.
Request Parameter
start limit
blFromList
ownerDsId
Value <integer> <integer>
<boolean>
Description
Optional. The offset to be shifted in the total result. If not specified, the offset will be 0.
Optional. Number of IO modules to be returned. If not specified, return IO modules to the end of IO
module list.
Optional Indicating if the caller is from IO module list Set to be false if not specified.
<integer> Optional. The owner DS ID of I/O port.
Availability 1 and onward 1 and onward
1 and onward
1 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
369
Synology Surveillance Station Web API
GET /webapi/entry.cgi? start=0&limit=50&blFromList=true&api=SYNO.SurveillanceStation.IOModule&method=Enum&version=1
Response Key
keyUsedCnt localTotalCnt
modules
Value <integer> <integer>
Array of <IO module List Object>
Description
The number of total installed devices. The number of local total installed IO modules. The list of queried IO modules.
Availability 1 and onward 1 and onward
1 and onward
<IO module List Object> definition:
Key
Value
DONum DINum
<integer> <integer>
IONum
<integer>
id enabled
<integer> <boolean>
name
<string>
vendor model
<string> <string>
hostname port username
<string> <integer> <string>
update_time owner_ds_id id_on_rec_server
<integer> <integer> <integer>
status_flags
<integer>
status_on_rec_server status io_list
multiDI
<integer>
<integer> Array of <IO list Object> <boolean>
setDICap
<boolean>
setDOCap
<boolean>
enable_ntp time_server
<boolean> <string>
Description Digital output number Digital input number Digital changeable IO port number IO module ID Whether the IO module is enabled Name of IO module Vendor name of IO module Model name of IO module Hostname of IO module Connection port of IO module User name of IO module The last update time in timestamp The ID of the owner of this IO module The ID of IO module on the owner DS Flags of the IO module status
IO module status on the owner DS IO module status The digital I/O parameters in array list.
Whether the IO module supports multiple input detection Whether the IO module supports digital input normal state setting Whether the IO module supports digital output normal state setting Whether the IO module enables NTP NTP time server of the IO module
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
1 and onward
1 and onward 1 and onward
<IO list Object> definition:
Key idx
Value <integer>
keep_setting <boolean>
normal_state <integer>
Description The digital I/O index. Define the keep the original setting. Define the I/O normal state.
Availability 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
370
Synology Surveillance Station Web API
current_state <integer>
trigger_state <boolean>
io_type
0,1,2,3
name
<string>
Define the current I/O state.
Define the trigger button toggle state.
I/O type � 0: Unknown � 1: Digital ouput � 2: Audio � 3: Digital input
The I/O port name
Example:
{ "data": { "keyUsedCnt": 2, "localTotalCnt": 0, "modules": [{ "DINum": 8, "DONum": 7, "IONum": 0, "cap_file_path": "", "enable_ntp": false, "enabled": true, "hostname": "10.13.12.185", "id": 10, "id_on_rec_server": 1, "io_list": [{ "current_state": 0, "idx": 0, "io_type": 3, "keep_setting": false, "name": "IO Port 1", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 1, "io_type": 3, "keep_setting": false, "name": "IO Port 2",
1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
371
Synology Surveillance Station Web API
"normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 2, "io_type": 3, "keep_setting": false, "name": "IO Port 3", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 3, "io_type": 3, "keep_setting": false, "name": "IO Port 4", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 4, "io_type": 3, "keep_setting": false, "name": "IO Port 5", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 5, "io_type": 3, "keep_setting": false, "name": "IO Port 6", "normal_state": 0, "trigger_state": false
Copyright � Synology Inc. All rights Reserved.
372
Synology Surveillance Station Web API
}, {
"current_state": 0, "idx": 6, "io_type": 3, "keep_setting": false, "name": "IO Port 7", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 7, "io_type": 3, "keep_setting": false, "name": "IO Port 8", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 8, "io_type": 1, "keep_setting": false, "name": "IO Port 9", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 9, "io_type": 1, "keep_setting": false, "name": "IO Port 10", "normal_state": 0, "trigger_state": false }, {
Copyright � Synology Inc. All rights Reserved.
373
Synology Surveillance Station Web API
"current_state": 0, "idx": 10, "io_type": 1, "keep_setting": false, "name": "IO Port 11", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 11, "io_type": 1, "keep_setting": false, "name": "IO Port 12", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 12, "io_type": 1, "keep_setting": false, "name": "IO Port 13", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 13, "io_type": 1, "keep_setting": false, "name": "IO Port 14", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 14,
Copyright � Synology Inc. All rights Reserved.
374
Synology Surveillance Station Web API
"io_type": 1, "keep_setting": false, "name": "IO Port 15", "normal_state": 0, "trigger_state": false }], "is_deleted": false, "model": "ADAM-6250", "multiDI": true, "name": "dwdwd", "owner_ds_id": 4, "password": "", "path": "", "port": 1025, "setDICap": true, "setDOCap": false, "status": 1, "status_flags": 0, "status_on_rec_server": 1, "time_server": "--", "update_time": 5, "username": "", "vendor": "Advantech" }] }, "success": true }
2.3.42.2 EnumPort method
Get the IO port list of a specified IO module.
Request Parameter
Id Port
IP
User
Value <integer> <integer>
Description IO module ID The connection port of IO module
<string> The hostname of IO module
<string> The user name of IO module
Availability 1 and onward 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
375
Synology Surveillance Station Web API
Pass
<string> The user password of IO module
Vendor
<string> The vendor name of IO module
Model
<string> The model name of IO module
1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi?Id=11&IP="10.13.12.185"&Port=1025&Vendor="Advantech"&Model="ADAM6250"&api=SYNO.SurveillanceStation.IOModule&method=EnumPort&version=1
Response
Key data
Value
Description
Availability
Array of < IO list Object> The digital I/O parameters in array list. 1 and onward
<IO list Object> definition:
Key idx
Value <integer>
keep_setting <boolean>
normal_state <integer>
current_state <integer>
trigger_state <boolean>
io_type
0,1,2,3
name
<string>
Description The digital I/O index.
Define the keep the original setting.
Define the I/O normal state.
Define the current I/O state.
Define the trigger button toggle state. I/O type � 0: Unknown � 1: Digital ouput � 2: Audio � 3: Digital input The I/O port name
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Example:
{ "data": [{ "current_state": 0, "idx": 0, "io_type": 3, "keep_setting": false, "name": "IO Port 1", "normal_state": 0, "trigger_state": false }, { "current_state": 0,
Copyright � Synology Inc. All rights Reserved.
376
Synology Surveillance Station Web API
"idx": 1, "io_type": 3, "keep_setting": false, "name": "IO Port 2", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 2, "io_type": 3, "keep_setting": false, "name": "IO Port 3", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 3, "io_type": 3, "keep_setting": false, "name": "IO Port 4", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 4, "io_type": 3, "keep_setting": false, "name": "IO Port 5", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 5, "io_type": 3,
Copyright � Synology Inc. All rights Reserved.
377
Synology Surveillance Station Web API
"keep_setting": false, "name": "IO Port 6", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 6, "io_type": 3, "keep_setting": false, "name": "IO Port 7", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 7, "io_type": 3, "keep_setting": false, "name": "IO Port 8", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 8, "io_type": 1, "keep_setting": false, "name": "IO Port 9", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 9, "io_type": 1, "keep_setting": false, "name": "IO Port 10",
Copyright � Synology Inc. All rights Reserved.
378
Synology Surveillance Station Web API
"normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 10, "io_type": 1, "keep_setting": false, "name": "IO Port 11", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 11, "io_type": 1, "keep_setting": false, "name": "IO Port 12", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 12, "io_type": 1, "keep_setting": false, "name": "IO Port 13", "normal_state": 0, "trigger_state": false }, { "current_state": 0, "idx": 13, "io_type": 1, "keep_setting": false, "name": "IO Port 14", "normal_state": 0, "trigger_state": false
Copyright � Synology Inc. All rights Reserved.
379
Synology Surveillance Station Web API
}, {
"current_state": 0, "idx": 14, "io_type": 1, "keep_setting": false, "name": "IO Port 15", "normal_state": 0, "trigger_state": false }], "success": true }
2.3.42.3 EnumVendorModel method
Get the supported list of IO modules.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.IOModule&method=EnumVendorModel&version=1
Response
Key IOModel
Value
Array of <supported list Object>
Description The supported list of IO module.
<supported list Object> definition:
Key vendor
Value <string>
model_no <string>
Description The vendor name of IO module
The model name of IO module
Availability 1 and onward
Availability 1 and onward 1 and onward
Example:
{ "data": { "IOModel": [{ "model_no": "P8221", "vendor": "AXIS" }, { "model_no": "ADAM-6050",
Copyright � Synology Inc. All rights Reserved.
380
Synology Surveillance Station Web API
"vendor": "Advantech" }, {
"model_no": "ADAM-6052", "vendor": "Advantech" }, { "model_no": "ADAM-6250", "vendor": "Advantech" }, { "model_no": "ADAM-6266", "vendor": "Advantech" }] }, "success": true }
2.3.42.4 Save method
Save the setting of IO module.
Request Parameter
name id ownerDsId vendor model ip port
userName
enabled
status
timeServer
passWord
ntpEnable
DIOdata
Value <string> <integer>
Description The name of IO module IO module ID, 0 means inserting a IO module
Availability 1 and onward 1 and onward
<integer> <string> <string>
The ID of the owner of this IO module The vendor name of IO module The model name of IO module
1 and onward 1 and onward 1 and onward
<string> The hostname of IO module
1 and onward
<integer> The connection port of IO module
1 and onward
<string> The user name of IO module
1 and onward
<boolean> Whether the IO module is enabled
1 and onward
<integer> IO module status
1 and onward
<string> NTP time server of IO module
1 and onward
<string> The user password of IO module
1 and onward
<boolean> Whether the IO module enables NTP
1 and onward
Array of <IO The digital I/O parameters in array list. list Object>
1 and onward
Copyright � Synology Inc. All rights Reserved.
381
Synology Surveillance Station Web API
<IO list Object> definition:
Key idx
Value <integer>
keep
<boolean>
normal
<integer>
trigger_state <boolean>
type
0,1,2,3
name
<string>
Description The digital I/O index.
Define the keep the original setting.
Define the I/O normal state.
Define the trigger button toggle state. I/O type � 0: Unknown � 1: Digital ouput � 2: Audio � 3: Digital input The I/O port name
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? ownerDsId=0&id=10&name="dwdwdfwefwewef"&ip="10.13.12.185"&port="1025"&vendor="Advantech" &model="ADAM-6250"&userName=""&passWord=" "&enabled="true"&status=0&DIOdata=[{"idx":0,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 1","normal":0},{"idx":1,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 2","normal":0}, {"idx":2,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 3","normal":0}, {"idx":3,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 4","normal":0}, {"idx":4,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 5","normal":0}, {"idx":5,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 6","normal":0}, {"idx":6,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 7","normal":0}, {"idx":7,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 8","normal":0}, {"idx":8,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 9","normal":0}, {"idx":9,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 10","normal":0}, {"idx":10,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 11","normal":0}, {"idx":11,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 12","normal":0}, {"idx":12,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 13","normal":0}, {"idx":13,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 14","normal":0}, {"idx":14,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 15","normal":0}]&actFromHost=false&ntpEnable=false&timeServer="--"&api=SYNO.SurveillanceStation.IO Module&method=Save&version=1
Response Key
id editTime
Example: {
Value <integer> <integer>
Description IO module ID The time of this edit operation
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
382
Synology Surveillance Station Web API
"data": { "editTime": 1458555950, "id": 10, "success": true
}, "success": true }
2.3.42.5 Enable method
Activate IO modules.
Request
Parameter iomlist
Value
Description
<string> ID list of IO module
Availability 1 and onward
Example:
GET /webapi/entry.cgi? iomlist="10,11"&api=SYNO.SurveillanceStation.IOModule&method=Enable&version=1
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.42.6 Disable method
Deactivate IO modules.
Request
Parameter iomlist
Value
Description
<string> ID list of IO module
Availability 1 and onward
Example:
GET /webapi/entry.cgi? iomlist="10,11"&api=SYNO.SurveillanceStation.IOModule&method=Disable&version=1
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.42.7 Delete method
Remove IO modules.
Request
Copyright � Synology Inc. All rights Reserved.
383
Synology Surveillance Station Web API
Parameter iomlist
Value <string> ID list of IO module
Description
Availability 1 and onward
Example: GET /webapi/entry.cgi? iomlist="10,11"&api=SYNO.SurveillanceStation.IOModule&method=Disable&version=1
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.42.8 TestConn method
Test the connection availability to the specified IO module.
Request Parameter
id port
ip
userName passWord
model
Value <integer> <integer>
Description IO module ID The connection port of IO module
Availability 1 and onward 1 and onward
<string> The hostname of IO module
1 and onward
<string> <string>
The user name of IO module The user password of IO module
1 and onward 1 and onward
<string> The compounded vendor and model name of IO module 1 and onward
Example:
GET /webapi/entry.cgi?id=11&ip="10.13.12.185"&port="1025"&userName=""&passWord=" "&model="Advantech ADAM6250"&api=SYNO.SurveillanceStation.IOModule&method=TestConn&version=1
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.42.9 GetCap method
Get the capability of the specified IO module.
Request
Parameter vendor model
Value <string> <string>
Description The vendor name of IO module The model name of IO module
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
384
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? vendor="AXIS"&model="P8221"&api=SYNO.SurveillanceStation.IOModule&method=GetCap&version=1
Response
Key iomoduleCap
Value
Description
Availability
Array of <cap list Object> The capability of IO module in array list. 1 and onward
<cap list Object> definition:
Key DONum DINum IONum ADCap AudioList audioCap defAudio ChanlList
cntChanl defChanl defUser defPass rtspProtocolCap
defRtspProtocol id
multiDI
setDICap
setDOCap
ntpCap ntpServerList
Value
Description
Availability
<integer>
Digital output number
1 and onward
<integer>
Digital input number
1 and onward
<integer>
Digital changeable IO port number
1 and onward
<integer>
Audio detection capability
1 and onward
<integer>
Audio capability
1 and onward
<boolean>
Whether IO module has audio capability
1 and onward
<integer>
Default audio codec setting
1 and onward
Array of <channel The channel name in array list.
1 and onward
Object>
<integer>
The channel count
1 and onward
<string>
Default channel name
1 and onward
<string>
Default username of IO module
1 and onward
<integer>
Default password of IO module
1 and onward
<integer>
Indicating the supported protocol of RTSP 1 and onward
which is bitwise OR of following values
� 0: NONE
� 1: UDP
� 2: TCP
� 3: HTTP
� 4: Auto
0 ... 4
Default RTSP protocol
1 and onward
<string>
The compounded vendor and model name of 1 and onward
IO module
<boolean>
Whether the IO module supports multiple 1 and onward
input detection
<boolean>
Whether the IO module supports digital
1 and onward
input normal state setting
<boolean>
Whether the IO module supports digital
1 and onward
output normal state setting
<boolean>
Whether the IO module enables NTP
1 and onward
Array of <time server The NTP time server in array list.
1 and onward
Object>
<channel Object> definition:
Key channel
Value <string>
Description The channel number
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
385
Synology Surveillance Station Web API
< time server Object> definition:
Key ntpServer
Value <string>
Description The NTP time server
Example:
{ "data": { "iomoduleCap": [{ "ADCap": 0, "AudioList": 0, "ChanlList": [{ "channel": "1" }], "DINum": 4, "DONum": 4, "IONum": 0, "audioCap": false, "cntChanl": 1, "defAudio": 0, "defChanl": "1", "defPass": "", "defRtspProtocol": 4, "defUser": "root", "id": "AXIS P8221", "multiDI": true, "ntpCap": true, "ntpServerList": [{ "ntpServer": "Surveillance Station" }, { "ntpServer": "time.nist.gov" }, { "ntpServer": "disable" }], "rtspProtocolCap": 15, "setDICap": true, "setDOCap": true }], "success": true }, "success": true
}
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
386
Synology Surveillance Station Web API
2.3.42.10 PortSetting method
Configure I/O port setting of IO module.
Request Parameter
id
DIOdata
Value
Description
<integer> IO module ID, 0 means inserting a IO module
Array of <IO The digital I/O parameters in array list. list Object>
Availability 1 and onward
1 and onward
<IO list Object> definition:
Key idx
Value <integer>
keep
<boolean>
normal
<integer>
trigger_state <boolean>
type
0,1,2,3
name
<string>
Description The digital I/O index.
Define the keep the original setting.
Define the I/O normal state.
Define the trigger button toggle state. I/O type � 0: Unknown � 1: Digital ouput � 2: Audio � 3: Digital input The I/O port name
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi?id=10&DIOdata=[{"idx":0,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 1","normal":0},{"idx":1,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 2","normal":0}, {"idx":2,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 3","normal":0}, {"idx":3,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 4","normal":0}, {"idx":4,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 5","normal":0}, {"idx":5,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 6","normal":0}, {"idx":6,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 7","normal":0}, {"idx":7,"keep":false,"trigger_state":false,"type":3,"name":"IO Port 8","normal":0}, {"idx":8,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 9","normal":0}, {"idx":9,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 10","normal":0}, {"idx":10,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 11","normal":0}, {"idx":11,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 12","normal":0}, {"idx":12,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 13","normal":0}, {"idx":13,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 14","normal":0}, {"idx":14,"keep":false,"trigger_state":false,"type":1,"name":"IO Port 15","normal":0}]&api=SYNO.SurveillanceStation.IOModule&method=PortSetting&version=1
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
387
Synology Surveillance Station Web API
2.3.42.11 PollingDI method
Poll trigger state of I/O module. When trigger state of I/O module change, this WebAPI return with updated state.
Request Parameter
Id
list
timeOut
Value <integer>
Array of <IOModule DIStatus Object> <integer>
Description
Required. The selected I/O module id.
Required. Define the I/O module original state.
Required. Define the maximum waiting time for polling I/O module trigger state if no changed.
Availability 1 and onward
1 and onward
1 and onward
<IOModuleDIStatus Object> Definition:
Key idx trigger
Value <integer> <integer>
Description
The index of I/O port.
The trigger state of this I/O port. e.g. 0:untrigger, 1:triggered.
Availability 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi?Id=1&list=[{"idx":0,"trigger":1}, {"idx":1,"trigger":0}]&timeOut=10000&api=SYNO.SurveillanceStation.IOModule&method=PollingDI&versio n=1
Response Key
list
success
Value
Description
Array of <IOModuleDIStatus The updated I/O module DI trigger state
Object>
list.
<boolean>
Webapi success or not.
Availability 1 and onward
1 and onward
Example:
{ "data":{ "list":[ { "idx":0, "trigger":1 }, { "idx":1, "trigger":1 } ] },
Copyright � Synology Inc. All rights Reserved.
388
Synology Surveillance Station Web API "success":true
}
2.3.42.12 PollingDO method
Poll DO trigger state of I/O module. Call after PortSetting to check if set port done.
Request Parameter
Id
idx
normal
trigger
timeOut
Value <integer> <integer> <integer> <boolean> <integer>
Description Required. The selected I/O module id. Required. The index of I/O port. Required. The normal state of I/O port. Required. The updated state of I/O port. Required. Define the maximum waiting time for polling I/O module DI trigger state if no changed.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? Id=1&idx=4&normal=0&trigger=true&timeOut=10000&api=SYNO.SurveillanceStation.IOModule&method= PollingDO&version=1
Response Key
data
success
Value
Description
Availability
<IOModuleDOStatus Object> The updated I/O module DO trigger state. 1 and onward
<boolean>
Webapi success or not.
1 and onward
<IOModuleDOStatus Object>
Key
Value
current_state <integer>
Description The trigger state of this I/O port. e.g. 0:untrigger, 1:triggered.
Availability 1 and onward
Example:
{ "data":{ "current_state":1 }, "success":true
}
Copyright � Synology Inc. All rights Reserved.
389
Synology Surveillance Station Web API
2.3.42.13 GetDevNumOfDs method
Get number of devices in each DS.
Request No parameter is required.
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IOModule"&method="GetDevNumOfDs"&version="1"
Response Key
data
success
Value <DeviceNumber Map>
<boolean>
Description The map of device number.
Webapi success or not.
Availability 1 and onward 1 and onward
<DeviceNumber Map> definition:
Key dsId
Value
Description
<DeviceNumb Device number of mapped server.
er Object> The key of this map is a string of dsId. eg. "0", "15".
Availability 1 and onward
<DeviceNumber Object> definition:
Key devNum
Value <integer>
Description Device number from server.
dsId
<integer> Server's ds id.
Availability 1 and onward
1 and onward
Example:
{ "data":{ "devNumMap":{ "0":{ "devNum":0, "dsId":0 }, "1":{ "devNum":1, "dsId":1 } } }, "success":true
}
Copyright � Synology Inc. All rights Reserved.
390
Synology Surveillance Station Web API
2.3.42.14 CountByCategory method
Get category count of IO module.
Request
Parameter start
Value <integer>
limit
<integer>
ownerDsId blFromList
<integer> <boolean>
Description
Optional. The offset to be shifted in the total result. If not specified, the offset will be 0.
Optional. Number of cameras to be returned. If not specified, return count to the end of IO module list.
Optional. The owner DS ID of I/O port.
Optional. Indicating if the caller is from IO module list Set to be false if not specified.
Availability 1 and onward
1 and onward
1 and onward 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IOModule"&method="CountByCategory"&version="1"
Response
Key data total
success
Value
Description
Array of <iomodule_status> The list of iomodule status.
<integer>
Total count of I/O modules.
<boolean>
Webapi success or not.
Availability 1 and onward 1 and onward 1 and onward
<iomodule_status> definition:
Key
Value
1
<integer>
3
<integer>
7
<integer>
12
<integer>
-1
<integer>
Description Count of normal status. Count of disconnected status. Count of disabled status. Count of others status. Total count of I/O modules.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
{ "data":{ "iomodule_status":{ "-1":1, "1":1, "12":0, "3":0, "7":0
Copyright � Synology Inc. All rights Reserved.
391
Synology Surveillance Station Web API
}, "total":1 }, "success":true }
2.3.42.15 API Error Code
Code 100 400 401 402 403
Unknown error. Execution failed. Parameter invalid. IO module disabled. Insufficient license.
Description
Copyright � Synology Inc. All rights Reserved.
392
Synology Surveillance Station Web API
2.3.43 SYNO.SurveillanceStation.IOModuleSearch
Searching I/O modules via UPnP and get searching status.
Name SYNO.SurveillanceStation.IOModule.Search
Method Name Start
InfoGet
Version 1
Section 2.3.43.1 2.3.43.2
Availability Surveillance Station 7.0
Availability 1 and onward 1 and onward
2.3.43.1 Start method
Start to search the I/O module.
Request No parameter is required. Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.IOModule.Search"&version="1"&method="Start"
Response
Key pid
Value <integer>
Description The pid of the searching process.
Availability 1 and onward
2.3.43.2 InfoGet method
Get the searching info.
Request
Key pid
Value <integer>
Description Required. The pid of the searching process.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IOModule.Search"&version="1"&method="InfoGet"&pid=3604
Response
Copyright � Synology Inc. All rights Reserved.
393
Synology Surveillance Station Web API
Key moduleList searchStatus
Value <IOModule> Array <boolean>
Description List of I/O module found. Is the searching process alive.
<IOModule Object> definition:
Key ip mac model port vendor
Value <string> <string> <string> <integer> <string>
Description IP of the I/O module. I/O module MAC address. Model of the I/O module. Port of the I/O module. Vendor of the I/O module.
Example:
{ "moduleList":[{ "ip":"10.13.23.18", "mac":"AC:CC:8E:4B:DA:47", "model":"P8221", "port":80, "vendor":"AXIS" }], "searchStatus":true
}
2.3.43.3 API Error Code
Code 400 401
Operation Failed. Parameter invalid.
Description
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
394
Synology Surveillance Station Web API
2.3.44 SYNO.SurveillanceStation.Camera.Status
Get current camera status infomation.
Name SYNO.SurveillanceStation.Camera.Status
Method Name OneTime
Version 1
Section 2.3.44.1
Availability Surveillance Station 7.2.2
Availability 1 and onward
2.3.44.1 OneTime method
Get current camera status.
Request
Key id_list
Value <string>
Description Required. List of camera IDs.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Status"&version=1&method="OneTime"&id_list="1,2"
Response
Key CamStatus
Value <string>
Description
Array of camera infomation. [ID, Status, VideoType, Has audio (bool), Volume of sound, Mute (bool), Alert trigger level]
Availability 1 and onward
Definition:
Key Status
Value <integer>
VideoType
<integer>
0: Unknown 1: Starting 2: Running 3: Stopping 4: Stopped 5: Retrying
1: Mjpeg 2: Mpeg4
Description
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
395
Synology Surveillance Station Web API
3: H264 4: Emap 5: Mxpeg 6: H265
Example: {
"CamStatus":"[1 2 3 1 50 0 0],[2 2 3 1 50 0 0]" }
2.3.44.2 API Error Code
Code 400 401
Operation Failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
396
Synology Surveillance Station Web API
2.3.45 SYNO.SurveillanceStation.PTZ.Preset
This API provides a set of methods to execute preset action for PTZ cameras.
Name SYNO.SurveillanceStation.PTZ.Preset
Method Name Enum GetInfo
SetPreset DelPreset Execute SetHome
Version 1
Section 2.3.45.1 2.3.45.2 2.3.45.3 2.3.45.4 2.3.45.5 2.3.45.6
Availability Surveillance Station 7.2.2
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.45.1 Enum method
Enum preset list from camera.
Request
Key cameraId
Value <CAMERA_ID>
Description
Required. Unique camera ID.
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="Enum"&cameraId=4
Response
Key camId preset
Value <CAMERA_ID> <Preset> Array
Description Unique camera ID. List of preset information.
Availability 1 and onward 1 and onward
<Preset> Definition:
Key name position speed Type
Value <string> <integer> <integer> <integer>
Description Name of the preset. ID of preset in camera. Speed of preset. 0: Normal 1: Home
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
397
Synology Surveillance Station Web API
Example:
{ "camId":4, "preset":[{ "name":"home", "position":0, "speed":3, "type":1 }]
}
2.3.45.2 GetInfo method
Get preset capability from camera.
Request
Key cameraId
Value <CAMERA_ID>
Description
Required. Unique camera ID.
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="GetInfo"&cameraId=4
Response
Key id presetNum pt_speed ptz
ptzAutoPanType
Value <CAMERA_ID> <integer> <integer> <integer>
<integer>
Description
Unique camera ID.
Max preset number.
Speed of pan and tilt.
Bitwise camera step ptz capability. 0x001: Pan 0x002: Tilt 0x004: Zoom 0x008: Home 0x010: Abs position 0x020: Focus 0x040: Auto focus 0x080: Iris 0x100: Ptz speed 0x200: Zoom speed
Autopan implement type. 0: No autopan 1: By Surveillance Station simulation 2: Keep autopan until stop command.
Availability 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
398
Synology Surveillance Station Web API
ptzContinuous
<integer>
ptzDirection
<integer>
ptzHasObjTracking
<boolean>
ptz_speed_keep_origin <boolean>
zoom_speed
<integer>
3: Autopan one cycle for each command.
Bitwise camera continues ptz capability. 0x001: Pan 0x002: Tilt 0x004: Zoom 0x008: Home 0x010: Abs position 0x020: Focus 0x040: Auto focus 0x080: Iris 0x100: Ptz speed 0x200: Zoom speed
Direction of camera ptz. 1: Pan right 5: Up right 9: Tilt up 13: Up left 17: Pan left 21: Down left 25: Tilt down 29: Down right 33: Home 34: Zoom in 35: Zoom out 36: Iris in 37: Iris out 38: Focus in 39: Focus out 40: Auto focus 41: Abs position 42: Auto pan 43: Object tracking
If camera has object tracking capability.
If camera ptz speed modifiable.
Speed of zoom.
Example:
{ "id":4, "presetNum":100, "pt_speed":3, "ptz":511, "ptzAutoPanType":0, "ptzContinuous":39, "ptzDirection":32, "ptzHasObjTracking":false, "ptz_speed_keep_origin":true, "zoom_speed":3
}
1 and onward
1 and onward
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
399
Synology Surveillance Station Web API
2.3.45.3 SetPreset method
Record current camera position as preset point and set back to camera.
Request
Key cameraId position
speed
name
Value <CAMERA_ID> <integer>
<integer>
<string>
Description
Unique camera ID.
Required. ID of preset in camera.
Optional. Speed of ptz, default to 3.
Required. Name of the preset.
Availability 1 and onward 1 and onward
1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="SetPreset"&cameraId=4&position=1&n ame="Preset1"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.45.4 DelPreset method
Delete list of preset from camera.
Request
Key cameraId
position
Value <CAMERA_ID>
<string>
Description
Required. Unique camera ID.
Required. List of preset position.
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="DelPreset"&cameraId=4&position="1,2 ,5"
Response This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
400
Synology Surveillance Station Web API
2.3.45.5 Execute method
Go to specific preset by given speed.
Request
Key cameraId
position
Value <CAMERA_ID>
<integer>
speed type
<integer> <integer>
Description
Required. Unique camera ID.
Required. ID of preset in camera. Should be -1 when type is 1(Home).
Optional. Speed to go to preset.
Is this preset home or not. 0: Normal 1: Home
Availability 1 and onward 1 and onward
1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="Execute"&cameraId=4&position=1&spe ed=3
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.45.6 SetHome method
Set current camera position as Home preset.
Request
Key cameraId
Value <CAMERA_ID>
bindPosition <integer>
Description
Required. Unique camera ID.
Optional. Set Home position to specific ID of preset in camera.
Availability 1 and onward
1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="SetHome"&cameraId=4
Response
Copyright � Synology Inc. All rights Reserved.
401
Synology Surveillance Station Web API This method has no specific response data. It returns an empty success response if it completes without error.
2.3.45.7 API Error Code
Code 400 401
Operation Failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
402
Synology Surveillance Station Web API
2.3.46 SYNO.SurveillanceStation.PTZ.Patrol
This API provides a set of methods to execute preset action for PTZ cameras.
Name SYNO.SurveillanceStation.PTZ.Patrol
Method Name Enum
EnumPartial Load Save Delete Excute Stop
Version 1
Section 2.3.46.1 2.3.46.2 2.3.46.3 2.3.46.4 2.3.46.5 2.3.46.6 2.3.46.7
Availability Surveillance Station 7.2.2
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.46.1 Enum method
Enum patrol list and contain its preset members in Surveillance Station database.
Request
Key camId
Value <CAMERA_ID>
Description Required. Unique camera ID.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Enum"&camId=4
Response
Key patrol
Value <Patrol> Array
Description List of patrol information.
Availability 1 and onward
<Patrol> Definition:
Key id name speed stayTime
Value <integer> <string> <integer> <integer>
presetList
<Preset> Array
Description ID of patrol in Surveillance Station database. Patrol name. Speed of patrol to run preset. Delay time in seconds from one preset to another. List of preset information.
Availability 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
403
Synology Surveillance Station Web API
<Preset> Definition:
Key
Value
name
<string>
position Type
<integer> <integer>
Description Name of the preset. ID of preset in camera. 0: Normal 1: Home
Example:
{ "patrol":[{ "id":1, "name":"p1", "presetList":[{ "name":"home", "position":0, "type":1 }, { "name":"syno1", "position":1, "type":0 }], "speed":3, "stayTime":5 }]
}
Availability 1 and onward 1 and onward 1 and onward
2.3.46.2 EnumPartial method
Enum patrol name list in Surveillance Station database.
Request
Key camId
Value <CAMERA_ID>
Description Required. Unique camera ID.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="EnumPartial"&camId=4
Response
Key camId patrol
Value <CAMERA_ID> <Patrol> Array
Description Unique camera ID. List of patrol information.
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
404
Synology Surveillance Station Web API
<Patrol> Definition:
Key id name
Value <integer> <string>
Example:
{ "camId":4, "patrol":[{ "id":1, "name":"p1" }]
}
Description ID of patrol in Surveillance Station database. Patrol name.
Availability 1 and onward 1 and onward
2.3.46.3 Load method
Load patrol detail include preset members information.
Request
Key id
Value <integer>
Required. ID of patrol.
Description
Availability 1 and onward
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Load"&id=1
Response
Key patrol
Value <Patrol> Array
Description List of patrol information.
Availability 1 and onward
<Patrol> Definition:
Key camId id name speed stayTime
Value <CAMERA_ID> <integer> <string> <integer> <integer>
presetList
<Preset> Array
Description Unique camera ID. ID of patrol in Surveillance Station database. Patrol name. Speed of patrol to run preset. Delay time in seconds from one preset to another. List of preset information.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
405
Synology Surveillance Station Web API
<Preset> Definition:
Key
Value
name
<string>
position Type
<integer> <integer>
Description Name of the preset. ID of preset in camera. 0: Normal 1: Home
Example:
{ "patrol":{ "camId":4, "id":1, "name":"p1", "presetList":[{ "name":"home", "position":0, "type":1 }, { "name":"syno1", "position":1, "type":0 }], "speed":3, "stayTime":5 }
}
Availability 1 and onward 1 and onward 1 and onward
2.3.46.4 Save method
Add or modify a patrol.
Request
Key camId
id
Value <CAMERA_ID>
<integer>
stayTime
<integer>
speed name presetList
<integer> <string> <Preset> Array
Description
Required. Unique camera ID.
Optional. ID of patrol to be modified, add a new one if no specific ID.
Optional. Delay time in seconds from one preset to another, default to 5.
Optional. Speed of patrol to run preset, default to 3.
Required. Name of the patrol.
Optional.
Availability 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
406
Synology Surveillance Station Web API
List of preset information, delete all preset if empty.
<Preset> Definition:
Key name position Type
Value <string> <integer> <integer>
Description Name of the preset. ID of preset in camera. 0: Normal 1: Home
Availability 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Save"&camId=4&name="p3"&presetLis t=[{"name":"home","position":0,"type":1},{"name":"syno7","position":7,"type":0}]
Response
Key patrol
Value <Patrol> Array
Description List of patrol information.
Availability 1 and onward
<Patrol> Definition:
Key camId id name speed stayTime
Value <CAMERA_ID> <integer> <string> <integer> <integer>
presetList
<Preset> Array
Description Unique camera ID. ID of patrol in Surveillance Station database. Patrol name. Speed of patrol to run preset. Delay time in seconds from one preset to another. List of preset information.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
<Preset> Definition:
Key
Value
name position Type
<string> <integer> <integer>
Description Name of the preset. ID of preset in camera. 0: Normal 1: Home
Availability 1 and onward 1 and onward 1 and onward
Example:
{ "patrol":{ "camId":4, "id":1, "name":"p1", "presetList":[{ "name":"home", "position":0,
Copyright � Synology Inc. All rights Reserved.
407
Synology Surveillance Station Web API
"type":1 }, {
"name":"syno1", "position":1, "type":0 }], "speed":3, "stayTime":5 } }
2.3.46.5 Delete method
Delete specific patrol.
Request
Key camId
patrolId
Value <CAMERA_ID>
<string>
Description Required. Unique camera ID. Required. Array of patrol IDs.
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Delete"&camId=4&patrolId="1,2"
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.46.6 Excute method
Start to run patrol, sequentially go to each preset position.
Request
Key camId
id
Value <CAMERA_ID>
<integer>
Description
Required. Unique camera ID.
Required. ID of patrol in Surveillance Station database.
Availability 1 and onward
1 and onward
Example:
Copyright � Synology Inc. All rights Reserved.
408
Synology Surveillance Station Web API GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Excute"&camId=4&id=1
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.46.7 Stop method
Stop running patrol.
Request
Key camId
Value <CAMERA_ID>
Description Required. Unique camera ID.
Availability 1 and onward
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Stop"&camId=4
Response This method has no specific response data. It returns an empty success response if it completes without error.
2.3.46.8 API Error Code
Code 400 401
Operation Failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
409
Synology Surveillance Station Web API
2.3.47 SYNO.SurveillanceStation.Camera.Search
Searching cameras and get searching resrult.
Name SYNO.SurveillanceStation.Camera.Search
Method Name Start
GetInfo
Version 1
Section 2.3.47.1 2.3.47.2
Availability Surveillance Station 7.2.2
Availability 1 and onward 1 and onward
2.3.47.1 Start method
Start camera search process.
Request No parameter is required. Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Camera.Search"&version="1"&method="Start"
Response
Key pid
Value <integer>
Example:
{ "pid":1024
}
Description Camera search process ID, used as a parameter to get search result by InfoGet action.
Availability 1 and onward
2.3.47.2 GetInfo method
Get the searching infomation.
Request
Key pid
offset
Value <integer>
<integer>
Description Required. The pid of the searching process. Optional. Next camera data start index, default to 0.
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
410
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Camera.Search"&version="1"&method="GetInfo"&pid=1024
Response
Key camList searchStatus camCount
Value <Camera> Array <boolean> <integer>
Description List of camera infomation. Is the searching process alive. Last camera data index, used as next offset.
Availability 1 and onward 1 and onward 1 and onward
<Camera> definition:
Key
Value
ip
<string>
mac
<string>
model
<string>
port vendor
<integer> <string>
Description IP of the camera. Camera MAC address. Model of the camera. Port of the camera. Vendor of the camera.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
{ "camCount":53, "camList":[{ "ip":"10.13.23.126", "mac":"28:10:7B:06:86:0E", "model":"DCS-2132L", "port":80, "vendor":"D-Link" }, { "ip":"10.13.23.5", "mac":"00:40:8C:C7:5B:0F", "model":"M1054", "port":80, "vendor":"AXIS" }], "searchStatus":true
}
2.3.47.3 API Error Code
Code 400 401
Operation Failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
411
Synology Surveillance Station Web API
2.3.48 SYNO.SurveillanceStation.HomeMode
Switch home mode or get home mode related setting and information.
Name SYNO.SurveillanceStation.HomeMode
Method Name Switch GetInfo
Version 1
Section 2.3.48.1 2.3.48.2
Availability Surveillance Station 8.1.0
Availability 1 and onward 1 and onward
2.3.48.1 Switch method
Switch home mode on/off.
Request
Key on
Value <boolean>
Description
Required. True to turn on home mode, while false to turn it off.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.HomeMode"&version="1"&method="Switch"&on=true
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.48.2 GetInfo method
Get home mode related setting and information, including current binding mobile devices if required.
Request
Key
Value
need_mobiles <boolean>
Description
Optional. Home mode info will conclude which mobile devices is binding to the server, default to false.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
412
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.HomeMode"&version="1"&method="GetInfo"&need_mobiles=true
Response
Key
Value
Description
Availability
on
<boolean>
Whether home mode is turned on or off.
1 and onward
reason
<integer>
Reason for the last switching of home mode. 1 and onward
rec_schedule_on
<boolean>
Is the setting of recording enabled.
1 and onward
notify_on
<boolean>
Is the setting of notification enabled.
1 and onward
streaming_on
<boolean>
Is the setting of streaming profile enabled. 1 and onward
actrule_on
<boolean>
Is the setting of action rule enabled.
1 and onward
mode_schedule_on <boolean>
Is the home mode schedule switching
1 and onward
enabled.
mode_schedule
<schedule string> Home mode switching schedule.
1 and onward
mode_schedule_next_ <timestamp>
Next time to switch home mode by schedule. 1 and onward
time
-1 if invalid.
cameras
<Camera> Array Applied cameras in home mode.
1 and onward
io_modules
<IO Module> Array Applied IO modules in home mode.
1 and onward
geo_lat
<float>
Latitude of home position.
1 and onward
geo_lng
<float>
Longitude of home position.
1 and onward
geo_radius
<integer>
The radius in meters around home.
1 and onward
geo_delay_time
<integer>
Delayed time if geofence is triggered.
1 and onward
geo_mobiles
<Mobile> Array List of binding mobile devices.
1 and onward
rec_schedule
<schedule string> Recording schedule in home mode.
1 and onward
stream_profile
<string>
Integer string to indicate stream profiles used 1 and onward
in home mode.
actrules
<Action Rule> Array Which action rule is enabled in home mode. 1 and onward
custom1_det
<string>
Customize setting 1 for detection.
1 and onward
custom2_det
<string>
Customize setting 2 for detection.
1 and onward
custom1_di
<string>
Customize setting 1 for digital inputs.
1 and onward
custom2_di
<string>
Customize setting 2 for digital inputs.
1 and onward
wifi_ssid
<string>
Wifi session id.
1 and onward
notify_event_list
<Notication> Array Notification setting in home mode.
1 and onward
Example:
{ "data":{ "actrule_on":false, "actrules":"-1", "cameras":"-1", "custom1_det":1, "custom1_di":1, "custom2_det":1, "custom2_di":1, "geo_delay_time":60, "geo_lat":25.0516760,
Copyright � Synology Inc. All rights Reserved.
413
Synology Surveillance Station Web API
"geo_lng":121.5158620, "geo_mobiles":[
{ "at_home":false, "device_id":"94D996F2-1C7C-41F2-A1B4-xxxxxxxxE50A0", "ds_cam_version":"4.7.0-273", "mobile_id":3, "name":"November", "os_type":1, "user_name":"1"
} ], "geo_radius":100, "io_modules":"-1", "mode_schedule":"000000000 ... 0000000000000", "mode_schedule_next_time":-1, "mode_schedule_on":true, "notify_event_list":[
{ "eventGroupType":2, "eventType":3, "filter":0
},
...
{ "eventGroupType":9, "eventType":76, "filter":0
} ], "notify_on":true, "on":true, "reason":1, "rec_schedule":"11111111111 ... 111111111111111", "rec_schedule_on":true, "stream_profile":"1,1,1,1,1,1", "streaming_on":false }, "success":true }
2.3.48.3 API Error Code
Code 400 401
Operation Failed. Parameter invalid.
Description
Copyright � Synology Inc. All rights Reserved.
414
Synology Surveillance Station Web API
2.3.49 SYNO.SurveillanceStation.Transactions.Device
This API provides methods to acquire information of transaction devices.
Name SYNO.SurveillanceStation.Transactions.Device
Method Name Enum
Version 1
Section 2.3.49.1
Availability Surveillance Station 8.1.0
Availability 1 and onward
2.3.49.1 Enum
Get the list of all transaction devices.
Request
Key filterIds
Value <string>
filterDsIds
<string>
filterEnable filterStatus
<boolean> <integer>
start
<integer>
limit
<integer>
Description
Availability
Optional.
1 and onward
List of transaction device id. Should write in
square brackets. Optional.
1 and onward
List of id of ds. Should write in square
brackets. Optional. Filter the enable/disable devices.
1 and onward
Optional.
1 and onward
Filter the specified status.
The status codes are list below:
0 : Normal,
1 : Disconnected,
2 : Disabled,
3 : Deleted
Optional.
1 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
This parameter should used with the limit
parameter.
Optional.
1 and onward
Number of transaction devices to be returned.
If not specified, return devices to the end of
device list.
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Device"&version="1"&method="Enum"&filterIds="1,2"&filterE nable=true&start=3&limit=50
Copyright � Synology Inc. All rights Reserved.
415
Synology Surveillance Station Web API
Response
Key alert_event baudrate connector
Value <integer> <integer> <integer>
databits ds_id enable encoding flowcontrol
<integer> <integer> <boolean> <string> <integer>
host id id_on_rec_server name notifyschedule osd_bg_color osd_bg_trans osd_fontcolor osd_fontsize osd_fontstyle
<string> <integer> <integer> <string> <string> <string> <integer> <string> <integer> <integer>
osd_position
<integer>
osd_textalign
<integer>
pairedcam_enable pairedcam_id pairedcam_stream paritycheck
<boolean> <integer> <integer> <integer>
port pos_parsing_rule status
<integer> <json> <integer>
Description
The settings in live view alert setting. Baud rate.
The connection type. The types are list below: 0 : TCP, 1 : Serial Port, 2 : Surveillance Station WebAPI Data bits.
The id of DS. Is the device enabled.
The encoding type of the device. The setting of flow control. 0 : None, 1 : XON / XOFF, 2 : RTS / CTS The address of the device.
The id of the device. The id on the recording server.
The name of the device. The schedule in the Notification app.
The background color code of the OSD. The transparency of the background color.
The color code of the OSD text. The font size of the OSD text.
The style of the OSD text. 0 : Normal, 1 : Bold The position of the OSD. 0 : Left side, 1 : Right side
The alignment of the OSD text. 0 : Left, 1 : Center, 2 : Right
If the device have a camera paired. The id of the paired camera.
The stream profile of the paired camera. The setting of parity check. 0 : None, 1 : Odd, 2 : Even, 3 : Mark, 4 : Space The address port of the device.
Describe the setting of the parsing rule. The current status of the transaction device.
Availability 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
416
Synology Surveillance Station Web API
stopbits keyUsedCnt localTotalCnt timestamp
total
success
<integer> <integer> <integer> <timestamp>
<integer>
<boolean>
0 : Normal, 1 : Disconnected, 2 : Disabled, 3 : Deleted
Stop bits of the device.
The number of total used license in system.
The number of installed transaction devices.
UTC unix timestamp. The time when the system respond this request.
The total device number listed in the response.
Whether the request is success or not.
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
Example:
{ "data" : { "data" : [ { "alert_event" : 0, "baudrate" : 9600, "connector" : 0, "databits" : 8, "ds_id" : 0, "enable" : false, "encoding" : "UTF-8", "flowcontrol" : 0, "host" : "10.13.20.88", "id" : 1, "id_on_rec_server" : 0, "name" : "88", "notifyschedule" : "", "osd_bg_color" : "#000000", "osd_bg_trans" : 100, "osd_fontcolor" : "#00FF00", "osd_fontsize" : 14, "osd_fontstyle" : 1, "osd_position" : 0, "osd_textalign" : 0, "pairedcam_enable" : true, "pairedcam_id" : 2, "pairedcam_stream" : 0, "paritycheck" : 0, "port" : 8081, "pos_parsing_rule" : { "begin" : { "match_type" : 1, "pattern" : "Synology Transaction Start" }, "cancel" : {
Copyright � Synology Inc. All rights Reserved.
417
Synology Surveillance Station Web API
"match_type" : 1, "pattern" : "=== CANCEL ===" }, "complete" : { "match_type" : 1, "pattern" : "Transaction Finish" }, "text_rule" : [ {
"find" : "222", "replacement" : "666", "type" : 1 } ] }, "status" : 2, "stopbits" : 1, "trans_source" : 0 } ], "keyUsedCnt" : 5, "localTotalCnt" : 1, "timestamp" : "1505288896", "total" : 1 }, "success" : true }
2.3.49.2 API Error Code
Code 400
Operation Failed.
Description
Copyright � Synology Inc. All rights Reserved.
418
Synology Surveillance Station Web API
2.3.50 SYNO.SurveillanceStation.Transactions.Transaction
This API provides methods to acquire information of transaction histories.
Name SYNO.SurveillanceStation.Transactions.Transact
ion
Method Name Enum Lock Unlock Delete Begin
Complete Cancel
AppendData
Version 1
Section 2.3.50.1 2.3.50.2 2.3.50.3 2.3.50.4 2.3.50.5 2.3.50.6 2.3.50.7 2.3.50.8
Availability Surveillance Station 8.1.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.50.1 Enum
Get the list of all transactions.
Request
Key filterIds
<json>
Value
dsId filterStatus
<integer> <integer>
filterLock
<boolean>
filterTimeFrom <timestamp>
filterTimeTo <timestamp>
filterTimeRang <boolean>
Description
Availability
Optional.
1 and onward
List of specified ids.
Should write in a format like :
"[{\"pos_id\":2,\"transaction_id\":2}]"
The entry "transaction_id" can be empty.
Optional.
1 and onward
Ds id. Specified as local ds id by default.
Optional.
1 and onward
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
Optional.
1 and onward
Filter transactions by the lock status.
Optional.
1 and onward
UTC unix timestamp. Filter transactions after
the specified time.
Optional.
1 and onward
UTC unix timestamp. Filter transactions before
the specified time.
Optional.
1 and onward
Copyright � Synology Inc. All rights Reserved.
419
Synology Surveillance Station Web API eIntersect
filterKeyword <string>
start
<integer>
limit
<integer>
To determine whether the "filterTimeFrom"
parameter would cover the duration of the
first transaction or not.
Optional.
1 and onward
To filter transactions containing the specified
string.
Optional.
1 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
This parameter should used with the limit
parameter.
Optional.
1 and onward
Number of transactions to be returned.
If not specified, return transactions to the end
of transaction list.
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="Enum"&start=0&limit=50 &dsId=0&filterStatus=1&filterIds="[{\"pos_id\":6}]"&filterTimeFrom=1505318446&filterKeyword="Synolog y"
Response
Key audio_format begin_tmstmp
camera_id
camera_name
closing content dsId
end_tmstmp
eventId filesize folder framecount id
lock name pos_id
posevent_ids
Value <string> <timestamp>
<integer>
<string>
<boolean> <json> <integer>
<timestamp>
<integer> <integer> <string> <integer> <string>
<boolean> <string> <integer>
<string>
Description Audio format of recording file. UTC unix timestamp. The start time of this history. The id of camera that generate the recording file. The name of camera that generate the recording file. Point out the recording file is closing or not. The parsed content of this transaction. The dsId of the device that generate this transaction. UTC unix timestamp. The end time of this transaction. The id of the recording file. The file size of the recording file. The folder path of the recording file. Frame count of the recording file. The id combined with the device id and the transaction id. Whether the transaction is locked or not. Path of the recording file. The id of the device that generate this transaction. The id list of the recording files. Not in use
Availability 1 and onward 1 and onward
1 and onward
1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
420
Synology Surveillance Station Web API
recording snapshot_medium startOffset
startTime
status
<boolean> <integer> <integer>
<timestamp>
<integer>
stopTime
transaction_id videoType
<timestamp>
<integer> <integer>
video_type
video_height video_width volume success timestamp
total
<integer>
<integer> <integer> <integer> <boolean> <timestamp>
<integer>
currently.
Whether the recording file is recording or not. 1 and onward
Snapshot of the recording file.
1 and onward
The time offset when this transaction
1 and onward
happened in the recording file.
UTC unix timestamp. The start time of the 1 and onward
recording file.
The status of the transaction.
1 and onward
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
4 : Completed without begin
5 : Canceled without begin
UTC unix timestamp. The start time of the 1 and onward
recording file.
The id of the transaction.
1 and onward
The video encoding type of the recording file. 1 and onward
0 : Unknown
1 : mjpeg
2 : mpeg4
3 : h264
5 : mxpeg
6 : h265
7 : h264+
8 : h265+
The video encoding type of the recording file. 1 and onward
(Same as above.)
The height of the recording file.
1 and onward
The width of the recording file.
1 and onward
The volume of the recording file.
1 and onward
If the request is success.
1 and onward
UTC unix timestamp.
1 and onward
The time when the system respond this
request.
The total transaction number listed in the 1 and onward
response.
Example:
{ "data" : { "data" : [ { "archId" : false, "audio_format" : "PCMU", "begin_tmstmp" : 1505353527, "camera_id" : 2, "camera_name" : "ACTi - A82", "closing" : false, "content" : [
Copyright � Synology Inc. All rights Reserved.
421
Synology Surveillance Station Web API
{ "content" : "\n2017/09/14 09:44:40\n\nOolung Tea x 1\t\t\t\t$5\n", "line_id" : 1, "linebreak" : "", "pos_id" : 6, "tmstmp" : 1505353527, "transaction_id" : 1
}, {
"content" : "Martini x 1\t\t\t\t$10\n\nTotal:\t\t$15\nCash:\t\t$15\nChange:\t\t$0\n\n", "line_id" : 2, "linebreak" : "", "pos_id" : 6, "tmstmp" : 1505353528, "transaction_id" : 1 } ], "dsId" : 0, "end_tmstmp" : 1505353528, "eventId" : 148, "filesize" : 6287854, "folder" : "/volume1/surveillance/@POS/ACTi - A82", "framecount" : 390, "id" : "6_1", "lock" : false, "name" : "20170914AM/ACTi - A8220170914-094441-1505353481.mp4", "pos_id" : 6, "posevent_ids" : "148", "recording" : false, "snapshot_medium" : "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKC goKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABaAHgDASIAAhEBAxEB/8QAHwAAA QUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEG E1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZ WZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ 2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgE CBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJ ygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkp aanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA PwDziLxZebDvjh3+gB/xqS28UXrvtMcHHI4P+NeqeEvgjF/ZD6n4xvjp1vs3hFIBQerE8D6V5N4vTRdP154vDc891 ZpwJJgAWPfGO1JxSL9pJ9SwPEt5zlIR+f8AjVTVNYlv41WUINpyNuaxw7Sv6D0qYIeKSQnUk1a4KNxqzFCT0p9tb 7iOM12OgeFLzUkH2aB5CegAzVWIOQG6Ik7QfY0jzhlI8lQ3qM132q/DXxFbIznSroqBuJVd2B+FclqOiX1gT9pt5o sf30K/zocR3MXe47g09ZT3Wh1YHkChFJP3TU2A3Y9EeaJWilXJGcGq93ot5Go3RF1XkbecVPZ38kWB2Fa8OrZX DA0rMLnD3NrsY7kwe+RVdLfAJxW/rqzT3bTR4Kntmq7Q7wuByaewzAuoMrg8Z5FFa2qQgwZUf6sj8qKANjxB4 98Q6/Zrbatqc9xApzsJAB+uOtclJLk5FEik96jEZzzVElmzJLVeB5qvax8cCrYTB5oA2NBjSS7jVyFUsASe1fW3gK10jT dJt4rK5t5Z3j3uyuMgV8g2MnlsCOtbC6xNCo8uVlPscUDPtJSpVShBB5GD1rxP49+Ko2t/7BtHVyDuuXwDz1C5ry uw8ea7YFPsup3KbAVUb8gD2BrntQ1Ga8meWZ2eRySzMckmgRnyJl6u6dZmaQKBkk1WU811fgdIJdbs0uHWO MyKGZjgAZ9aEDOrh+FOtmwiuhZh0kUOFRgWwfasPU/Ct1YAie2liYdmUivrG3aNoE8hleMABSpBGPwonghuIz HcRRyoequoYfrVJoLHxBqVu8LEVDa5CBmHNei/FXT7Wz8U38VpEscSvwi9BXCwQgIWHPzYxUyQkZt6uIZM/wA XFFLfHdIQPurxRU3LMMpRtqzIm1sUnl1QizZxZXOKmdMGr2n2hMGcUTQEE8UAUkytI7k1PJGVHSqrHmkAoN
Copyright � Synology Inc. All rights Reserved.
422
Synology Surveillance Station Web API
OpgpRQBIDVq0uGiYEHFUwcUqtigDuNA8V6hpzA2t3NDj+45Fegad8WdXtYx55huQP+ei8/mMV4hDKVqc3hxj NVcmxveMfEMmsavc3siqjzNuKr0FY1vdx/2e0YUeb5m4t3IxWZcSlySTUUBYEnPy5/Ok9RonnopkpzRUFEAi3tX oPgj4Yat4q02W9sxFHAjhFMpxvPfH0rF8G6DLrepwwhX8ncDLIBkIueSa+r/Cel22m6bbx6TM5tI12iF8cfl3rTYk8 Mufh5quixMt3bkqOA6fMprl73SWidtyn8q+uWdHUrMmAeoYZFcn4q8IaNeWU9w+LVlUsXXp+VK47HylqMWz PFYzDmut8SwLHcyLGdygkA+tcvIuDQwIacAacBmpFSkBGBTttSrGeuKlWIntQBWxSHIq55NQypigRSc+tLFu9flH OKH4NSGZGK7VwcY/8Ar0mXC3USQ8UUS0VIj6T+Enh6fStGjvtLnguJJQrXCA89M7fcV6Zay210xMRNrdD7ydOf pXyh4A8eah4Uug1s+BvvwsflNfRvhjxdoPjS2UxSrBegcoxwwPt6itWupJ1MtxLbIftaB4/7y15V8TvEEG7yNPncxlc yKex9K7XxHqV7oFg7ErcQMCoZua+efEmoG4mkfPLEnFSgZzusXZkkbNY7/NT7qQtKc02PmmwEjjJPFatjYPKwCr knpVa2X5hXoXw6tEl1y1aRcpGwYj/APXQhNmA/hu7jQM9tKo9SpAqJtJeMcqRX2AscUkCr5aGMj7pUYxWLqXh DQ9QB86xjRj/ABRfIf04p6BZnyg9mw6is+7hKg5FfSGp/Ce0kybC8ZCf4ZVz+oryrx14L1DQF33cS+Sx2q6nINAanl c4wagjP70fWr17HtYiqcQzL9KljRNLRSzdDRUlFJZeOtaGlapPZ3MctvK8cinIZTgisQdKkhPzr9au9iT1efxfqF/p0cN 1cM6qO561yt9dFs85qtak+R1NVbknnmhiRCz7mOTUsTVTXrVqLrQM1LBNzivePg3ai1Rp7i0V0lGA7Lnb9K8M0 v76/Wvrj4fADwnYgAAbaBdTdjWPaPLwB/s0/BHQ5+tV7kBeVAB9qWBiQMk0DHSyvGM+UWH+yc14t8ZvEH2 2CG02tGqMWKE9SOASPWvb6+efjzx4lOOP3QpoHseM6k2ZCap2gy0h9Mfzqa+ +8ais/wDVv9RUsEE7UVHP1oqSj//Z",
"startOffset" : 16, "startTime" : 1505353481, "status" : 1, "stopTime" : 1505353648, "transaction_id" : 1, "videoType" : 3, "video_height" : 480, "video_type" : 3, "video_width" : 640, "volume" : 50 } ], "success" : true, "timestamp" : "1505355467", "total" : 1 }, "httpd_restart" : false, "success" : true }
2.3.50.2 Lock
Lock history records matching given filter rule.
Request
Key filterIds
<json>
Value
dsId
<integer>
Description
Optional. List of specified ids. Should write in a format like : "[{\"pos_id\":2,\"transaction_id\":2}]" The entry "transaction_id" can be empty.
Optional. Ds id. Specified as local ds id by default.
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
423
Synology Surveillance Station Web API filterStatus <integer>
filterLock
<boolean>
filterTimeFrom <timestamp>
filterTimeTo <timestamp>
filterTimeRang <boolean> eIntersect
filterKeyword <string>
start
<integer>
limit
<integer>
Optional.
1 and onward
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
Optional.
1 and onward
Filter transactions by the lock status.
Optional.
1 and onward
UTC unix timestamp. Filter transactions after
the specified time.
Optional.
1 and onward
UTC unix timestamp. Filter transactions before
the specified time.
Optional.
1 and onward
To determine whether the "filterTimeFrom"
parameter would cover the duration of the
first transaction or not.
Optional.
1 and onward
To filter transactions containing the specified
string.
Optional.
1 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
This parameter should used with the limit
parameter.
Optional.
1 and onward
Number of transactions to be locked.
If not specified, lock transactions to the end of
transaction list.
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="Lock"&dsId=0&filterStat us=1&filterIds="[{\"pos_id\":2,\"transaction_id\":2}]"&filterTimeFrom=1505318446&filterKeyword="Synol ogy"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.50.3 Unlock
Unlock history records matching given filter rule.
Request
Copyright � Synology Inc. All rights Reserved.
424
Synology Surveillance Station Web API
Key filterIds
<json>
Value
dsId filterStatus
<integer> <integer>
filterLock
<boolean>
filterTimeFrom <timestamp>
filterTimeTo <timestamp>
filterTimeRang <boolean> eIntersect
filterKeyword <string>
start
<integer>
limit
<integer>
Description
Availability
Optional.
1 and onward
List of specified ids.
Should write in a format like :
"[{\"pos_id\":2,\"transaction_id\":2}]"
The entry "transaction_id" can be empty.
Optional.
1 and onward
Ds id. Specified as local ds id by default.
Optional.
1 and onward
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
Optional.
1 and onward
Filter transactions by the lock status.
Optional.
1 and onward
UTC unix timestamp. Filter transactions after
the specified time.
Optional.
1 and onward
UTC unix timestamp. Filter transactions before
the specified time.
Optional.
1 and onward
To determine whether the "filterTimeFrom"
parameter would cover the duration of the
first record or not.
Optional.
1 and onward
To filter transactions containing the specified
string.
Optional.
1 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
This parameter should used with the limit
parameter.
Optional.
1 and onward
Number of transactions to be unlocked.
If not specified, unlock transactions to the end
of transaction list.
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="Unlock"&start=0&limit=5 0&dsId=0&filterStatus=1&filterIds="[{\"pos_id\":2,\"transaction_id\":2}]"&filterTimeFrom=1505318446&fil terKeyword="Synology"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
425
Synology Surveillance Station Web API
2.3.50.4 Delete
Delete history records matching given filter rule.
Request
Key filterIds
<json>
Value
dsId filterStatus
<integer> <integer>
filterLock
<boolean>
filterTimeFrom <timestamp>
filterTimeTo <timestamp>
filterTimeRang <boolean> eIntersect
filterKeyword <string>
start
<integer>
limit
<integer>
Description
Availability
Optional.
1 and onward
List of specified ids.
Should write in a format like :
"[{\"pos_id\":2,\"transaction_id\":2}]"
The entry "transaction_id" can be empty.
Optional.
1 and onward
Ds id. Specified as local ds id by default.
Optional.
1 and onward
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
Optional.
1 and onward
Filter transactions by the lock status.
Optional.
1 and onward
UTC unix timestamp. Filter transactions after
the specified time.
Optional.
1 and onward
UTC unix timestamp. Filter transactions before
the specified time.
Optional.
1 and onward
To determine whether the "filterTimeFrom"
parameter would cover the duration of the
first transaction or not.
Optional.
1 and onward
To filter transactions containing the specified
string.
Optional.
1 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
This parameter should used with the limit
parameter.
Optional.
1 and onward
Number of transactions to be deleted.
If not specified, delete transactions to the end
of transaction list.
Example: GET /webapi/entry.cgi?
Copyright � Synology Inc. All rights Reserved.
426
Synology Surveillance Station Web API api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="Delete"&start=0&limit=5 0&dsId=0&filterStatus=1&filterIds="[{\"pos_id\":2,\"transaction_id\":2}]"&filterTimeFrom=1505318446&fil terKeyword="Synology"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.50.5 Begin
Start a session with id specified in session_id. This method needs to be sent before any other transaction methods with the same session_id.
Request
Key
Value
device_name <string>
session_id timeout
<string> <integer>
Description Required. The name of the transaction device established in Surveillance Station.
Required. Id of a session.
Required. The max duration of a transaction.
Availability 1 and onward
1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="Begin"&device_name="P OS01"&session_id="1"&timeout=300
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.50.6 Complete
Complete a session with id specified in session_id. A session will be ended and a complete transaction would be generated after this request has been sent. Any data carried by AppendData method with the same session_id after would be dropped and return error.
Request
Copyright � Synology Inc. All rights Reserved.
427
Synology Surveillance Station Web API
Key
Value
device_name <string>
session_id <string>
Description
Required. The name of the transaction device established in Surveillance Station.
Required. Id of a session.
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="Complete"&device_nam e="POS01"&session_id="1"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.50.7 Cancel
Cancel a session with id specified in session_id. A session will be ended and a transaction labeled as Cancel would be generated after this request has been sent. Any data carried by AppendData method with the same session_id after would be dropped and return error.
Request
Key
Value
device_name <string>
session_id <string>
Description
Required. The name of the transaction device established in Surveillance Station.
Required. Id of a session.
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="Cancel"&device_name=" POS01"&session_id="1"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
Copyright � Synology Inc. All rights Reserved.
428
Synology Surveillance Station Web API
2.3.50.8 AppendData
Carry data into the session with id specified in session_id.
Request
Key
Value
device_name <string>
session_id content
<string> <string>
Description
Availability
Required.
1 and onward
The name of the transaction device
established in Surveillance Station.
Required.
1 and onward
Id of a session.
Required.
1 and onward
The content of the transaction. The contents
sent by one requested would be regard as one
a line. Users can also carry "\n" in the contents
to break lines.
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Transactions.Transaction"&version="1"&method="AppendData"&device_na me="POS01"&session_id="1"&content="Start\n2017/01/01"
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.50.9 API Error Code
Code 400 401
Operation Failed. Illegal parameters.
Description
Copyright � Synology Inc. All rights Reserved.
429
Synology Surveillance Station Web API
2.3.51 SYNO.SurveillanceStation.Archiving.Pull
This API provides methods to acquire information of Archive Vault and operate on it.
Name SYNO.SurveillanceStation.Archiving.Pull
Method Name SaveTask
LoginSourceDS DeleteTask ListTask EnableTask DisableTask
BatchEditTask GetBatchEditProgress BatchEdiProgressDone
Version 1
Section 2.3.51.1 2.3.51.2 2.3.51.3 2.3.51.4 2.3.51.5 2.3.51.6 2.3.51.7 2.3.51.8 2.3.51.9
Availability Surveillance Station 8.0
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
430
Synology Surveillance Station Web API
2.3.51.1 SaveTask
Add or edit an Archive Vault task. Request
Key
Value
blCustomFolde <boolean>
r
blLimitBySize <boolean>
blRotateFile <boolean>
blSrcRecNoOve <boolean> rlap
blUseRecDet <boolean>
camIds camInfo dayLimit
<CAMERA_ID>
Array of <Camera Information Object> <integer>
didCode dsSerial execTime hostname id name passwd
<string> <string> <timestamp> <string> <integer> <string> <string>
port recEndTm recMode recSchedule recStartTm schedule storagePath type
<string> <timestamp> <string> <schedule string> <timestamp> <schedule string> <string> <integer>
Description
Availability
To determine whether using custom folder 1 and onward
name to save or not.
To determine whether the task has file size 1 and onward
limit or not.
To determine whether the files in the task will 1 and onward
be rotated or not.
To determine whether the files in the task will 1 and onward
has the same time duration as the files in
server or not.
To determine whether the files in the task 1 and onward
only include "Event Summary" or not.
Enabling "Event Summary" will only archive
event clips such as Motion Detection,
Digital Input, Tampering Detection, Audio
Detection, PIR motion Detection, ACAP
Detection.
List of desired cameras to perform
1 and onward
archiving tasks.
Info of camera in camIds.(See 2.3.4.3)
1 and onward
Specify a period of time (in days) to retain the 1 and onward
recordings. Any recordings that were saved
earlier than the specified time range will be
deleted automatically.
Device Id
1 and onward
Serial of ds which has source file.
1 and onward
Specify one-time task execution time.
1 and onward
Host name(ip) of archiving source server. 1 and onward
Task Id.
1 and onward
Task name.
1 and onward
Login user password of archiving source 1 and onward
server.
Login port of archiving source server.
1 and onward
End time to archive the recording files. 1 and onward
Select recording modes to archive.
1 and onward
Schedule to archive recording files.
1 and onward
Start time to archive the recording files. 1 and onward
Schedule to execute the task.
1 and onward
Storage path.
1 and onward
Archiving Task Type.
1 and onward
UnKnown = 0
Onetime_Immediate = 1
Copyright � Synology Inc. All rights Reserved.
431
Synology Surveillance Station Web API
username
<string>
Onetime_Schedule = 2 Schedule = 3 Tiering = 4
Login user name of archiving source server.
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="SaveTask"id=2&name="longtime5"& blSrcRecNoOverlap=false&storagePath="%2Fvolume2%2Fsurveillance"&blCustomFolder=false&dayLimit=" 30"&blLimitBySize=false&blRotateFile=true&hostname="127.0.0.1"&port="5000"&protocol=false&userna me="admin"&didCode=""&type=3&camIds="2"&camInfo=%5B %7B"checked"%3Atrue,"id"%3A2,"newName"%3A"Vivotek%20%20PT81335","ip"%3A"10.13.22.184","port"%3A80,"deleted"%3Afalse,"folder"%3A"%2Fvolume2%2Fsurve illance%2FVivotek%20%20PT81335","volumeSpace"%3A9.938,"vendor"%3A"Vivotek","model"%3A"PT8133","firmware"%3A"","c hannel"%3A"1","feRegionList"%3A%5B%5D,"recDeleted"%3Afalse%7D %5D&execTime=0&schedule="1111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111"&blUseRecDet=false&recStartTm=1540828800&recEndTm=0&recSchedule="111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111"&dsSerial="1880 PEN763106"&recMode="1,10,2,5,8,9,3,4"&api=SYNO.SurveillanceStation.Archiving.Pull
Response
Key name id success
Value <string> <integer> <boolean>
Description Task name Task Id Execution success or not
Availability 1 and onward 1 and onward 1 and onward
Example: {"data":{"id":8,"name":"2","success":true},"success":true}
2.3.51.2 LoginSourceDS
Login source server of an archive task to get informations including ds serial. Request
Key port
Value <string>
Description Port of the ds server.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
432
Synology Surveillance Station Web API
hostname protocol username passwd archId didCode srcDsId
<string> <boolean> <string> <string> <integer> <string> <integer>
Hostname of the ds server. Use HTTPS Protocol or not. User name of the ds server. Password of the ds server. Archive task id. Device Id. Id of the ds server.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="LoginSourceDs"&undefined="You %20can%20add%20Surveillance%20Station%20as%20the%20source%20recording%20server%20for %20archiving%20tasks."&srcDsId=0&hostname=""&port="5000"&protocol=false&username="admin"
Response
Key cameras
dsSerial success
Value Array of <Camera Information Object> <string>
<boolean>
Description
Availability
Info of camera in the archive task.(See 2.3.4.3) 1 and onward
Serial of source ds. Execution success or not
1 and onward 1 and onward
Example:
{ "data": { "api": "SYNO.SurveillanceStation.Camera", "data": {
"cameras": [ { "DINum": 0, "DONum": 0, "analyticsType": 0, "audioCodec": 2, "audioOut": false, "blG726LE": false, "blPtzShowIcon": true, "blReceivePocZero": false, "channel": "1", "deleted": false, "deviceType": 4, "doorbellNum": 0, "dsId": 0, "enableLowProfile": true, "enableRecordingKeepDays": false, "enableRecordingKeepSize": true, "enabled": true, "extDIDev": 0, "extDIPorts": -1,
Copyright � Synology Inc. All rights Reserved.
433
Synology Surveillance Station Web API
"feRegionList": [], "firmware": "", "fisheyeDispMode": "", "fisheyeParam": {}, "folder": "/volume2/surveillance/Vivotek - PT81335", "fov": "", "hasCamParam": true, "hasEdgeStg": false, "highProfileStreamNo": 2, "id": 2, "idOnRecServer": 0, "ip": "10.13.22.184", "isAudioDisableRec": false, "isDisableRec": false, "isEnableExtDI": false, "isUnrecognized": false, "ledCap": false, "liveViewSource": 0, "lowProfileStreamNo": 3, "mediumProfileStreamNo": 3, "mobileLiveViewSource": 0, "model": "PT8133", "mountType": 0, "newName": "Vivotek - PT81335", "pairedSpeakerEnabled": false, "pairedSpeakerId": 0, "port": 80, "postRecordTime": 5, "preRecordTime": 5, "presetNum": 20, "ptzCap": 11, "recShare": "surveillance", "recShareMountType": 0, "recSharePath": "/volume2/surveillance", "recStatus": 0, "recStorageStatus": 0, "recVolume": "/volume2", "recordTime": 30, "recordingKeepDays": 30, "recordingKeepSize": "10", "relayPortList": [], "rotateOption": 0, "speedDryCap": false, "status": 15, "statusFlags": 0, "stmFisheyeType": 0, "stream2": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 10, "quality": "5",
Copyright � Synology Inc. All rights Reserved.
434
Synology Surveillance Station Web API
"resolution": "640x400" }, "stream3": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 10, "quality": "5", "resolution": "640x400" }, "tvStandard": 0, "uiStmNoList": "2,3,3", "updateTime": 12465, "vendor": "Vivotek", "videoCodec": 3, "videoMode": "", "volumeSpace": "9.938", "wiperCap": false }, { "DINum": 2, "DONum": 0, "analyticsType": 0, "audioCodec": 2, "audioOut": false, "blG726LE": false, "blPtzShowIcon": true, "blReceivePocZero": false, "channel": "1", "deleted": false, "deviceType": 4, "doorbellNum": 0, "dsId": 0, "enableLowProfile": true, "enableRecordingKeepDays": false, "enableRecordingKeepSize": true, "enabled": true, "extDIDev": 0, "extDIPorts": -1, "feRegionList": [], "firmware": "", "fisheyeDispMode": "", "fisheyeParam": {}, "folder": "/volume2/surveillance/zDIMAX - PT-31E", "fov": "", "hasCamParam": false, "hasEdgeStg": false, "highProfileStreamNo": 1, "id": 10, "idOnRecServer": 0, "ip": "10.13.22.52", "isAudioDisableRec": false,
Copyright � Synology Inc. All rights Reserved.
435
Synology Surveillance Station Web API
"isDisableRec": false, "isEnableExtDI": false, "isUnrecognized": false, "ledCap": false, "liveViewSource": 0, "lowProfileStreamNo": 1, "mediumProfileStreamNo": 1, "mobileLiveViewSource": 0, "model": "PT-31E", "mountType": 0, "newName": "zDIMAX - PT-31E", "pairedSpeakerEnabled": false, "pairedSpeakerId": 0, "port": 80, "postRecordTime": 5, "preRecordTime": 5, "presetNum": 0, "ptzCap": 267, "recShare": "surveillance", "recShareMountType": 0, "recSharePath": "/volume2/surveillance", "recStatus": 0, "recStorageStatus": 0, "recVolume": "/volume2", "recordTime": 30, "recordingKeepDays": 30, "recordingKeepSize": "10", "relayPortList": [], "rotateOption": 0, "speedDryCap": false, "status": 15, "statusFlags": 0, "stmFisheyeType": 0, "stream1": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 10, "quality": "5", "resolution": "640x480" }, "stream2": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 10, "quality": "5", "resolution": "640x400" }, "stream3": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 10,
Copyright � Synology Inc. All rights Reserved.
436
Synology Surveillance Station Web API
"quality": "5", "resolution": "640x400" }, "tvStandard": 0, "uiStmNoList": "1,1,1", "updateTime": 12464, "vendor": "EDIMAX", "videoCodec": 3, "videoMode": "", "volumeSpace": "8.492", "wiperCap": false }, { "DINum": 1, "DONum": 0, "analyticsType": 0, "audioCodec": 2, "audioOut": false, "blG726LE": false, "blPtzShowIcon": false, "blReceivePocZero": false, "channel": "Original", "deleted": false, "deviceType": 8, "doorbellNum": 0, "dsId": 0, "enableLowProfile": true, "enableRecordingKeepDays": false, "enableRecordingKeepSize": true, "enabled": true, "extDIDev": 0, "extDIPorts": -1, "feRegionList": [ { "camId": 11, "id": 1, "location": 0, "name": "Default Region", "posX": 500, "posY": 500, "regions": [
{ "camId": 11, "id": 1, "location": 0, "name": "Default Region", "posX": 500, "posY": 500, "strSubRegionInfo": "[]", "type": 0, "zoom": 25
Copyright � Synology Inc. All rights Reserved.
437
Synology Surveillance Station Web API
} ], "strSubRegionInfo": "[]", "type": 0, "zoom": 25 }, { "camId": 11, "id": 2, "location": 0, "name": "Default Panorama", "posX": 500, "posY": 250, "regions": [ {
"camId": 11, "id": 2, "location": 0, "name": "Default Panorama", "posX": 500, "posY": 250, "strSubRegionInfo": "[]", "type": 1, "zoom": 25 } ], "strSubRegionInfo": "[]", "type": 1, "zoom": 25 }, { "camId": 11, "id": 3, "location": 0, "name": "Default Double Panorama", "posX": 500, "posY": 250, "regions": [ { "camId": 0, "id": 0, "location": 0, "name": "", "posX": 500, "posY": 250, "strSubRegionInfo": "", "type": 6, "zoom": 25 }, { "camId": 0,
Copyright � Synology Inc. All rights Reserved.
438
Synology Surveillance Station Web API
"id": 0, "location": 0, "name": "", "posX": 500, "posY": 750, "strSubRegionInfo": "", "type": 6, "zoom": 25 } ], "strSubRegionInfo": "[{\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":500,\"posY\":250,\"strSubRegionInfo\":\"\",\ "type\":6,\"zoom\":25}, {\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":500,\"posY\":750,\"strSubRegionInfo\":\"\",\"t ype\":6,\"zoom\":25}]", "type": 2, "zoom": 25 }, { "camId": 11, "id": 4, "location": 0, "name": "Default Triple View", "posX": 500, "posY": 250, "regions": [ { "camId": 0, "id": 0, "location": 0, "name": "", "posX": 250, "posY": 250, "strSubRegionInfo": "", "type": 5, "zoom": 25 }, { "camId": 0, "id": 0, "location": 0, "name": "", "posX": 750, "posY": 250, "strSubRegionInfo": "", "type": 5, "zoom": 25 }, { "camId": 0, "id": 0,
Copyright � Synology Inc. All rights Reserved.
439
Synology Surveillance Station Web API
"location": 0, "name": "", "posX": 500, "posY": 750, "strSubRegionInfo": "", "type": 6, "zoom": 25 } ], "strSubRegionInfo": "[{\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":250,\"posY\":250,\"strSubRegionInfo\":\"\",\ "type\":5,\"zoom\":25}, {\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":750,\"posY\":250,\"strSubRegionInfo\":\"\",\"t ype\":5,\"zoom\":25}, {\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":500,\"posY\":750,\"strSubRegionInfo\":\"\",\"t ype\":6,\"zoom\":25}]", "type": 3, "zoom": 25 }, { "camId": 11, "id": 5, "location": 0, "name": "Default Quad View", "posX": 500, "posY": 250, "regions": [ { "camId": 0, "id": 0, "location": 0, "name": "", "posX": 250, "posY": 250, "strSubRegionInfo": "", "type": 5, "zoom": 25 }, { "camId": 0, "id": 0, "location": 0, "name": "", "posX": 750, "posY": 250, "strSubRegionInfo": "", "type": 5, "zoom": 25 }, {
Copyright � Synology Inc. All rights Reserved.
440
Synology Surveillance Station Web API
"camId": 0, "id": 0, "location": 0, "name": "", "posX": 250, "posY": 750, "strSubRegionInfo": "", "type": 5, "zoom": 25 }, { "camId": 0, "id": 0, "location": 0, "name": "", "posX": 750, "posY": 750, "strSubRegionInfo": "", "type": 5, "zoom": 25 } ], "strSubRegionInfo": "[{\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":250,\"posY\":250,\"strSubRegionInfo\":\"\",\ "type\":5,\"zoom\":25}, {\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":750,\"posY\":250,\"strSubRegionInfo\":\"\",\"t ype\":5,\"zoom\":25}, {\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":250,\"posY\":750,\"strSubRegionInfo\":\"\",\"t ype\":5,\"zoom\":25}, {\"camId\":0,\"id\":0,\"location\":0,\"name\":\"\",\"posX\":750,\"posY\":750,\"strSubRegionInfo\":\"\",\"t ype\":5,\"zoom\":25}]", "type": 4, "zoom": 25 } ], "firmware": "", "fisheyeDispMode": "Original", "fisheyeParam": { "bitrate_control_": "", "bitrate_control_h264": "", "bitrate_control_h265": "", "bitrate_control_mjpeg": "", "bitrate_control_mpeg4": "", "bitrate_control_mxpeg": "", "bitrate_control_smart_264": "", "bitrate_control_smart_265": "", "channel_list": "1", "default_channel": "1", "limit_shape": "none", "limit_x_min": "0", "limit_y_min": "0",
Copyright � Synology Inc. All rights Reserved.
441
Synology Surveillance Station Web API
"radius_factor": "0.9, 1.02, 0.9, 1.02", "radius_factor_panorama": "1.02", "region_limit": "0.98", "region_limit_panorama": "0.98", "transform_offset_x": "0", "transform_offset_y": "0", "transform_xyratio": "1", "wall_mount_limit_factor_x": "1.02", "wall_mount_limit_factor_y": "1.02", "wall_mount_phi_fov": "153", "wall_mount_theta_factor": "1" }, "folder": "/volume2/surveillance/OncamGrandeye - EVO-12NCD", "fov": "", "hasCamParam": true, "hasEdgeStg": false, "highProfileStreamNo": 1, "id": 11, "idOnRecServer": 0, "ip": "10.13.22.96", "isAudioDisableRec": false, "isDisableRec": false, "isEnableExtDI": false, "isUnrecognized": false, "ledCap": false, "liveViewSource": 0, "lowProfileStreamNo": 1, "mediumProfileStreamNo": 1, "mobileLiveViewSource": 0, "model": "EVO-12NCD", "mountType": 0, "newName": "OncamGrandeye - EVO-12NCD", "pairedSpeakerEnabled": false, "pairedSpeakerId": 0, "port": 80, "postRecordTime": 5, "preRecordTime": 5, "presetNum": 0, "ptzCap": 0, "recShare": "surveillance", "recShareMountType": 0, "recSharePath": "/volume2/surveillance", "recStatus": 0, "recStorageStatus": 0, "recVolume": "/volume2", "recordTime": 30, "recordingKeepDays": 30, "recordingKeepSize": "10", "relayPortList": [], "rotateOption": 0, "speedDryCap": false,
Copyright � Synology Inc. All rights Reserved.
442
Synology Surveillance Station Web API
"status": 15, "statusFlags": 0, "stmFisheyeType": 50, "stream1": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 5, "quality": "5", "resolution": "1472x1384" }, "stream2": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 10, "quality": "5", "resolution": "640x400" }, "stream3": { "bitrateCtrl": 1, "constantBitrate": "1000", "fps": 10, "quality": "5", "resolution": "640x400" }, "tvStandard": 0, "uiStmNoList": "1,1,1", "updateTime": 12466, "vendor": "OncamGrandeye", "videoCodec": 3, "videoMode": "Original View", "volumeSpace": "9.782", "wiperCap": false } ] }, "didCode": "", "dsSerial": "1880PEN763106", "method": "List", "success": true, "version": 9 }, "success": true }
2.3.51.3 DeleteTask
Delete an Archive Vault task. Request
Copyright � Synology Inc. All rights Reserved.
443
Synology Surveillance Station Web API
Key id keepRec
Value <integer> <boolean>
Description Task Id. Keep the recording files or not.
Availability 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="DeleteTask"&id=2&keepRec=false
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {"success":true}
2.3.51.4 ListTask
List exist Archive Vault tasks.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="ListTask"
Response
Key
Value
BandwidthLimi <integer>
t1
BandwidthLimi <integer>
t2
blCustomFolde <boolean>
r
blLimitBySize <boolean>
blLimitByDate <boolean>
blRotateFile <boolean>
blAllCam
<boolean>
blSrcRecNoOve <boolean>
Description First limit value of bandwidth control limit.
Availability 1 and onward
Second limit value of bandwidth control limit. 1 and onward
To determine whether using custom folder 1 and onward
name to save or not.
To determine whether the task has file size 1 and onward
limit or not.
To determine whether the task has date limit 1 and onward
or not.
To determine whether the files in the task will 1 and onward
be rotated or not.
To determine archive task includes all
1 and onward
camera or not.
To determine whether the files in the task will 1 and onward
Copyright � Synology Inc. All rights Reserved.
444
Synology Surveillance Station Web API rlap
blUseRecDet <boolean>
bwSchedule <schedule string> configuring <boolean>
currentSpeedLi <integer> mit customFolder <string>
camIds
<CAMERA_ID>
cameras dayLimit
Array of <Camera Information Object> <integer>
deleted
<boolean>
didCode
<string>
diffSerial
<string>
dsSerial
<string>
enabled
<boolean>
execTime
<timestamp>
fromId
<integer>
hostname
<string>
id
<integer>
lastConnectTi <timestamp> me
lastEventId <integer>
lastEventIdByC <Json object> am
migrating
<boolean>
name occupiedSize passwd
<string> <long long> <string>
progressPerce <integer> nt
protocol
<integer>
port
<string>
has the same time duration as the files in server or not.
To determine whether the files in the task only include "Event Summary" or not.
Enabling "Event Summary" will only archive event clips such as Motion Detection, Digital Input, Tampering Detection, Audio Detection, PIR motion Detection, ACAP Detection.
Schedule for bandwidth control.
The task is configuring or not.
Current speed limit.
1 and onward
1 and onward 1 and onward 1 and onward
The path of custom folder if blCustomFolder is 1 and onward
true.
List of desired cameras to perform
1 and onward
archiving tasks.
Info of camera in camIds.(See 2.3.4.3)
1 and onward
Specify a period of time (in days) to retain the 1 and onward
recordings. Any recordings that were saved
earlier than the specified time range will be
deleted automatically.
The task is deleted or not.
1 and onward
Device Id.
1 and onward
Different ds serial if ds serial is modified. 1 and onward
login source ds serial.
1 and onward
Task is enabled or not.
1 and onward
Specify one-time task execution time.
1 and onward
ds id.
1 and onward
Host name(ip) of archiving source server. 1 and onward
Task Id.
1 and onward
Last connect time.
1 and onward
Last event Id.
1 and onward
The json object which key is camera id and 1 and onward
value is lastEventId.
The task is currently migrating(changing 1 and onward
folder path) or not.
Task name.
1 and onward
The file size that task total used.
1 and onward
Login user password of archiving source 1 and onward
server.
The percentage of the task if the task is 1 and onward
executing.
Protocal that connect to Archiving server. 1 and onward
Http: 0, Https: 1
Port of archiving source server.
1 and onward
Copyright � Synology Inc. All rights Reserved.
445
Synology Surveillance Station Web API
recEndTm
<timestamp>
recMode
<string>
recSchedule <schedule string>
recStartTm <timestamp>
schedule
<schedule string>
shareUpdating <boolean>
sizeLimitGB <integer>
srcDsId
<integer>
status
<integer>
storageAvailabl <boolean>
e
storagePath <string>
tierTaskId
<integer>
transmissionSp <float>
eed
type
<integer>
username
<string>
writingRecPath <string>
End time to archive the recording files. Select recording modes to archive. Schedule for archive recording files. Start time to archive the recording files. Schedule for execute the task. Whether share files are updating. Size limit in GB NAS device Id of source device. Status value of current task. normal: 0 disabled: 1 completed: 2 deleted: 3 abnormal: 4 Whether storage is available or not.
Storage Path. Tier Task Id. Transmission speed if task is executing.
Task Type. UnKnown = 0 Onetime_Immediate = 1 Onetime_Schedule = 2 Schedule = 3 Tiering = 4 Login user name of archiving source
server. The path of the last event updated.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
Example:
"data":{"task": [{"bandwidthLimit1":1000,"bandwidthLimit2":1000,"blAllCam":false,"blCustomFolder":false,"blLimitByDate ":true,"blLimitBySize":false,"blRotateFile":true,"blSrcRecNoOverlap":false,"blUseRecDet":false,"bwSchedul e":"11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111","cam Ids":"10","cameras": [{"channel":"1","deviceType":4,"firmware":"","folder":"/volume2/surveillance/@ArchiveVault/2/zDIMAX PT-31E","id":10,"ip":"10.13.22.52","model":"PT-31E","newName":"zDIMAX - PT31E","port":80,"recDeleted":false,"status":0,"vendor":"EDIMAX"}],"configuring":false,"currentSpeedLimit": 0,"customFolder":"","dayLimit":30,"deleted":false,"didCode":"","diffSerial":"","dsSerial":"1880PEN763106", "enabled":true,"execTime":0,"fromId":1,"hostname":"127.0.0.1","id":8,"lastConnectTime":1542334200,"la stEventId":0,"lastEventIdByCam":"null","migrating":false,"name":"2","occupiedSize":0,"passwd":"","port":5 000,"progressPercent":0,"protocol":0,"recDetType":"","recEndTm":0,"recMode":"1,10,2,5,8,9,3,4","recSch edule":"1111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Copyright � Synology Inc. All rights Reserved.
446
Synology Surveillance Station Web API
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "recStartTm":1542124800,"schedule":"111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111","shareUpdating":false,"sizeLimitGB":10,"srcDsId":0,"status":2,"storageAvail able":true,"storagePath":"/volume2/surveillance","tierTaskId":0,"transmissionSpeed":0,"type":3,"usernam e":"admin","writingRecPath":""}],"total":1}
2.3.51.5 EnableTask
Enable Archive Vault task. Completed one-time task cannot be enabled or disabled. Request
Key id
Value <integer>
Task Id.
Description
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="EnableTask"&id= "2"
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {"success":true}
2.3.51.6 DisableTask
Disable an Archive Vault task. Completed one time task cannot be enabled or disabled. Request
Key id
Value <integer>
Task Id.
Description
Availability 1 and onward
Example: GET /webapi/entry.cgi?
Copyright � Synology Inc. All rights Reserved.
447
Synology Surveillance Station Web API api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="DisableTask"&id= "2"
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {"success":true}
2.3.51.7 BatchEditTask
Disable Archive Vault task. Completed one time task cannot be enabled or disabled. Request
Key taskIds
attrs
Value <string>
<Object>
Description
Task Ids that wants to apply the settings, seperated by ",".
The key and value setting pairs that will apply .The key can be the key in the request of the method SaveTask except some unique values.
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="BatchEditTask"&taskIds="3,4,5,6"&a ttrs={"schedule":"111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111"}
Response
Key success pid
Value <boolean> <integer>
Description Execution success or not Batch edit process id
Availability 1 and onward 1 and onward
Example: {"data":{"pid":26631},"success":true}
Copyright � Synology Inc. All rights Reserved.
448
Synology Surveillance Station Web API
2.3.51.8 GetBatchEditProgress
Get the progress of batch edit. Request
Key pid
Value <integer>
Description Batch Edit process id
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="GetBatchEditProgress"&pid=31929
Response
Key success progress
Value <boolean> 0 .. 100
Example: {"data":{"progress":100},"success":true}
Description
Execution success or not
The complete percentage of batch edit progress.
Availability 1 and onward 1 and onward
2.3.51.9 BatchEditProgressDone
Send after the batch edit progress is done(use GetBatchEditProgress to check), in order to clean progress data.
Request
Key pid
Value <integer>
Description Batch Edit process id
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="BatchEditProgressDone"&pid=31929
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
449
Synology Surveillance Station Web API
Example: {"success":true}
2.3.51.10 API Error Code
Code 400 401 446
534
522
Execution Failed. Guest or disabled account. Task Path already exist. Exceed name length limitation. Original Task is Migrating.
Description
Copyright � Synology Inc. All rights Reserved.
450
Synology Surveillance Station Web API
2.3.52 SYNO.SurveillanceStation.YoutubeLive
This API provides methods to get information of youtube liveview.
Name SYNO.SurveillanceStation.YoutubeLive
Version 1
Method Name Load Save
CloseLive
Section 2.3.52.1 2.3.52.2 2.3.52.3
Availability Surveillance Station 8.2
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
451
Synology Surveillance Station Web API
2.3.52.1 Load
Get youtube live broadcast setting and current information. Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.YoutubeLive"&version="1"&method="Load"
Response
Key data success
Value <YoubtubeLive Object> <boolean>
Description Information of youtube live Execution success or not
<YoubtubeLive Object> Definitions:
Key
Value
cam_id
<integer>
connect
<boolean>
key
<string>
live_on
<boolean>
rtmp_path <string>
stream_profile <integer>
Description Id of camera. Rmtp connect or not
Youtube serial key Broadcast live or not
Broadcast rtmp path Camera stream profile
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example: {
"data" : { "cam_id" : 2, "connect" : false, "key" : "1ma7-s2gw-b7ja-e0rb", "live_on" : false, "rtmp_path" : "rtmp://a.rtmp.youtube.com/live2", "stream_profile" : 1
}, "success" : true }
Copyright � Synology Inc. All rights Reserved.
452
Synology Surveillance Station Web API
2.3.52.2 Save
Set youtube live broadcast information. Request
Key
Value
rtmp_path <string>
key
<string>
cam_id
<integer>
stream_profile <integer>
live_on
<bollean>
Description Camera rtmp path Youtube serial key Camera Id Camera stream profile Youtube live broadcast start or not
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.YoutubeLive"&method="Save"&version="1"& rtmp_path="rtmp://a.rtmp.youtube.com/live2"&key="1ma7-s2gw-b7jae0rb"&cam_id="2"&stream_profile="1"&live_on="true"
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
"success" : true }
2.3.52.3 CloseLive
Close youtube live broadcast.
Request No parameter is required.
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.YoutubeLive"&method="CloseLive"&version="1"
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
453
Synology Surveillance Station Web API
Example: {
"success" : true }
Copyright � Synology Inc. All rights Reserved.
454
Synology Surveillance Station Web API
2.3.53 SYNO.SurveillanceStation.IVA
This API provides methods to get information of deep video analytics task list and settings.
Name SYNO.SurveillanceStation.IVA
Method Name ListTask SaveTask
DeleteTask EnableTask DisableTask ResetPplCntCounter
2.3.53.1 ListTask
Get deep video analytics task list.
Request No parameter is required.
Version 1
Section 2.3.53.1 2.3.53.2 2.3.53.3 2.3.53.4 2.3.53.5 2.3.53.6
Availability Surveillance Station 8.2.9
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.IVA"&version="1"&method="ListTask"
Response
Key data success
Value <Task List Object> <boolean>
<Task List Object> Definitions:
Key task total
Value Array of <Task> <integer>
<Task> Definitions:
Key
Value
analyze_type <string>
area_grid
<boolean>
area_line
<boolean>
area_region <integer>
camera_id <string>
camera_name <integer>
deleted
<boolean>
det_fg_obj <integer>
Description Information of task list. Execution success or not
Availability 1 and onward 1 and onward
Description List of task info. The total number of tasks.
Availability 1 and onward 1 and onward
Description Paired camea name The deleted status of this task The enabled status of this task The id of this task The name of this task The event count of this task today the status of this task to be deleted or not the bitmap of status of detected object for
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
455
Synology Surveillance Station Web API
det_region <string>
det_region_cnt <integer>
enable
<boolean>
enable_min_d <boolean>
uration
enable_recordi <boolean>
ng
enable_schedu <boolean>
le
event_integrati <boolean>
on
fence_dir_flag <integer>
fence_line <string>
id
<integer>
id_on_rec_serv <integer>
er
min_duration <integer>
min_obj_size <double>
min_obj_size_ <integer> option
name
<string>
owner_ds_id <integer>
people_display <integer> _info
people_display <integer> _pos
detecting specific object. 1 - detect people 2 - detect vehicle the vertexes of detected region of detection task, concatenated by "," the number of detected region the status of this task to start processing the status of the shortest limitation of object staying in the detected region. the status to record the video of detected result the status to enable the schedule of this task
1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
the status to integrate motion detected event 1 and onward
with surveillance station
the status of detection direction of virtual 1 and onward
fence task.
1 - detect one direction of the fence
2 - the other direction of the fence
3 - the both 2 directions of the fence
the vertexes of virtual fence of intrusion
1 and onward
detection task, concatenated by ","
the id of this DVA task
1 and onward
the id of this DVA task on recording server. it is 1 and onward
only work on cms host.
the seconds of the shortest limitation of
1 and onward
object staying in the detected region.
the minimum limitation of object size of
1 and onward
detection.
the status to limit the object size of detection. 1 and onward
0 - disable limitation
1 - enable limitation
the name of this DVA task
1 and onward
The DS id of which DS the recording belongs 1 and onward
0: Local Host
> 0: The id of recording server
The bitmap of the display info.
1 and onward
1 - DISPLAY_ANNOTATION
2 - DISPLAY_HINT_WHEN_PASS
4 - DISPLAY_REGION
8 - DISPLAY_BORDER
16 - DISPLAY_LINE
32 - DISPLAY_PEOPLE_COUNT_LIVE
64 - DISPLAY_PEOPLE_COUNT_REC
128 - DISPLAY_PEOPLE_STAY
324 DISPLAY_PEOPLE_GROUP_COUNT
512 - DISPLAY_PEOPLE_GROUP_STAY
the status of position of people counting
1 and onward
displayed result on task preview.
0 - top right
1 - bottom right
Copyright � Synology Inc. All rights Reserved.
456
Synology Surveillance Station Web API
people_enable <boolean> _stay_max people_enter <integer>
people_exit <integer>
people_hint_p <string> os people_mode <integer>
det_region <string> people_stay_m <integer> ax post_rec_time <integer> pre_rec_time <integer> region_type <integer>
reset_cnt_freq <integer> uency
2 - top left 3 - bottom left
the status of to limit the stay count or not
1 and onward
the array index of people entering it could be changed with people_exit to swap counting result.
the array index of people exiting it could be changed with people_enter to swap counting result.
the vertexes of people direction of people counting task, concatenated by ","
the status of counting mode for people counting task 0 - counting for both enter and leave
people 1 - counting for only enter people 2 - counting for only leave people
the vertexes of detected region of detection task, concatenated by ","
the limit number of people stayed. Only work when people_enable_stay_max is true.
the seconds to clip the record after detection
the seconds to clip the record before detection
the status of region type 0 - Include region 1 - Exclude region
the type of reset people count frequency. 1 - reset people count by days 2 - reset people count by weeks 3 - reset people count by months 4 - reset people count by years
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
reset_weekday <integer>
reset_date <integer>
reset_time_mi <integer>
nute
reset_time_ho <integer>
ur
schedule
<string>
scheduleOn <boolean>
status_flags <integer>
the weekday to reset count the date of the month to reset count the minutes of the hour in the day to reset count the hours of the day to reset count
1 and onward 1 and onward 1 and onward
1 and onward
the bitmap of hours in a week to process task. 1 and onward
the status to enable the schedule of this task 1 and onward
the bitmap of task status.
1 and onward
0 - DEV_STATUS_FLAG_NONE
1 - DEV_STATUS_FLAG_UNRECOGNIZED
2 - DEV_STATUS_FLAG_DISABLING
4 -DEV_STATUS_FLAG_ENABLING
8 -DEV_STATUS_FLAG_RESTARTING
16 -DEV_STATUS_FLAG_DELETING
32 -DEV_STATUS_FLAG_CONFIGURING
Copyright � Synology Inc. All rights Reserved.
457
Synology Surveillance Station Web API stream_profile <integer> sync_to_host <boolean> trans_flags <integer>
trigger_alert <boolean>
64
-DEV_STATUS_FLAG_HW_RESTARTING
128 -DEV_STATUS_FLAG_UNSTABLE
the status of camera stream level
1 and onward
0 - level high
1 - level medium
2 - level low
the status of this task to sync people counting 1 and onward
result to cms host
the bitmap of transient status of this task
1 and onward
0 -DVA_TRANS_FLAG_NORMAL
1 -DVA_TRANS_FLAG_CAM_FPS
2 - DVA_TRANS_FLAG_FETCH_FPS
4 -DVA_TRANS_FLAG_SIMULATING
the status of this task to trigger alert event 1 and onward
Example: {
"data" : {
"task": [{
"analyze_type": 6, "area_grid": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111", "area_line": "0.25,0.5,0.5,0.5,0.75,0.5",
Copyright � Synology Inc. All rights Reserved.
458
Synology Surveillance Station Web API
"area_region": "0.25,0.3333,0.25,0.6666,0.5,0.8333,0.75,0.6666,0.75,0.3333,0.5,0.1666", "camera_id": 21, "camera_name": "1", "day_night_filter_mode": 0, "day_night_filter_time": 10, "deleted": false, "det_fg_obj": 0, "det_region": "0.1,0.1,0.1,0.9,0.9,0.9,0.9,0.1;0.2,0.2,0.2,0.8,0.8,0.8,0.8,0.2;0.3,0.3,0.3,0.7,0.7,0.7,0.7,0.3", "det_region_cnt": 1, "disable_detection": false, "enable": true, "enable_min_duration": false, "enable_recording": true, "enable_schedule": true, "enable_tampering": true, "enable_tampering_2": true, "enter_night_hour": 18, "enter_night_min": 0, "event_integration": true, "fence_dir_flag": 3, "fence_line": "0.3,0.6,0.5,0.5,0.7,0.6", "id": 10, "id_on_rec_server": 4, "ignore_bg_event": 0, "ignore_bg_event_2": 0, "ignore_bg_obj": 0, "ignore_bg_obj_2": 0, "leave_night_hour": 6, "leave_night_min": 0, "min_duration": 10, "min_obj_size": 0.2000000029802322, "min_obj_size_2": 0.2000000029802322, "min_obj_size_option": 1, "min_obj_size_option_2": 1,
Copyright � Synology Inc. All rights Reserved.
459
Synology Surveillance Station Web API
"name": "123", "owner_app": 0, "owner_ds_id": 2, "people_cnt": 0, "people_display_info": 162, "people_display_pos": 0, "people_enable_stay_max": false, "people_enter": 0, "people_exit": 2, "people_hint_pos": "0.446,0.5622,0.5419,0.2216", "people_mode": 0, "people_region": "0.0913,0.4676,0.9559,0.527,0.957,0.3758,0.0928,0.3081", "people_size": 0, "people_stay_max": 100, "post_rec_time": 5, "pre_rec_time": 5, "region_type": 0, "reset_cnt_frequency": 1, "reset_date": 1, "reset_time_hour": 0, "reset_time_minute": 0, "reset_weekday": 0, "schedule": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111", "scheduleOn": true, "sensitivity": 1, "sensitivity_2": 1, "sensitivity_custom_value": 5, "sensitivity_custom_value_2": 5, "smart_tag_categ": 0, "status_flags": 0,
Copyright � Synology Inc. All rights Reserved.
460
Synology Surveillance Station Web API
"stream_profile": 1, "sync_to_host": false, "trans_flags": 0, "trigger_alert": 0 }], total: 1
}, success: true }
2.3.53.2 SaveTask
Create of edit DVA Task Request
Key
Value
analyze_type <integer>
actFromHost <boolean>
name
<string>
camera_id <integer>
enable
<boolean>
enable_recordi <boolean>
ng
pre_rec_time <integer>
post_rec_time <integer>
event_integrati <boolean> on
region_type <integer>
det_region_cnt <integer> det_region <string>
people_mode <integer>
Description
Availability
the type of this DVA task
1 and onward
2 - DVA_NON_IDLE_ZONE
6-
DVA_PEOPLE_COUNTING_CEILING_MOU
NT
8 - DVA_VIRTUAL_FENCE
the relayed flag of cms webapi. It should be 1 and onward
true when calling by cms recording server,
name of this DVA task
1 and onward
the camera id of this DVA task
1 and onward
the status of this task to start processing
1 and onward
the status to record the video of detected 1 and onward
result
the seconds to clip the record before
1 and onward
detection
the seconds to clip the record after detection 1 and onward
the status to integrate motion detected event 1 and onward
with surveillance station
the status of region type
1 and onward
0 - Include region
1 - Exclude region
the number of detected region
1 and onward
the vertexes of detected region of detection 1 and onward
task, concatenated by ","
the status of counting mode for people
1 and onward
counting task
0 - counting for both enter and leave
people
Copyright � Synology Inc. All rights Reserved.
461
Synology Surveillance Station Web API
reset_cnt_freq <integer> uency
1 - counting for only enter people 2 - counting for only leave people
the type of reset people count frequency. 1 - reset people count by days 2 - reset people count by weeks 3 - reset people count by months 4 - reset people count by years
1 and onward
reset_weekday <integer> reset_date <integer> reset_time_mi <integer> nute reset_time_ho <integer> ur fence_dir_flag <integer>
people_display <integer> _pos
stream_profile <integer>
people_enable <boolean> _stay_max intrusion_dete <integer> ct_target
det_fg_obj <integer>
min_obj_size <double> min_obj_size_ <integer> option enable_min_d <boolean> uration min_duration <integer> people_display <integer> _info
the weekday to reset count
the date of the month to reset count the minutes of the hour in the day to reset count the hours of the day to reset count
1 and onward 1 and onward 1 and onward
1 and onward
the status of detection direction of virtual fence task. 1 - detect one direction of the fence 2 - the other direction of the fence 3 - the both 2 directions of the fence
the status of position of people counting displayed result on task preview. 0 - top right 1 - bottom right 2 - top left 3 - bottom left
the status of camera stream level 0 - level high 1 - level medium 2 - level low
the status of to limit the stay count or not
1 and onward 1 and onward 1 and onward 1 and onward
the status of the detected type of intrusion 1 and onward
detection.
1 - detect all object
2 - detect specific object
the bitmap of status of detected object for 1 and onward
detecting specific object.
1 - detect people
2 - detect vehicle
the minimum limitation of object size of
1 and onward
detection.
the status to limit the object size of detection. 1 and onward
0 - disable limitation
1 - enable limitation
the status of the shortest limitation of object 1 and onward
staying in the detected region.
the seconds of the shortest limitation of
1 and onward
object staying in the detected region.
The bitmap of the display info.
1 and onward
1 - DISPLAY_ANNOTATION
2 - DISPLAY_HINT_WHEN_PASS
Copyright � Synology Inc. All rights Reserved.
462
Synology Surveillance Station Web API
people_enter <integer> people_stay_m <integer> ax people_exit <integer> people_region <string> people_hint_p <string> os blEditMode <boolean>
4 - DISPLAY_REGION 8 - DISPLAY_BORDER 16 - DISPLAY_LINE 32 - DISPLAY_PEOPLE_COUNT_LIVE 64 - DISPLAY_PEOPLE_COUNT_REC 128 - DISPLAY_PEOPLE_STAY 324 DISPLAY_PEOPLE_GROUP_COUNT 512 - DISPLAY_PEOPLE_GROUP_STAY
the array index of people entering it could be changed with people_exit to swap counting result.
the limit number of people stayed. Only work when people_enable_stay_max is true.
the array index of people exiting it could be changed with people_enter to swap counting result.
the vertexes of detected region of people counting task, concatenated by ","
the vertexes of people direction of people counting task, concatenated by ","
the status of task to be edited or not
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? id=6&name="TaskName"&camera_id=2&owner_ds_id=0&id_on_rec_server=0&deleted=false&owner_app =0&event_integration=true&enable_recording=true&status_flags=0&stream_profile=1&analyze_type=8&e vent_type=0&sensitivity=1&sensitivity_2=1&sensitivity_custom_value=5&sensitivity_custom_value_2=5&e nable_min_duration=false&min_duration="10"&min_obj_size="0.2000000029802322"&min_obj_size_opti on=0&min_obj_size_2="0.2000000029802322"&min_obj_size_option_2=1&people_mode=0&people_enab le_stay_max=false&people_stay_max="100"&people_display_info=17&people_display_pos=0&people_size =0&people_cnt=0&people_enter=0&people_exit=2&people_region="0.45,0.3,0.45,0.7,0.55,0.7,0.55,0.3"& people_hint_pos="0.3442,0.3652,0.5788,0.57"®ion_type=0&reset_cnt_frequency=1&reset_weekday=0 &reset_date=1&reset_time_hour=0&reset_time_minute=0&enable_schedule=true&ignore_bg_event=0&i gnore_bg_obj=0&ignore_bg_event_2=0&ignore_bg_obj_2=0&det_fg_obj=0&det_region_cnt=1&det_regio n="0.1,0.1,0.1,0.9,0.9,0.9,0.9,0.1;0.2,0.2,0.2,0.8,0.8,0.8,0.8,0.20.3,0.3,0.3,0.7,0.7,0.7,0.7,0.3"&schedule="1 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111"&area_reg ion="0.25,0.3333,0.25,0.6666,0.5,0.8333,0.75,0.6666,0.75,0.3333,0.5,0.1666"&area_line="0.25,0.5,0.5,0.5, 0.75,0.5"&area_grid="11111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Copyright � Synology Inc. All rights Reserved.
463
Synology Surveillance Station Web API
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111"&task_argument=""&fence_line="0.1644,0.6345,0.5008,0.8475,0.7002,0.6009"&fence_d ir_flag=3&pre_rec_time=5&post_rec_time=5&enable_tampering=true&enable_tampering_2=true&day_ni ght_filter_mode=0&leave_night_hour=6&leave_night_min=0&enter_night_hour=18&enter_night_min=0& day_night_filter_time=10&smart_tag_categ=7&groupName=""&groupId=0&isGroupEnabled=false&schedu leOn=true&camera_name="User Defined"&det_region_mode=1&enable_min_duration_2=false&min_duration_2="10"&det_fg_obj_2=0&bl EditMode=true&api=SYNO.SurveillanceStation.IVA&method=SaveTask&version=1
Response
Key data success
Value <Task> <boolean>
Description information of DVA task Execution success or not
Availability 1 and onward 1 and onward
<Task> Definitions:
Key
Value
analyze_type <string>
area_grid
<boolean>
area_line
<boolean>
area_region <integer>
camera_id <string>
camera_name <integer>
deleted
<boolean>
det_fg_obj <integer>
det_region <string>
det_region_cnt <integer>
enable
<boolean>
enable_min_d <boolean>
uration
enable_recordi <boolean>
ng
enable_schedu <boolean>
le
event_integrati <boolean>
on
fence_dir_flag <integer>
Description Paired camea name The deleted status of this task The enabled status of this task The id of this task The name of this task The event count of this task today the status of this task to be deleted or not the bitmap of status of detected object for detecting specific object. 1 - detect people 2 - detect vehicle the vertexes of detected region of detection task, concatenated by "," the number of detected region the status of this task to start processing the status of the shortest limitation of object staying in the detected region. the status to record the video of detected result the status to enable the schedule of this task
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
the status to integrate motion detected event 1 and onward with surveillance station
the status of detection direction of virtual 1 and onward fence task. 1 - detect one direction of the fence 2 - the other direction of the fence
Copyright � Synology Inc. All rights Reserved.
464
Synology Surveillance Station Web API
fence_line <string>
id
<integer>
id_on_rec_serv <integer>
er
min_duration <integer>
min_obj_size <double>
min_obj_size_ <integer> option
name
<string>
owner_ds_id <integer>
people_display <integer> _info
people_display <integer> _pos
people_enable <boolean> _stay_max people_enter <integer>
people_exit <integer>
people_hint_p <string> os people_mode <integer>
det_region <string>
3 - the both 2 directions of the fence
the vertexes of virtual fence of intrusion
1 and onward
detection task, concatenated by ","
the id of this DVA task
1 and onward
the id of this DVA task on recording server. it is 1 and onward
only work on cms host.
the seconds of the shortest limitation of
1 and onward
object staying in the detected region.
the minimum limitation of object size of
1 and onward
detection.
the status to limit the object size of detection. 1 and onward
0 - disable limitation
1 - enable limitation
the name of this DVA task
1 and onward
The DS id of which DS the recording belongs 1 and onward
0: Local Host
> 0: The id of recording server
The bitmap of the display info.
1 and onward
1 - DISPLAY_ANNOTATION
2 - DISPLAY_HINT_WHEN_PASS
4 - DISPLAY_REGION
8 - DISPLAY_BORDER
16 - DISPLAY_LINE
32 - DISPLAY_PEOPLE_COUNT_LIVE
64 - DISPLAY_PEOPLE_COUNT_REC
128 - DISPLAY_PEOPLE_STAY
324 DISPLAY_PEOPLE_GROUP_COUNT
512 - DISPLAY_PEOPLE_GROUP_STAY
the status of position of people counting
1 and onward
displayed result on task preview.
0 - top right
1 - bottom right
2 - top left
3 - bottom left
the status of to limit the stay count or not 1 and onward
the array index of people entering it could be changed with people_exit to swap counting result.
the array index of people exiting it could be changed with people_enter to swap counting result.
the vertexes of people direction of people counting task, concatenated by ","
the status of counting mode for people counting task 0 - counting for both enter and leave
people 1 - counting for only enter people 2 - counting for only leave people
the vertexes of detected region of detection
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
465
Synology Surveillance Station Web API
people_stay_m <integer> ax post_rec_time <integer> pre_rec_time <integer> region_type <integer>
reset_cnt_freq <integer> uency
task, concatenated by ","
the limit number of people stayed. Only work when people_enable_stay_max is true.
the seconds to clip the record after detection
the seconds to clip the record before detection
the status of region type 0 - Include region 1 - Exclude region
the type of reset people count frequency. 1 - reset people count by days 2 - reset people count by weeks 3 - reset people count by months 4 - reset people count by years
1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
reset_weekday <integer>
reset_date <integer>
reset_time_mi <integer>
nute
reset_time_ho <integer>
ur
schedule
<string>
scheduleOn <boolean>
status_flags <integer>
stream_profile <integer> sync_to_host <boolean> trans_flags <integer>
trigger_alert <boolean>
the weekday to reset count
the date of the month to reset count the minutes of the hour in the day to reset count the hours of the day to reset count
1 and onward 1 and onward 1 and onward
1 and onward
the bitmap of hours in a week to process task. 1 and onward
the status to enable the schedule of this task 1 and onward
the bitmap of task status.
1 and onward
0 - DEV_STATUS_FLAG_NONE
1 - DEV_STATUS_FLAG_UNRECOGNIZED
2 - DEV_STATUS_FLAG_DISABLING
4 -DEV_STATUS_FLAG_ENABLING
8 -DEV_STATUS_FLAG_RESTARTING
16 -DEV_STATUS_FLAG_DELETING
32 -DEV_STATUS_FLAG_CONFIGURING
64
-DEV_STATUS_FLAG_HW_RESTARTING
128 -DEV_STATUS_FLAG_UNSTABLE
the status of camera stream level
1 and onward
0 - level high
1 - level medium
2 - level low
the status of this task to sync people counting 1 and onward
result to cms host
the bitmap of transient status of this task
1 and onward
0 -DVA_TRANS_FLAG_NORMAL
1 -DVA_TRANS_FLAG_CAM_FPS
2 - DVA_TRANS_FLAG_FETCH_FPS
4 -DVA_TRANS_FLAG_SIMULATING
the status of this task to trigger alert event 1 and onward
Example: {
Copyright � Synology Inc. All rights Reserved.
466
Synology Surveillance Station Web API
{
"data": { "analyze_type": 6, "area_grid":
"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111",
"area_line": "0.25,0.5,0.5,0.5,0.75,0.5", "area_region": "0.25,0.3333,0.25,0.6666,0.5,0.8333,0.75,0.6666,0.75,0.3333,0.5,0.1666", "camera_id": 21, "camera_name": "1", "day_night_filter_mode": 0, "day_night_filter_time": 10, "deleted": false, "det_fg_obj": 0, "det_region": "0.1,0.1,0.1,0.9,0.9,0.9,0.9,0.1;0.2,0.2,0.2,0.8,0.8,0.8,0.8,0.2;0.3,0.3,0.3,0.7,0.7,0.7,0.7,0.3", "det_region_cnt": 1, "disable_detection": false, "enable": true, "enable_min_duration": false, "enable_recording": true,
Copyright � Synology Inc. All rights Reserved.
467
Synology Surveillance Station Web API
"enable_schedule": true, "enable_tampering": true, "enable_tampering_2": true, "enter_night_hour": 18, "enter_night_min": 0, "event_integration": true, "fence_dir_flag": 3, "fence_line": "0.3,0.6,0.5,0.5,0.7,0.6", "id": 10, "id_on_rec_server": 4, "ignore_bg_event": 0, "ignore_bg_event_2": 0, "ignore_bg_obj": 0, "ignore_bg_obj_2": 0, "leave_night_hour": 6, "leave_night_min": 0, "min_duration": 10, "min_obj_size": 0.2000000029802322, "min_obj_size_2": 0.2000000029802322, "min_obj_size_option": 1, "min_obj_size_option_2": 1, "name": "123", "owner_app": 0, "owner_ds_id": 2, "people_cnt": 0, "people_display_info": 162, "people_display_pos": 0, "people_enable_stay_max": false, "people_enter": 0, "people_exit": 2, "people_hint_pos": "0.446,0.5622,0.5419,0.2216", "people_mode": 0, "people_region": "0.0913,0.4676,0.9559,0.527,0.957,0.3758,0.0928,0.3081", "people_size": 0, "people_stay_max": 100,
Copyright � Synology Inc. All rights Reserved.
468
Synology Surveillance Station Web API
"post_rec_time": 5, "pre_rec_time": 5, "region_type": 0, "reset_cnt_frequency": 1, "reset_date": 1, "reset_time_hour": 0, "reset_time_minute": 0, "reset_weekday": 0, "schedule": "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111", "scheduleOn": true, "sensitivity": 1, "sensitivity_2": 1, "sensitivity_custom_value": 5, "sensitivity_custom_value_2": 5, "smart_tag_categ": 0, "status_flags": 0, "stream_profile": 1, "sync_to_host": false, "trans_flags": 0, "trigger_alert": 0 }, "success": true }
2.3.53.3 DeleteTask
Delete DVA tasks Request
Key ids
Value <string>
Description The list of <TASK_ID> to be deleted,
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
469
Synology Surveillance Station Web API concatenated by ",".
Example:
GET /webapi/entry.cgi? ids="1"&keepRecording=false&api=SYNO.SurveillanceStation.IVA&method=DeleteTask&version=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
2.3.53.4 EnableTask
Enable DVA tasks Request
Key ids
Value <string>
Description The list of <TASK_ID> to be enabled, concatenated by ",".
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IVA"&version="1"&method="EnableTask"&&ids="1,2,3"
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
Copyright � Synology Inc. All rights Reserved.
470
Synology Surveillance Station Web API
2.3.53.5 DisableTask
Disable DVA tasks Request
Key ids
Value <string>
Description The list of <TASK_ID> to be disabled, concatenated by ",".
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IVA"&version="1"&method="DisableTask"&&ids="1,2,3"
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
2.3.53.6 ResetPplCntCounter
Reset the counter of people counting task Request
Key taskId
<int>
Value
Description The id of the task to be reseted.
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IVA"&version="1"&method="ResetPplCntCounter"&&taskId=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
471
Synology Surveillance Station Web API
Example: {
success: true }
2.3.53.7 API Error Code
Code 400 401 543 548
Description Operation Failed. Illegal parameters. The number of DVA tasks and face tasks exceed the limitation The input video type of the DVA task is invalid
Copyright � Synology Inc. All rights Reserved.
472
Synology Surveillance Station Web API
2.3.54 SYNO.SurveillanceStation.IVA.Report
This API provides methods to query people counting result.
Name SYNO.SurveillanceStation.IVA.Report
Version 1
Method Name GetCount GetReport
Section 2.3.54.1 2.3.54.2
Availability Surveillance Station 8.2.6
Availability 1 and onward 1 and onward
2.3.54.1 GetCount
Get people counting enter and leave count. Request
Key ids timeStart timeEnd timezone
Value <string> <string> <string> <integer>
Description Task ids Start time in the format "YYYY-MM-DD:HH" End time in the format "YYYY-MM-DD:HH" Offset of the time zone
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IVA.Report"&version="1"&method="GetCount"&ids="1,4"&timeStart="201 9-11-5:10"&timeEnd="2019-11-6:12"&timezone=480
Response
Key data success
Value <report> <boolean>
Description Information of youtube live Execution success or not
Availability 1 and onward 1 and onward
<report> Definitions:
Key enter
exit
Value <integer>
<integer>
Description People enter count
People exit count
Availability 1 and onward
1 and onward
Example: {
"data":{ "report":{
Copyright � Synology Inc. All rights Reserved.
473
Synology Surveillance Station Web API
"enter":145, "exit":87 } }, "success":true }
2.3.54.2 GetReport
Get people counting counts of a day Request
Key ids interval
<string> <int>
Value
intervalUnit <int>
timezone timestamp blOccupancy
<integer> <integer> <boolean>
Description
Task ids, concatenated by ",".
The time interval of the report to get 1 - one day 2 - 1 week 3 - 1 month 4 - 1 year
the time interval unit of horizontal axis of the report to get 0 - DVA_ONE_HOUR 1 - DVA_FOUR_HOUR 2 - DVA_EIGHT_HOUR 3 - DVA_ONE_DAY 4 - DVA_ONE_WEEK 5 - DVA_ONE_MONTH 6 - DVA_ONE_SEASON
Offset of the time zone
Offset of the time stamp to get the report
The status of this webapi to count stayed people
Availability 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? ids="2,3,4"&interval=1&intervalUnit=0×tamp=1622505600&blOccupancy=true&timezone=480&api= SYNO.SurveillanceStation.IVA.Report&method=GetReport&version=1
Response
Key data success
Value <Report List Object> <boolean>
Description Information of report list Execution success or not
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
474
Synology Surveillance Station Web API
<Report List Object> Definitions:
Key report
total
Value array of <report>
<integer>
<Report List Object> Definitions:
Key count0
Value <integer>
count1
<integer>
count2
<integer>
id
<integer>
time
<string>
Example: {
"data": { "report": [ { "count0": 834, "count1": 1508, "count2": 0, "id": 0, "time": "00:00" }, { "count0": 846, "count1": 1511, "count2": 0, "id": 1, "time": "01:00" } ], "total": 2
}, "success": true
Description The list of report information
The total number of report
Availability 1 and onward
1 and onward
Description
Availability
The number of people counting array at index 1 and onward
0
The number of people counting array at index 1 and onward
1
The number of people counting array at index 1 and onward
2
The index of this report
1 and onward
The time of this report in thestring format 1 and onward
Copyright � Synology Inc. All rights Reserved.
475
Synology Surveillance Station Web API }
Copyright � Synology Inc. All rights Reserved.
476
Synology Surveillance Station Web API
2.3.55 SYNO.SurveillanceStation.IVA.Recording
Get the information of the recording file of detection results
Name SYNO.SurveillanceStation.IVA.Recording
Version 1
Method Name List
Delete GetAnalyticsResult
Lock Unlock
Section 2.3.55.1 2.3.55.2 2.3.55.3 2.3.55.4 2.3.55.5
Availability Surveillance Station 8.2.6
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.55.1 List
Reset the counter of people counting task Request
Key taskIdList limit
Value <string> <integer>
Description Task ids, concatenated by ",".
Max amount of recording list returned
Availability 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.IVA.Recording"&version="1"&method="List"&taskIdList="1,5,9"&limit=1
Response
Key data success
Value <DVA Event> <boolean>
Description
Availability
Information of Deep Video Analytics recording 1 and onward
Execution success or not
1 and onward
<DVA Event> Definitions:
Key data analyze_type id video_type
Value <DVA Event> <integer> <integer> <integer>
Description
Availability
Information of Deep Video Analytics recording 1 and onward
The analyze type of DVA Task
1 and onward
The id of the recording
1 and onward
The video codec of the recording.
1 and onward
0 - Unknown
1 - MJPEG
2 - MPEG4
3 - H264
5 - MXPEG
6 - H265
Copyright � Synology Inc. All rights Reserved.
477
Synology Surveillance Station Web API audio_format <integer>
imgHeight <integer>
imgWidth
<integer>
cameraId
<integer>
camIdOnRecSe <integer>
rver
event_size_byt <integer>
es
path
<string>
deleted
<boolean>
dsId
<integer>
folder
<string>
7 - H264+
The audio codec of the recording. 0 - Unknown 1 - PCM 2 - G711 3 - G726 4 - AAC 5 - AMR 6 - UserDefine (use only with user define camera)
The image height of the recording.
The image width of the recording.
The belonged camera id of the recording.
The belonged camera id of the recording on recording server. 0 if it's not CMS host server.
The size of the recording.
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
The file path of the recording.
The recording is deleted or not. The DS id of which DS the recording belongs 0: Local Host > 0: The id of recording server
The path of the folder contains this recording
1 and onward 1 and onward 1 and onward
1 and onward
Example: {
"data" : { "events" : [ { "analyze_type" : 8, "archId" : 0, "archived" : false, "audio_format" : "", "camIdOnRecServer" : 0, "cameraId" : 1, "cause" : 0, "closing" : false, "comment" : "", "commentOnHost" : "", "confidence" : 0, "customLabel" : 0,
Copyright � Synology Inc. All rights Reserved.
478
Synology Surveillance Station Web API
"customLabelOnHost" : 0, "deleted" : false, "dsId" : 0, "event_size_bytes" : 80740352, "fisheye_origin_view" : true, "folder" : "/volume1/surveillance/@VideoAnalytics/123123", "for_rotation_only" : false, "frameCount" : 3096, "id" : 62423, "idOnRecServer" : 0, "imgHeight" : 720, "imgWidth" : 1280, "markAsDel" : false, "mountId" : 0, "path" : "20210524PM/ppl-20210524-163419-1621845259.mp4", "reason" : 0, "recording" : true, "startTime" : 1621845259, "status_flags" : 0, "stopTime" : 1621845414, "systemLabel" : 0, "systemLabelAttr" : {
"16" : "0.00" }, "taskId" : 5, "taskName" : "123123", "task_argument" : "{\"det_fg_obj\":0,\"det_region_cnt\":1,\"enable_min_duration\":false,\"enable_tampering\":true,\"ignore_bg _event\":0,\"ignore_bg_event_2\":0,\"ignore_bg_obj\":0,\"ignore_bg_obj_2\":0,\"min_duration\":10,\"min_o bj_size\":0.2000000029802322,\"min_obj_size_2\":0.2000000029802322,\"min_obj_size_option\":1,\"min_ obj_size_option_2\":1,\"people_enable_stay_max\":false,\"people_stay_max\":100,\"sensitivity\":1,\"sensitiv ity_2\":1}", "uniqueId" : "0_62423", "update_time" : 0, "video_type" : 3
Copyright � Synology Inc. All rights Reserved.
479
Synology Surveillance Station Web API
} ], "total" : 879 }, "httpd_restart" : false, "success" : true }
2.3.55.2 Delete
Delete the recording file of detection results Request
Key slaveDsParam <json>
Value
deleteMethod <integer>
Description
Parameter of filter to delete recording on ds {"5":{"idList": "1,2,3"}} the key "5" is ds id. the value of "idList" is recording id on
ds[5].
Method to delete recording 0 - delete recording with filter 1 - delete all recording
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi?deleteMethod=0&slaveDsParam={"2": {"idList":"1"}}&api=SYNO.SurveillanceStation.IVA.Recording&method=Delete&version=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
Copyright � Synology Inc. All rights Reserved.
480
Synology Surveillance Station Web API
2.3.55.3 GetAnalyticsResult
Get the information of both the task and frame result of the recording file Request
Key eventId taskId blAlertEvt
Value <integer> <integer> <boolean>
Description
The id of the recording The task id of the recording
The event type of the recording true - alert event false - iva event
Availability 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? eventId=44&taskId=1&blAlertEvt=false&api=SYNO.SurveillanceStation.IVA.Recording&method=GetAnalytic sResult&version=1
Response
Key data success
Value <Analytic Result> <boolean>
Description the analytic result of the recording Execution success or not
Availability 1 and onward 1 and onward
<Analytic Result> Definitions:
Key ivaResult setting
Value Array of <Frame Result> <Task>
Description List of the frame result of the recording Execution success or not
Availability 1 and onward 1 and onward
<Frame Result> Definitions:
Key frameId instances is_trigger timestamp
Value <integer> Array of <Bounding Box> <boolean> <integer>
Description the id of the frame result list of bounding box info the status for any bbox trigger the detection. the timestamp of the frame result
Availability 1 and onward 1 and onward 1 and onward 1 and onward
<Bounding Box> Definitions:
Key
Value
bottom_right <Vertex>
top_left
<Vertex>
Description the bottom right vertex of bounding box the top left of bounding box
Availability 1 and onward 1 and onward
<Vertex> Definitions:
Key x
Value <double>
Description the coordinate value of vertex on x axis
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
481
Synology Surveillance Station Web API
y
<double>
the coordinate value of vertex on y axis
1 and onward
<Task> Definitions:
Key
Value
analyze_type <string>
area_grid
<boolean>
area_line
<boolean>
area_region <integer>
camera_id <string>
camera_name <integer>
deleted
<boolean>
det_fg_obj <integer>
det_region <string>
det_region_cnt <integer>
enable
<boolean>
enable_min_d <boolean>
uration
enable_recordi <boolean>
ng
enable_schedu <boolean>
le
event_integrati <boolean>
on
fence_dir_flag <integer>
fence_line <string>
id
<integer>
id_on_rec_serv <integer>
er
min_duration <integer>
min_obj_size <double>
min_obj_size_ <integer> option
name
<string>
owner_ds_id <integer>
people_display <integer>
Description Paired camea name The deleted status of this task The enabled status of this task The id of this task The name of this task The event count of this task today the status of this task to be deleted or not the bitmap of status of detected object for detecting specific object. 1 - detect people 2 - detect vehicle the vertexes of detected region of detection task, concatenated by "," the number of detected region the status of this task to start processing the status of the shortest limitation of object staying in the detected region. the status to record the video of detected result the status to enable the schedule of this task
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
the status to integrate motion detected event 1 and onward
with surveillance station
the status of detection direction of virtual 1 and onward
fence task.
1 - detect one direction of the fence
2 - the other direction of the fence
3 - the both 2 directions of the fence
the vertexes of virtual fence of intrusion
1 and onward
detection task, concatenated by ","
the id of this DVA task
1 and onward
the id of this DVA task on recording server. it is 1 and onward
only work on cms host.
the seconds of the shortest limitation of
1 and onward
object staying in the detected region.
the minimum limitation of object size of
1 and onward
detection.
the status to limit the object size of detection. 1 and onward
0 - disable limitation
1 - enable limitation
the name of this DVA task
1 and onward
The DS id of which DS the recording belongs 1 and onward
0: Local Host
> 0: The id of recording server
The bitmap of the display info.
1 and onward
Copyright � Synology Inc. All rights Reserved.
482
Synology Surveillance Station Web API _info
people_display <integer> _pos
people_enable <boolean> _stay_max people_enter <integer> people_exit <integer> people_hint_p <string> os people_mode <integer>
det_region <string> people_stay_m <integer> ax post_rec_time <integer> pre_rec_time <integer> region_type <integer> reset_cnt_freq <integer> uency
1 - DISPLAY_ANNOTATION 2 - DISPLAY_HINT_WHEN_PASS 4 - DISPLAY_REGION 8 - DISPLAY_BORDER 16 - DISPLAY_LINE 32 - DISPLAY_PEOPLE_COUNT_LIVE 64 - DISPLAY_PEOPLE_COUNT_REC 128 - DISPLAY_PEOPLE_STAY 324 DISPLAY_PEOPLE_GROUP_COUNT 512 - DISPLAY_PEOPLE_GROUP_STAY
the status of position of people counting displayed result on task preview. 0 - top right 1 - bottom right 2 - top left 3 - bottom left
the status of to limit the stay count or not
1 and onward 1 and onward
the array index of people entering it could be changed with people_exit to swap counting result.
the array index of people exiting it could be changed with people_enter to swap counting result.
the vertexes of people direction of people counting task, concatenated by ","
the status of counting mode for people counting task 0 - counting for both enter and leave
people 1 - counting for only enter people 2 - counting for only leave people
the vertexes of detected region of detection task, concatenated by ","
the limit number of people stayed. Only work when people_enable_stay_max is true.
the seconds to clip the record after detection
the seconds to clip the record before detection
the status of region type 0 - Include region 1 - Exclude region
the type of reset people count frequency. 1 - reset people count by days 2 - reset people count by weeks 3 - reset people count by months 4 - reset people count by years
1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
reset_weekday <integer> reset_date <integer>
the weekday to reset count the date of the month to reset count
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
483
Synology Surveillance Station Web API
reset_time_mi <integer>
nute
reset_time_ho <integer>
ur
schedule
<string>
scheduleOn <boolean>
status_flags <integer>
stream_profile <integer> sync_to_host <boolean> trans_flags <integer>
trigger_alert <boolean>
the minutes of the hour in the day to reset count
the hours of the day to reset count
1 and onward 1 and onward
the bitmap of hours in a week to process task. 1 and onward
the status to enable the schedule of this task 1 and onward
the bitmap of task status.
1 and onward
0 - DEV_STATUS_FLAG_NONE
1 - DEV_STATUS_FLAG_UNRECOGNIZED
2 - DEV_STATUS_FLAG_DISABLING
4 -DEV_STATUS_FLAG_ENABLING
8 -DEV_STATUS_FLAG_RESTARTING
16 -DEV_STATUS_FLAG_DELETING
32 -DEV_STATUS_FLAG_CONFIGURING
64
-DEV_STATUS_FLAG_HW_RESTARTING
128 -DEV_STATUS_FLAG_UNSTABLE
the status of camera stream level
1 and onward
0 - level high
1 - level medium
2 - level low
the status of this task to sync people counting 1 and onward
result to cms host
the bitmap of transient status of this task
1 and onward
0 -DVA_TRANS_FLAG_NORMAL
1 -DVA_TRANS_FLAG_CAM_FPS
2 - DVA_TRANS_FLAG_FETCH_FPS
4 -DVA_TRANS_FLAG_SIMULATING
the status of this task to trigger alert event 1 and onward
Example: {
"data": { "ivaResult": [ { "frameId": -467, "instances": [], "is_trigger": false, "timestamp": 1622430052006, "version": 2 }, {
Copyright � Synology Inc. All rights Reserved.
484
Synology Surveillance Station Web API
"frameId": 5366,
"instances": [
{
"bbox": {
"bottom_right": {
"x": 0.4741650223731995,
"y": 0.8076961636543274
},
"top_left": {
"x": 0.4291196763515472,
"y": 0.5039811134338379
}
},
"class_id": "PEOPLE",
"is_trigger": true,
"tracking_id": 1248
}
],
"is_trigger": true,
"timestamp": 1622430057839,
"version": 2
},
... # lots of frame results here
],
"setting": {
"analyze_type": 2,
"area_grid": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Copyright � Synology Inc. All rights Reserved.
485
Synology Surveillance Station Web API
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111",
"area_line": "0.25,0.5,0.5,0.5,0.75,0.5", "area_region": "0.25,0.3333,0.25,0.6666,0.5,0.8333,0.75,0.6666,0.75,0.3333,0.5,0.1666", "camera_id": 2, "day_night_filter_mode": 0, "day_night_filter_time": 10, "deleted": false, "det_fg_obj": 3, "det_region": "0.1,0.1,0.1,0.9,0.9,0.9,0.9,0.1;0.2,0.2,0.2,0.8,0.8,0.8,0.8,0.2;0.3,0.3,0.3,0.7,0.7,0.7,0.7,0.3", "det_region_cnt": 1, "disable_detection": false, "enable": true, "enable_min_duration": false, "enable_recording": true, "enable_schedule": true, "enable_tampering": true, "enable_tampering_2": true, "enter_night_hour": 18, "enter_night_min": 0, "event_integration": true,
Copyright � Synology Inc. All rights Reserved.
486
Synology Surveillance Station Web API "fence_dir_flag": 3, "fence_line": "0.3,0.6,0.5,0.5,0.7,0.6", "id": 1, "id_on_rec_server": 0, "ignore_bg_event": 0, "ignore_bg_event_2": 0, "ignore_bg_obj": 0, "ignore_bg_obj_2": 0, "leave_night_hour": 6, "leave_night_min": 0, "min_duration": 10, "min_obj_size": 0.2000000029802322, "min_obj_size_2": 0.2000000029802322, "min_obj_size_option": 1, "min_obj_size_option_2": 1, "name": "sw0", "owner_app": 0, "owner_ds_id": 0, "people_cnt": 0, "people_display_info": 13, "people_display_pos": 0, "people_enable_stay_max": false, "people_enter": 0, "people_exit": 2, "people_hint_pos": "0.3442,0.3652,0.5788,0.57", "people_mode": 0, "people_region": "0.45,0.3,0.45,0.7,0.55,0.7,0.55,0.3", "people_size": 0, "people_stay_max": 100,
Copyright � Synology Inc. All rights Reserved.
487
Synology Surveillance Station Web API "post_rec_time": 5, "pre_rec_time": 5, "region_type": 0, "reset_cnt_frequency": 1, "reset_date": 1, "reset_time_hour": 0, "reset_time_minute": 0, "reset_weekday": 0, "schedule":
"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111",
"sensitivity": 1, "sensitivity_2": 1, "sensitivity_custom_value": 5, "sensitivity_custom_value_2": 5, "smart_tag_categ": 3, "status_flags": 0, "stream_profile": 1, "sync_to_host": false, "trans_flags": 0, "trigger_alert": 0 }, "startId": 0 }, "success": true }
Copyright � Synology Inc. All rights Reserved.
488
Synology Surveillance Station Web API
2.3.55.4 Lock
Lock the recording file of detection results Request
Key dsId
Value <integer>
idList
<string>
Description
The DS id of which DS the recording belongs 0: Local Host > 0: The id of recording server Task ids, concatenated by ",".
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? dsId="0"&idList="3,2,1"&api=SYNO.SurveillanceStation.IVA.Recording&method=Lock&version=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
2.3.55.5 Unlock
Unlock the recording file of detection results Request
Key dsId
Value <integer>
idList
<string>
Description
The DS id of which DS the recording belongs 0: Local Host > 0: The id of recording server Task ids, concatenated by ",".
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? dsId="0"&idList="3,2,1"&api=SYNO.SurveillanceStation.IVA.Recording&method=Unlock&version=1
Response
Copyright � Synology Inc. All rights Reserved.
489
Synology Surveillance Station Web API
Key success
Value <boolean>
Example: {
success: true }
Description Execution success or not
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
490
Synology Surveillance Station Web API
2.3.56 SYNO.SurveillanceStation.IVA.TaskGroup
This API provides methods to query people counting result.
Name SYNO.SurveillanceStation.IVA.Report
Version 1
Method Name List
Create Edit
Delete Enable Disable GetPeopleCount ResetPeopleCount
Section 2.3.56.1 2.3.56.2 2.3.56.3 2.3.56.4 2.3.56.5 2.3.56.6 2.3.56.7 2.3.56.8
Availability Surveillance Station 8.2.6
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.56.1 List
Get the information of the people counting task groups
Request No parameter is required.
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.IVA.TaskGroup&method=List&version=1
Response
Key data success
Value <Group List Object> <boolean>
Description Information of group list Execution success or not
Availability 1 and onward 1 and onward
<Group List Object> Definitions:
Key groups total
Value Array of <Group> <integer>
Description List of task group info count of task groups
Availability 1 and onward 1 and onward
<Group> Definitions:
Key enable id name owner_ds_id
Value <boolean> <integer> <string> <integer>
Description
The enabled status of this task group The id of this task group
The name of this task group The DS id of which DS the recording belongs 0: Local Host
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
491
Synology Surveillance Station Web API people_display <integer> _info
people_enable <boolean> _stay_max people_stay_m <integer> ax reset_cnt_freq <integer> uency
> 0: The id of recording server The bitmap of the display info. 1 - DISPLAY_ANNOTATION 2 - DISPLAY_HINT_WHEN_PASS 4 - DISPLAY_REGION 8 - DISPLAY_BORDER 16 - DISPLAY_LINE 32 - DISPLAY_PEOPLE_COUNT_LIVE 64 - DISPLAY_PEOPLE_COUNT_REC 128 - DISPLAY_PEOPLE_STAY 324 DISPLAY_PEOPLE_GROUP_COUNT 512 - DISPLAY_PEOPLE_GROUP_STAY the status of to limit the stay count or not
the limit number of people stayed. Only work when people_enable_stay_max is true. the type of reset people count frequency. 1 - reset people count by days 2 - reset people count by weeks 3 - reset people count by months 4 - reset people count by years
1 and onward
1 and onward 1 and onward 1 and onward
reset_date <integer>
reset_time_ho <integer>
ur
reset_time_mi <integer>
nute
reset_weekday <integer>
task_ids
<string>
uniqueId
<string>
the date of the month to reset count the hours of the day to reset count
1 and onward 1 and onward
the minutes of the hour in the day to reset 1 and onward
count
the weekday to reset count
1 and onward
Task ids of this group, concatenated by ",". 1 and onward
the unique id in cms, the dsId and the group id 1 and onward
concatenated by "_".
Example: {
data: {
groups: [{
enable: true id: 1 name: "ppl01" owner_ds_id: 0 people_display_info: 768 people_enable_stay_max: false
Copyright � Synology Inc. All rights Reserved.
492
Synology Surveillance Station Web API
people_stay_max: 100 reset_cnt_frequency: 1 reset_date: 1 reset_time_hour: 0 reset_time_minute: 0 reset_weekday: 0 task_ids: "2,3" uniqueId: "0_1" }] total: 1 } success: true }
2.3.56.2 Create
create a people counting task group Request
Key enable task_ids owner_ds_id
Value <boolean> <string> <integer>
name
<string>
people_display <integer>
_info
people_enable <boolean> _stay_max
people_stay_m <integer> ax
Description
The enabled status of this task group. Task ids of this group, concatenated by ",".
The DS id of which DS the recording belongs 0: Local Host > 0: The id of recording server The name of this task group
The bitmap of the display info. 1 - DISPLAY_ANNOTATION 2 - DISPLAY_HINT_WHEN_PASS 4 - DISPLAY_REGION 8 - DISPLAY_BORDER 16 - DISPLAY_LINE 32 - DISPLAY_PEOPLE_COUNT_LIVE 64 - DISPLAY_PEOPLE_COUNT_REC 128 - DISPLAY_PEOPLE_STAY 324 DISPLAY_PEOPLE_GROUP_COUNT 512 - DISPLAY_PEOPLE_GROUP_STAY the status of to limit the stay count or not
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
the limit number of people stayed.
1 and onward
Only work when people_enable_stay_max is
true.
Copyright � Synology Inc. All rights Reserved.
493
Synology Surveillance Station Web API reset_cnt_freq <integer> uency
reset_date <integer> reset_weekday <integer> reset_time_ho <integer> ur reset_time_mi <integer> nute
the type of reset people count frequency. 1 - reset people count by days 2 - reset people count by weeks 3 - reset people count by months 4 - reset people count by years the date of the month to reset count the weekday to reset count the hours of the day to reset count
the minutes of the hour in the day to reset count
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? name="123"&owner_ds_id="0"&task_ids="2,3"&people_display_info=768&reset_cnt_frequency="1"&rese t_weekday="0"&reset_date="1"&reset_time_hour="0"&reset_time_minute="0"&people_enable_stay_max= false&people_stay_max="100"&enable=true&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Cr eate&version=1alse&people_stay_max="100"&id=2&enable=true&api=SYNO.SurveillanceStation.IVA.Tas kGroup&method=Edit&version=1
Response
Key data success
Value <Group Id Object> <boolean>
Description Information of group id Execution success or not
Availability 1 and onward 1 and onward
<Group Id Object> Definitions:
Key id
Value <integer>
Description The id of this group
Availability 1 and onward
Example: {
"data" : { "id" : 2
}, "success" : true }
2.3.56.3 Edit
Modify the setting of a people counting task group Request
Copyright � Synology Inc. All rights Reserved.
494
Synology Surveillance Station Web API
Key
Value
enable
<boolean>
id
<integer>
task_ids
<string>
name
<string>
people_display <integer>
_info
people_enable <boolean> _stay_max people_stay_m <integer> ax
reset_cnt_freq <integer> uency
reset_date <integer> reset_weekday <integer> reset_time_ho <integer> ur reset_time_mi <integer> nute
Description
The enabled status of this task group. The id of this task group
Task ids of this group, concatenated by ",".
The name of this task group
The bitmap of the display info. 1 - DISPLAY_ANNOTATION 2 - DISPLAY_HINT_WHEN_PASS 4 - DISPLAY_REGION 8 - DISPLAY_BORDER 16 - DISPLAY_LINE 32 - DISPLAY_PEOPLE_COUNT_LIVE 64 - DISPLAY_PEOPLE_COUNT_REC 128 - DISPLAY_PEOPLE_STAY 324 - DISPLAY_PEOPLE_GROUP_COUNT 512 - DISPLAY_PEOPLE_GROUP_STAY the status of to limit the stay count or not
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
the limit number of people stayed. Only work when people_enable_stay_max is true.
the type of reset people count frequency. 1 - reset people count by days 2 - reset people count by weeks 3 - reset people count by months 4 - reset people count by years
1 and onward 1 and onward
the date of the month to reset count the weekday to reset count the hours of the day to reset count
1 and onward 1 and onward 1 and onward
the minutes of the hour in the day to reset count
1 and onward
Example:
GET /webapi/entry.cgi? name="ppl1"&task_ids="8,9"&people_display_info=768&reset_cnt_frequency="2"&reset_weekday="0"&r eset_date="1"&reset_time_hour="0"&reset_time_minute="0"&people_enable_stay_max=false&people_st ay_max="100"&id=2&enable=true&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Edit&version=1
Response
Key data success
Value <Group Id Object> <boolean>
Description Information of group id Execution success or not
Availability 1 and onward 1 and onward
<Group Id Object> Definitions:
Copyright � Synology Inc. All rights Reserved.
495
Synology Surveillance Station Web API
Key id
Value <integer>
Description The id of this group
Example: {
"data" : { "id" : 2
}, "success" : true }
Availability 1 and onward
2.3.56.4 Delete
Delete the task groups Request
Key ids
Value <string>
Description ids of the task groups to be deleted,, concatenated by ",".
Availability 1 and onward
Example: GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Delete&version=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
2.3.56.5 Enable
Start to count the people for the people counting task in groups Request
Copyright � Synology Inc. All rights Reserved.
496
Synology Surveillance Station Web API
Key ids
Value <string>
Description ids of the task groups to be enabled,, concatenated by ",".
Availability 1 and onward
Example: GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Enable&version=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
2.3.56.6 Disable
Stop to count the people for the people counting task in groups Request
Key ids
Value <string>
Description
ids of the task groups to be enabled,, concatenated by ",".
Availability 1 and onward
Example: GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Disable&version=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
Copyright � Synology Inc. All rights Reserved.
497
Synology Surveillance Station Web API
2.3.56.7 GetPeopleCount
Get the counting number of the task group Request
Key id
Value <integer>
Description id of the task group to get people counting number
Availability 1 and onward
Example:
GET /webapi/entry.cgi? id=2&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=GetPeopleCount&version=1
Response
Key data success
Value <People Count Info> <boolean>
Description Information of people counting info Execution success or not
Availability 1 and onward 1 and onward
<People Count Info> Definitions:
Key InCount OutCount
Value <integer> <integer>
Description The counting number of people in The counting number of people out
Availability 1 and onward 1 and onward
Example: {
"data" : { "InCount" : 1459, "OutCount" : 2632
}, "success" : true }
2.3.56.8 ResetPeopleCount
Lock the recording file of detection results Request
Copyright � Synology Inc. All rights Reserved.
498
Synology Surveillance Station Web API
Key id
Value <integer>
Description id of the task group to reset people counting number
Availability 1 and onward
Example:
GET /webapi/entry.cgi? id=2&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=ResetPeopleCount&version=1
Response
Key success
Value <boolean>
Description Execution success or not
Availability 1 and onward
Example: {
success: true }
Copyright � Synology Inc. All rights Reserved.
499
Synology Surveillance Station Web API
2.3.57 SYNO.SurveillanceStation.Face
This API provides methods to get information of face task list and settings.
Name SYNO.SurveillanceStation.Face
Version 1
Availability Surveillance Station 8.2.8
Method Name ListTask SaveTask
DeleteTask EnableTask DisableTask ListPlayableTsk CreateFaceGroup DeleteFaceGroup EditFaceGroup ListFaceGroup CountFaceGroup DetectImageFace CreateRegisteredFace DeleteRegisteredFace EditRegisteredFace ListRegisteredFace CountRegisteredFace SearchRegisteredFace
Section 2.3.57.1 2.3.57.2 2.3.57.3 2.3.57.4 2.3.57.5 2.3.57.6 2.3.57.7 2.3.57.8 2.3.57.9 2.3.57.10 2.3.57.11 2.3.57.12 2.3.57.13 2.3.57.14 2.3.57.15 2.3.57.16 2.3.57.17 2.3.57.18
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.57.1 ListTask
Get face task list. Request
Key ids
Value <string>
ownerDsId <integer>
blOnlyEnableD <boolean> s
Description
Availability
the string of comma-separated ids of tasks to 1 and onward
list.
Indicate owner DS of tasks to list, 0 means the 1 and onward
tasks belongs to LOCAL_HOST
Indicate if only list enabled tasks
1 and onward
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Face"&version="1"&method="ListTask"
Response
Copyright � Synology Inc. All rights Reserved.
500
Synology Surveillance Station Web API
Key data success
Value <Task List Object> <boolean>
Description Information of task list Execution success or not
Availability 1 and onward 1 and onward
<Task List Object> Definitions:
Key task total
Value Array of <Task> <integer>
Description List of task info The total number of tasks
Availability 1 and onward 1 and onward
<Task> Definitions:
Key
Value
allowed_color <integer> allowed_count <integer> allowed_list Array of <integer>
allowed_name Array of <string> _list
blocked_color <integer>
blocked_count <integer> blocked_list Array of <integer>
blocked_name Array of <string> _list
vip_color
<integer>
vip_count vip_list
<integer> Array of <integer>
vip_name_list Array of <string>
recognized_col <integer> or
recognized_co <integer> unt
unrecognized_ <integer> color unrecognized_ <integer> count camera_id <integer>
deleted
<boolean>
det_region <string>
det_region_cnt <integer> region_type <integer>
display_info <integer>
frame_display_ <integer>
info
enable
<boolean>
enable_min_o <boolean>
bj_size
min_obj_size <float>
Description display color id for face in allowed list the counter for allowed faces the list of ids of allowed groups the list of names of allowed groups
Availability 1 and onward 1 and onward 1 and onward 1 and onward
display color id for face in blocked list the counter for the blocked faces the list of ids of blocked groups the list of names of blocked groups
1 and onward 1 and onward 1 and onward 1 and onward
display color id for face in vip list the counter for vip faces the list of ids of vip groups the list of names of vip groups display color id for recognized faces
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
the counter for recognized faces
1 and onward
display color id for unrecognized face
1 and onward
the counter for unrecognized faces
1 and onward
Paired camera id. The deleted status of this task.
the comma-separated floating number to show the coordinate of detected region on frame. the counter for the detected region.
the type of display region. (detectable or undetectable)
The status of display information setting of liveview.
The status of display information setting of each face in frame
The enabled status of this task. The status of setting to enable limitation for minimum object size. The limitation for the minimum face size. (%)
1 and onward 1 and onward 1 and onward
1 and onward
1 and onward
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
501
Synology Surveillance Station Web API post_rec_time <integer>
pre_rec_time <integer>
schedule
<string>
scheduleOn <boolean>
similarity
<float>
stream_profile <integer>
transientSts <integer>
trans_flags <integer>
trigger_alert <integer>
id
<integer>
owner_ds_id <integer>
task_id
<integer>
id_on_rec_serv <integer>
er
name
<string>
ignore_bad_qu <boolean>
ality
todayEvtCnt <integer>
The append second of the record after the 1 and onward
time when captured face are displayed.
The append second of the record before the 1 and onward
time when captured face are displayed.
the string of bits to decide whether to detect 1 and onward
or not for the days in a week.
the status of whether the task is following the 1 and onward
schedule or not.
the threshold of recognition similarity.
1 and onward
the type of stream quality
1 and onward
the quality type of stream frame rate
1 and onward
the bitmap of transient status
1 and onward
the bitmap of alert status
1 and onward
The id of this task.
1 and onward
The ds id of the owner of the task. For
1 and onward
instance, 0 means this task belongs to
LOCAL_HOST
The id of this task.
1 and onward
The task id of the counterpart of this task on 1 and onward
recording server
The name of this task.
1 and onward
True if this task won't send alerts on detected 1 and onward
faces with low quality(e.g., blurred).
The event count of this task today.
1 and onward
Example: {
"data" : { "task" : [ { "allowed_color" : 3, "allowed_count" : 0, "allowed_list" : [ 1 ], "allowed_name_list" : [ "test_group" ], "blocked_color" : 4, "blocked_count" : 0, "blocked_list" : [], "blocked_name_list" : [], "camera_id" : 1, "deleted" : false, "det_region" :
"0.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0;0.1000,0.9000,0.1000,0.1000,0.9000,0.1000,0.9000,0.9000;0.2000,0.8000,0. 2000,0.2000,0.8000,0.2000,0.8000,0.8000",
Copyright � Synology Inc. All rights Reserved.
502
Synology Surveillance Station Web API
"det_region_cnt" : 1, "display_info" : 2, "enable" : true, "enable_min_obj_size" : false, "enable_schedule" : true, "frame_display_info" : 1, "id" : 1, "id_on_rec_server": 1, "ignore_bad_quality" : true, "min_obj_size" : 0.2000000029802322, "name" : "0", "owner_ds_id": 0, "post_rec_time" : 5, "pre_rec_time" : 5, "recognized_color" : 6, "recognized_count" : 0, "region_type" : 0, "schedule" : "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111", "scheduleOn" : true, "similarity" : 0.800000011920929, "stream_profile" : 1, "task_id" : 1, "transientSts" : 0, "trigger_alert" : 127, "unrecognized_color" : 8, "unrecognized_count" : 0, "vip_color" : 1, "vip_count" : 0, "vip_list" : [], "vip_name_list" : [] } ], "total" : 1
Copyright � Synology Inc. All rights Reserved.
503
Synology Surveillance Station Web API
}, "httpd_restart" : false, "success" : true }
2.3.57.2 SaveTask
Create or edit task. Request
Key
Value
id
<integer>
id_on_rec_serv <integer>
er
camera_id <integer>
camera_id_on <integer>
_rec
owner_ds_id <integer>
enable
<boolean>
blEditMode <boolean>
stream_profile <integer>
name
<string>
similarity
<float>
allowed_color <integer>
allowed_list Array of <integer>
blocked_color <integer>
blocked_list Array of <integer>
vip_color
<integer>
vip_list
Array of <integer>
recognized_col <integer>
or
unrecognized_ <integer>
color
deleted
<boolean>
det_region <string>
det_region_cnt <integer> region_type <integer>
display_info <integer>
frame_display_ <integer> info
Description
The id of the task to edit. The task id of the counterpart of this task on recording server The camera id to paired.
The camera id on recording server to paired.
Availability 1 and onward 1 and onward
1 and onward 1 and onward
Indicate owner DS of this task, 0 means the tasks belongs to LOCAL_HOST The status of whether the task is enabled or not. The status of whether this request is editmode or not the type of stream quality The name of this task. the threshold of recognition similarity. display color id for face in allowed list the list of ids of allowed groups display color id for face in blocked list the list of ids of blocked groups display color id for face in vip list the list of ids of vip groups display color id for recognized faces
1 and onward
1 and onward
1 and onward
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
display color id for unrecognized face
1 and onward
The deleted status of this task.
the comma-separated floating number to show the coordinate of detected region on frame.
the counter for the detected region.
the type of display region. (detectable or undetectable)
The status of display information setting of liveview.
The status of display information setting of each face in frame
1 and onward 1 and onward
1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
504
Synology Surveillance Station Web API
enable_min_o <boolean> bj_size min_obj_size <float> post_rec_time <integer>
pre_rec_time <integer>
schedule
<string>
scheduleOn <boolean>
similarity
<float>
ignore_bad_qu <boolean>
ality
The status of setting to enable limitation for 1 and onward
minimum object size.
The limitation for the minimum face size.
1 and onward
The append second of the record after the 1 and onward
time when captured face are displayed.
The append second of the record before the 1 and onward
time when captured face are displayed.
the string of bits to decide whether to detect 1 and onward
or not for the days in a week.
the status of whether the task is following the 1 and onward
schedule or not.
the threshold of recognition similarity.
1 and onward
the status of whether to ignore bad quality 1 and onward
result or not
Example: POST /webapi/entry.cgi Form Data id: 0 enable: true blEditMode: false stream_profile: 0 camera_id: 1 name: "0" similarity: 0.8 display_info: 0 enable_min_obj_size: false min_obj_size: "0.2" frame_display_info: 1 region_type: "0" det_region_cnt: "1" det_region: "0.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0;0.1000,0.9000,0.1000,0.1000,0.9000,0.1000,0.9000,0.9000;0.2000, 0.8000,0.2000,0.2000,0.8000,0.2000,0.8000,0.8000" recognized_color: 3 unrecognized_color: 8
Copyright � Synology Inc. All rights Reserved.
505
Synology Surveillance Station Web API vip_color: 1 vip_list: "" allowed_color: 2 allowed_list: "" blocked_color: 4 blocked_list: "" ignore_bad_quality: true
Response
Key data success
Value <Task Object> <boolean>
<Task Object> Definitions:
Key
Value
allowed_color <integer>
allowed_count <integer>
allowed_list Array of <integer>
allowed_name Array of <string>
_list
blocked_color <integer>
blocked_count <integer>
blocked_list Array of <integer>
blocked_name Array of <string>
_list
vip_color
<integer>
vip_count
<integer>
vip_list
Array of <integer>
vip_name_list Array of <string>
recognized_col <integer>
or
recognized_co <integer>
unt
unrecognized_ <integer>
color
unrecognized_ <integer>
count
camera_id <integer>
deleted
<boolean>
det_region <string>
det_region_cnt <integer>
Description Information of task info. Execution success or not
Availability 1 and onward 1 and onward
Description display color id for face in allowed list the counter for allowed faces the list of ids of allowed groups the list of names of allowed groups
Availability 1 and onward 1 and onward 1 and onward 1 and onward
display color id for face in blocked list the counter for the blocked faces the list of ids of blocked groups the list of names of blocked groups
1 and onward 1 and onward 1 and onward 1 and onward
display color id for face in vip list the counter for vip faces the list of ids of vip groups the list of names of vip groups display color id for recognized faces
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
the counter for recognized faces
1 and onward
display color id for unrecognized face
1 and onward
the counter for unrecognized faces
1 and onward
Paired camera id.
The deleted status of this task. the comma-separated floating number to show the coordinate of detected region on frame.
the counter for the detected region.
1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
506
Synology Surveillance Station Web API region_type <integer>
display_info <integer>
frame_display_ <integer>
info
enable
<boolean>
enable_min_o <boolean>
bj_size
min_obj_size <float>
post_rec_time <integer>
pre_rec_time <integer>
schedule
<string>
scheduleOn <boolean>
similarity
<float>
stream_profile <integer>
transientSts <integer>
trans_flags <integer>
trigger_alert <integer>
id
<integer>
owner_ds_id <integer>
task_id
<integer>
id_on_rec_serv <integer>
er
name
<string>
ignore_bad_qu <boolean>
ality
todayEvtCnt <integer>
the type of display region. (detectable or
undetectable)
The status of display information setting of 1 and onward
liveview.
The status of display information setting of
each face in frame
The enabled status of this task.
1 and onward
The status of setting to enable limitation for 1 and onward
minimum object size.
The limitation for the minimum face size. (%) 1 and onward
The append second of the record after the 1 and onward
time when captured face are displayed.
The append second of the record before the 1 and onward
time when captured face are displayed.
the string of bits to decide whether to detect 1 and onward
or not for the days in a week.
the status of whether the task is following the 1 and onward
schedule or not.
the threshold of recognition similarity.
1 and onward
the type of stream quality
1 and onward
the quality type of stream frame rate
1 and onward
the bitmap of transient status
1 and onward
the bitmap of alert status
1 and onward
The id of this task.
1 and onward
The ds id of the owner of the task. For
1 and onward
instance, 0 means this task belongs to
LOCAL_HOST
The id of this task.
1 and onward
The task id of the counterpart of this task on 1 and onward
recording server
The name of this task.
1 and onward
True if this task won't send alerts on detected 1 and onward
faces with low quality(e.g., blurred).
The event count of this task today.
1 and onward
Example:
{ "data": { "allowed_color": 2, "allowed_list": "", "blocked_color": 4, "blocked_list": "", "camera_id": 1, "deleted": false, "det_region":
"0.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0;0.1,0.9,0.1,0.1,0.9,0.1,0.9,0.9;0.2,0.8,0.2,0.2,0.8,0.2,0.8,0.8", "det_region_cnt": 1, "display_info": 3, "enable": true, "enable_min_obj_size": false,
Copyright � Synology Inc. All rights Reserved.
507
Synology Surveillance Station Web API
"enable_schedule": true, "frame_display_info": 1, "id": 1, "id_on_rec_server": 1, "ignore_bad_quality": true, "min_obj_size": 0.2, "name": "Face Test CreateTask", "owner_ds_id": 0, "post_rec_time": 5, "pre_rec_time": 5, "recognized_color": 3, "region_type": 0, "schedule": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111", "similarity": 0.8, "stream_profile": 0, "task_id": 1, "trigger_alert": 0, "unrecognized_color": 8, "vip_color": 1, "vip_list": "" }, "success": true }
2.3.57.3 DeleteTask
Delete face task. Request
Key
Value
Description
Availability
ids
<string> the comma-separated id of tasks to be deleted.
1 and onward
keepRecording <boolean> the status of whether record to be kept or not when task deleted 1 and onward
Example:
GET /webapi/entry.cgi? ids="4"&keepRecording=false&api=SYNO.SurveillanceStation.Face&method=DeleteTask&version= 1
Response
Key success
Value
Description
<boolean> Execution success or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
508
Synology Surveillance Station Web API
Example: {"success":true}
2.3.57.4 EnableTask
Enable task to start detection and recording. Request
Key ids
Value
Description
<string> the comma-separated id of tasks to be enabled.
Availability 1 and onward
Example: GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.Face&method=EnableTask&version=1
Response
Key success
Value
Description
<boolean> Execution success or not.
Example: {"success":true}
Availability 1 and onward
2.3.57.5 DisableTask
Disable task to stop detection and stop recording. Request
Key ids
Value
Description
<string> the comma-separated id of tasks to be disabled.
Example:
GET /webapi/entry.cgi? ids="2"&api=SYNO.SurveillanceStation.Face&method=DisableTask&version=1
Availability 1 and onward
Response
Key success
Value
Description
<boolean> Execution success or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
509
Synology Surveillance Station Web API
Example: {"success":true}
2.3.57.6 ListPlayableTask
List tasks that the user has the privilege to watch record, but don't have the privilege to watch liveview. Request
Key ids
Value
Description
<string> the comma-separated id of tasks to be listed.
Availability 1 and onward
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Face&method=ListPlayableTask &version=1
Response
Key data success
Value
Description
<Task List Object> Information of task list.
<boolean>
Execution success or not.
Availability 1 and onward 1 and onward
<Task List Object> Definitions:
Key
Value
task
Array of <Task>
total
<integer>
Description List of task info. (Only id and name info.) The total number of listed tasks.
Availability 1 and onward 1 and onward
Example: {
"data": { "task":[ {"id":2,"name":"1"}, {"id":5,"name":"0"} ], "total":2 }
Copyright � Synology Inc. All rights Reserved.
510
Synology Surveillance Station Web API ,"success":true
}
2.3.57.7 CreateFaceGroup
Create face group. Request
Key
Value
name
<string>
description <string>
update_registe <Face List Object>
red_face
Description Name of the face group. Description of the face group. Information of face lists in the face group.
Availability 1 and onward 1 and onward 1 and onward
<Face List Object> Definitions:
Key ids
Value Array of <integer>
Ids of faces.
Description
Availability 1 and onward
Example:
GET /webapi/entry.cgi?name="name"&description="des"&update_registered_face={"ids": []}&api=SYNO.SurveillanceStation.Face&method=CreateFaceGroup&version=1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key error_code success face_group
Value <integer>
<boolean> <Face Group Object>
Description Error code of the execution. Execution success or not. Information of face groups.
Availability 1 and onward 1 and onward 1 and onward
<Face Group Object> Definitions:
Key
Value
checked
<boolean>
description <string>
id
<integer>
name
<string>
registered_face <integer>
Description The group is checked on the UI or not. Description of the face group. Id of the face group. Name of the face group. Number of registered face in the face group.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
511
Synology Surveillance Station Web API _count registered_face Array of <integer> Face ids of registered face in the face group. _ids
Example: {
"data": { "error_code": 0, "face_group": { "checked": false, "description": "des", "id": 100, "name": "name", "registered_face_count": 0, "registered_face_ids": [] }, "success": true
}, "success": true }
1 and onward
2.3.57.8 DeleteFaceGroup
Delete face group. Request
Key ids
Value
Description
Array of <integer> Face group ids to delete.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? ids=[101]&api=SYNO.SurveillanceStation.Face&method=DeleteFaceGroup&version=1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Copyright � Synology Inc. All rights Reserved.
Availability 1 and onward 1 and onward
512
Synology Surveillance Station Web API
<Result Object> Definitions:
Key
Value
error_code <integer>
success ids
<boolean> Array of <integer>
face_group
<Face Group Object>
Description Error code of the execution. Execution success or not. Face group ids to delete.
Information of face groups.
<Face Group Object> Definitions:
Key
Value
checked
<boolean>
description <string>
id
<integer>
name
<string>
registered_face <integer>
_count
registered_face Array of <integer>
_ids
Description The group is checked on the UI or not. Description of the face group. Id of the face group. Name of the face group. Number of registered face in the face group.
Face ids of registered face in the face group.
Example: {
"data": { "error_code": 0, "face_groups": [ { "checked": false, "description": "des", "id": 101, "name": "name", "registered_face_count": 1, "registered_face_ids": [ 154 ] } ], "ids": [ 101
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
513
Synology Surveillance Station Web API
], "success": true }, "success": true }
2.3.57.9 EditFaceGroup
Edit the face group. Request
Key
Value
name
<string>
description <string>
update_registe <Face List Object>
red_face
id
<integer>
Description Name of the face group. Description of the face group. Information of face lists in the face group.
Id of the face group to edit.
Availability 1 and onward 1 and onward 1 and onward
1 and onward
<Face List Object> Definitions:
Key ids
Value Array of <integer>
Ids of faces.
Description
Availability 1 and onward
Example: GET /webapi/entry.cgi?name="name"&description="des"&update_registered_face={"ids": [154]}&id=100&api=SYNO.SurveillanceStation.Face&method=EditFaceGroup&version=1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key error_code success face_group
Value <integer> <boolean> <Face Group Object>
Description Error code of the execution. Execution success or not. Information of face groups.
Availability 1 and onward 1 and onward 1 and onward
<Face Group Object> Definitions:
Key
Value
Description Copyright � Synology Inc. All rights Reserved.
Availability 514
Synology Surveillance Station Web API
checked
<boolean>
description <string>
id
<integer>
name
<string>
registered_face <integer>
_count
registered_face Array of <integer>
_ids
The group is checked on the UI or not. Description of the face group. Id of the face group. Name of the face group. Number of registered face in the face group.
Face ids of registered face in the face group.
Example: {
"data": { "error_code": 0, "face_group": { "checked": false, "description": "des", "id": 100, "name": "name", "registered_face_count": 1, "registered_face_ids": [ 154 ] }, "success": true
}, "success": true }
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
2.3.57.10 ListFaceGroup
Get face group list. Request
Key id_only filter
Value <boolean> <Filter Object>
Description Results only contain id or not. Information of filter .
Availability 1 and onward 1 and onward
<Filter Object> Definitions:
Key
Value
offset
<integer>
Description Start offset of the query result.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
515
Synology Surveillance Station Web API
limit ids name description checked_ids keyword
order_by
<integer> Array of <integer> <string> <string> Array of <integer> <string>
<Order Object>
Limit of the number of the result. List the face groups matching the ids. List the face groups having substring in the name. List the face groups having substring in the description. Checked face group ids on UI. Keyword in the name or description. Using " " separate multiple string pattern. Information of the order.
1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
<Order Object> Definitions:
Key column order
Value <string> <string>
Description One of ID, NAME, REGISTERED_FACE_COUNT One of ASC, DESC
Availability 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi?filter={"limit"=50,"order_by": {"column":"ID","order":"ASC"}}&api=SYNO.SurveillanceStation.Face&method=ListFaceGroup&vers ion=1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
<Result Object> Definitions:
Key
Value
error_code success face_groups
ids
<integer>
<boolean> Array of <Face Group Object> Array of <integer>
total
<integer>
Description Error code of the execution. Execution success or not. Information of face groups.
Groups ids. Number of face groups.
<Face Group Object> Definitions:
Key
Value
checked description id
<boolean> <string> <integer>
name
<string>
registered_face <integer>
_count
registered_face Array of <integer> _ids
Description The group is checked on the UI or not. Description of the face group. Id of the face group. Name of the face group. Number of registered face in the face group.
Face ids of registered face in the face group.
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
516
Synology Surveillance Station Web API
Example: {
"data": { "error_code": 0, "face_groups": [ { "checked": false, "description": "des", "id": 142, "name": "name", "registered_face_count": 0, "registered_face_ids": [] } ], "ids": [ 142 ], "success": true, "total": 1
}, "success": true }
2.3.57.11 CountFaceGroup
Count number of face groups. Request
Key filter
Value <Filter Object>
Description Information of filter .
Availability 1 and onward
<Filter Object> Definitions:
Key offset limit ids name description
Value <integer> <integer> Array of <integer> <string> <string>
Description Start offset of the query result. Limit of the number of the result. List the face groups matching the ids. List the face groups having substring in the name. List the face groups having substring in the description.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
517
Synology Surveillance Station Web API
checked_ids keyword
order_by
Array of <integer> <string>
<Order Object>
Checked face group ids on UI. Keyword in the name or description. Using " " separate multiple string pattern. Information of the order.
1 and onward 1 and onward
1 and onward
<Order Object> Definitions:
Key
Value
column order
<string> <string>
Description One of ID, NAME, REGISTERED_FACE_COUNT One of ASC, DESC
Availability 1 and onward 1 and onward
Example: GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Face"&method=CountFaceGroup &version="1"
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
<Result Object> Definitions:
Key error_code success count
Value <integer> <boolean> <integer>
Example: {
"data": { "count": 3, "error_code": 0, "success": true
}, "success": true }
Description Error code of the execution. Execution success or not. Number of face groups.
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
2.3.57.12 DetectImageFace
Detect faces in a image. Request
Copyright � Synology Inc. All rights Reserved.
518
Synology Surveillance Station Web API
Key image_data image_size
Value <string> <integer>
Description Base64 encode of registered face image. Size of image_data (before encoded).
Availability 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api=SYNO.SurveillanceStation.Face&method=DetectImageFace&version=1&&image_size=84776&image_da ta="..."(base64 encode of image)
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key error_code success faces
Value
Description
<integer>
Error code of the execution.
<boolean>
Execution success or not.
Array of <Face Object> Detected faces
<Face Object> Definitions:
Key detection feature bad_quality
Value <Detection Object> Array of <double> <boolean>
Description Detection of face. Feature of target face. Indicate if the face is bad quality.
<Detection Object> Definitions:
Key conf bbox landmark
Value <float> <BoundingBox> <Landmark>
Description Confidence of the detection. Bounding box of detected face Landmark of face.
Availability 1 and onward 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
<BoundingBox> Definitions:
Key bottom_right top_left
Value <Point> <Point>
Description Bottom right coordinate of detection Top left coordinate of detection
Availability 1 and onward 1 and onward
<Landmark> Definitions:
Key
Value
left_eye right_eye
<Point> <Point>
Description Coordination of left eye Coordination of right eye
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
519
Synology Surveillance Station Web API
nose mouth_left mouth_right
<Point> <Point> <Point>
Coordination of nose Coordination of mouth left point Coordination of mouth right point
1 and onward 1 and onward 1 and onward
<Point> Definitions:
Key x y
Value <float> <float>
Description x coordinate of point y coordinate of point
Example: {
"data": { "error_code": 0, "faces": [ { "bad_quality": false, "detection": { "bbox": { "bottom_right": { "x": 0.7558333277702332, "y": 0.8221428394317627 }, "top_left": { "x": 0.2074999958276749, "y": 0.1942857205867767 } }, "conf": 0.9909785985946655, "landmark": { "left_eye": { "x": 0.3224999904632568, "y": 0.4642857015132904 }, "mouth_left": { "x": 0.2649999856948853, "y": 0.6578571200370789 },
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
520
Synology Surveillance Station Web API
"mouth_right": { "x": 0.3991666734218597, "y": 0.7057142853736877
}, "nose": {
"x": 0.3158333301544189, "y": 0.5742856860160828 }, "right_eye": { "x": 0.5008333325386047, "y": 0.522857129573822 } } }, "feature": [ 0.03171852603554726, -0.327616810798645, -0.09268184006214142, -0.01303871534764767, 0.05430549383163452, -0.1040792390704155, -0.04600917920470238, -0.04881620034575462, 0.1122017204761505, 0.01901257410645485, -0.07227008044719696, -0.006643524393439293, 0.03866777196526527, -0.06888914108276367, 0.03924157842993736, 0.02998779900372028, 0.03805521503090858, 0.0199570432305336, -0.1169411092996597, -0.02250787802040577,
Copyright � Synology Inc. All rights Reserved.
521
Synology Surveillance Station Web API
-0.167428269982338, -0.02108175866305828, 0.0717247724533081, 0.06246195733547211, 0.08616770803928375, -0.1195886507630348, -0.04478453099727631, 0.01743170246481895, 0.1663680523633957, -0.1126247569918633, 0.07804444432258606, -0.02626571618020535, -0.004548948723822832, -0.05173249915242195, 0.08363643288612366, 0.1642337143421173, 0.0941116064786911, 0.1006007939577103, -0.03028238005936146, -0.03303150087594986, 0.1619229465723038, -0.05161372199654579, 0.02699304558336735, 0.05814265087246895, 0.01483084727078676, -0.02029252052307129, 0.08939621597528458, 0.006152923684567213, -0.1562657803297043, 0.0109412269666791, -0.03838983178138733, -0.09654632210731507, -0.1075751706957817, 0.08595514297485352, -0.04163002967834473,
Copyright � Synology Inc. All rights Reserved.
522
Synology Surveillance Station Web API
-0.09085164219141007, -0.09127409756183624, 0.07326977699995041, -0.08103315532207489, 0.01263571437448263, 0.02780077420175076, -0.04454609751701355, -0.02172120660543442, 0.06325339525938034, 0.01089720334857702, 0.1021099984645844, -0.1290125846862793, -0.1030500829219818, 0.006443798076361418, -0.05863768979907036, -0.04037598147988319, -0.1138944551348686, 0.07211446762084961, 0.0720137357711792, -0.1210512146353722, 0.08755607903003693, 0.03454670310020447, 0.0476050078868866, 0.1099587604403496, -0.1602591276168823, 0.08855044096708298, 0.02996033430099487, 0.09074512869119644, -0.0001058613997884095, -0.2476167976856232, 0.04445100575685501, -0.02698605507612228, 0.01402009278535843, -0.06718133389949799, 0.06438887119293213,
Copyright � Synology Inc. All rights Reserved.
523
Synology Surveillance Station Web API
-0.1055569276213646, 0.2450158149003983, 0.07835261523723602, 0.02025209739804268, -0.1351291239261627, 0.1085093468427658, -0.02905211597681046, 0.03635768592357635, -0.09950078278779984, 0.01295050885528326, 0.05994055792689323, -0.07632963359355927, 0.05110764876008034, -0.02028992958366871, -0.09950169920921326, -0.05603926628828049, 0.05858263373374939, -0.1539228409528732, 0.01994415745139122, 0.01639402285218239, 0.01716926135122776, -0.03836705163121223, 0.07797840982675553, 0.02707977592945099, 0.1473931074142456, 0.0662926509976387, 0.01988782174885273, 0.02884645573794842, 0.07923990488052368, 0.1627190560102463, -0.1022889837622643, 0.130669042468071, 0.08311982452869415, -0.1120589897036552, 0.06340517848730087,
Copyright � Synology Inc. All rights Reserved.
524
Synology Surveillance Station Web API
-0.002032102318480611, -0.09534944593906403, -0.001494217664003372 ] } ], "success": true }, "success": true }
2.3.57.13 CreateRegisteredFace
Create registered face. Request
Key
Value
account
<string>
name
<string>
description <string>
image_data <string>
image_size <integer>
face
<Face Object>
update_face_gr <Ids Object>
oup
captured_face_ <integer>
id
update_unreco <boolean>
gnized_capture
d_face
append_image <boolean>
_data
Description Account. Name. Description. Base64 encode of registered face image. Size of image_data (before encoded). Selected face from DetectImageFace response. Face group of the target registered face.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Create with captured face.
1 and onward
Update unknown captured face with created registered 1 and onward face
Append Base64 encode image with created registered 1 and onward face.
<Face Object> Definitions:
Key
Value
Description
detection feature
<Detection Object> Detection of face. Array of <double> Feature of target face.
Availability 1 and onward 1 and onward
<Detection Object> Definitions:
Key conf bbox landmark
Value <float> <BoundingBox> <Landmark>
Description Confidence of the detection. Bounding box of detected face Landmark of face.
Availability 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
525
Synology Surveillance Station Web API
<BoundingBox> Definitions:
Key bottom_right top_left
Value <Point> <Point>
Description Bottom right coordinate of detection Top left coordinate of detection
Availability 1 and onward 1 and onward
<Landmark> Definitions:
Key left_eye right_eye nose mouth_left mouth_right
Value <Point> <Point> <Point> <Point> <Point>
Description Coordination of left eye Coordination of right eye Coordination of nose Coordination of mouth left point Coordination of mouth right point
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
<Point> Definitions:
Key
Value
x
<float>
y
<float>
Description x coordinate of point y coordinate of point
<Ids Object> Definitions:
Key ids
Value Array of <integer> Ids list
Description
Example:
POST
/webapi/entry.cgi
Form Data
account: "account"
name: "name"
description: "description"
update_unrecognized_captured_face: false
image_data: "/9j/4A...(base64 image data)"
image_size: 30102
face:
{
"detection":{
"bbox":{
"bottom_right":{
"x":0.7599999904632568,
"y":0.7142857313156128
Availability 1 and onward 1 and onward
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
526
Synology Surveillance Station Web API
}, "top_left":{
"x":0.2349999994039536, "y":0.2535714209079742 } }, "conf":0.8656806349754333, "landmark":{ "left_eye":{ "x":0.3899999856948853, "y":0.4142857193946838 }, "mouth_left":{ "x":0.4099999964237213, "y":0.5892857313156128 }, "mouth_right":{ "x":0.5950000286102295, "y":0.5928571224212646 }, "nose":{ "x":0.5049999952316284, "y":0.5142857432365417 }, "right_eye":{ "x":0.6150000095367432, "y":0.4178571403026581 } } }, "feature":[ 0.02810190618038177, -0.04223119840025902, ...(128dims data) ]
Copyright � Synology Inc. All rights Reserved.
527
Synology Surveillance Station Web API
} update_face_group: {"ids":[]} api: SYNO.SurveillanceStation.Face method: CreateRegisteredFace version: 1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key
Value
Description
error_code success
<integer> <boolean>
Error code of the execution. Execution success or not.
registered_face <Registered Face Object> Created registered face.
Availability 1 and onward 1 and onward 1 and onward
<Registered Face Object> Definitions:
Key
Value
id account name
<integer> <string> <string>
description <string> image_data <string> face_group_ids Array of <integer>
face_group_na Array of <integer> mes
checked
<boolean>
Description Id of the registered face. Account name of registered face. Name of the registered face. Description the registered face. Base64 encoded image. Ids of registered face's groups. Names of registered face's groups.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
The registered face is checked on the UI or not. 1 and onward
Example: {
"data":{ "error_code":0, "registered_face":{ "account":"account", "checked":false, "description":"description", "face_group_ids":[], "face_group_names":[],
Copyright � Synology Inc. All rights Reserved.
528
Synology Surveillance Station Web API
"id":1049, "name":"name" }, "success":true }, "success":true }
2.3.57.14 DeleteRegisteredFace
Delete registered face. Request
Key ids
Value
Description
Array of <integer> Registered face ids to delete.
Availability 1 and onward
Example:
GET /webapi/entry.cgi? ids=[1049]&api=SYNO.SurveillanceStation.Face&method=DeleteRegisteredFace&version=1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key error_code success ids
Value <integer> <boolean> Array of <integer>
registered_face Array of
s
<Registered Face
Object>
Description Error code of the execution. Execution success or not. Registered face ids to delete.
Deleted registered faces.
Availability 1 and onward 1 and onward 1 and onward
1 and onward
<Registered Face Object> Definitions:
Key id account name description
Value <integer> <string> <string> <string>
Description Id of the registered face. Account name of registered face. Name of the registered face. Description the registered face.
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
529
Synology Surveillance Station Web API
image_data <string>
face_group_ids Array of <integer>
face_group_na Array of <integer>
mes
checked
<boolean>
Base64 encoded image. Ids of registered face's groups. Names of registered face's groups.
The registered face is checked on the UI or not.
1 and onward 1 and onward 1 and onward
1 and onward
Example: {
"data":{ "error_code":0, "ids":[1049], "registered_faces":[ { "account":"account", "checked":false, "description":"description", "face_group_ids":[], "face_group_names":[], "id":1049, "name":"name" } ], "success":true
}, "success":true }
2.3.57.15 EditRegisteredFace
Edit registered face. Request
Key id account name description image_data image_size face
Value <integer> <string> <string> <string> <string> <integer> <Face Object>
Description Target registered face id Account. Name. Description. Base64 encode of registered face image. Size of image_data (before encoded). Selected face from DetectImageFace response.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
530
Synology Surveillance Station Web API
update_face_gr <Ids Object> oup
captured_face_ <integer> id
update_unreco <boolean> gnized_capture d_face
append_image <boolean> _data
Face group of the target registered face.
1 and onward
Create with captured face.
1 and onward
Update unknown captured face with created registered 1 and onward face
Append Base64 encode image with created registered 1 and onward face.
<Face Object> Definitions:
Key detection feature
Value
Description
<Detection Object> Detection of face.
Array of <double> Feature of target face.
Availability 1 and onward 1 and onward
<Detection Object> Definitions:
Key conf bbox landmark
Value <float> <BoundingBox> <Landmark>
Description Confidence of the detection. Bounding box of detected face Landmark of face.
Availability 1 and onward 1 and onward 1 and onward
<BoundingBox> Definitions:
Key bottom_right top_left
Value <Point> <Point>
Description Bottom right coordinate of detection Top left coordinate of detection
Availability 1 and onward 1 and onward
<Landmark> Definitions:
Key
Value
left_eye right_eye nose
<Point> <Point> <Point>
mouth_left <Point> mouth_right <Point>
Description Coordination of left eye Coordination of right eye Coordination of nose Coordination of mouth left point Coordination of mouth right point
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
<Point> Definitions:
Key x y
Value <float> <float>
Description x coordinate of point y coordinate of point
<Ids Object> Definitions:
Key ids
Value Array of <integer> Ids list
Description
Example:
Availability 1 and onward 1 and onward
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
531
Synology Surveillance Station Web API
POST
/webapi/entry.cgi
Form Data
account: "account"
name: "name"
description: "description"
update_unrecognized_captured_face: false
update_face_group: {"ids":[]}
id: 1048
api: SYNO.SurveillanceStation.Face
method: EditRegisteredFace
version: 1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key
Value
Description
error_code <integer>
Error code of the execution.
success
<boolean>
Execution success or not.
registered_face <Registered Face Object> Edited registered face.
Availability 1 and onward 1 and onward 1 and onward
<Registered Face Object> Definitions:
Key
Value
id account
<integer> <string>
name description image_data
<string> <string> <string>
face_group_ids Array of <integer> face_group_na Array of <integer> mes
checked
<boolean>
Description Id of the registered face. Account name of registered face. Name of the registered face. Description the registered face. Base64 encoded image. Ids of registered face's groups. Names of registered face's groups.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
The registered face is checked on the UI or not. 1 and onward
Example: {
"data":{ "error_code":0,
Copyright � Synology Inc. All rights Reserved.
532
Synology Surveillance Station Web API
"registered_face":{ "account":"account", "checked":false, "description":"description", "face_group_ids":[], "face_group_names":[], "id":1049, "name":"name"
}, "success":true }, "success":true }
2.3.57.16 ListRegisteredFace
List registered face. Request
Key
Value
id_only
<boolean>
filter
<Registered Face
Filter Object>
append_image <boolean>
_data
Description Results only contain id or not. Information of filter .
Append Base64 encode image with edited registered face.
Availability 1 and onward 1 and onward
1 and onward
<Registered Face Filter Object> Definitions:
Key
Value
offset
<integer>
limit
<integer>
ids
Array of <integer>
account
<string>
name
<string>
description <string>
face_group_ids Array of <integer>
checked_ids Array of <integer>
keyword
<string>
order_by
<Order Object>
Description Start offset of the query result. Limit of the number of the result. List faces matching the ids. List faces having substring in the account. List faces having substring in the name. List faces having substring in the description. List faces belong to those face groups. Checked face ids on UI. Keyword in the name or description. Using " " separate multiple string pattern. Information of the order.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
<Order Object> Definitions:
Copyright � Synology Inc. All rights Reserved.
533
Synology Surveillance Station Web API
Key column order
Value <string> <string>
Description One of ID, NAME, REGISTERED_FACE_COUNT One of ASC, DESC
Availability 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi?filter={"limit"=50,"order_by": {"column":"ID","order":"ASC"}}&api=SYNO.SurveillanceStation.Face&method=ListRegisteredFace& version=1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key
Value
error_code <integer>
success
<boolean>
registered_face Array of
s
<Registered Face
Object>
ids
Array of <integer>
total
<integer>
Description Error code of the execution. Execution success or not. Information of registered faces.
Id of registered faces Number of registered faces
Availability 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward
<Registered Face Object> Definitions:
Key
Value
id account name
<integer> <string> <string>
description image_data
<string> <string>
face_group_ids Array of <integer>
face_group_na Array of <integer> mes
checked
<boolean>
Description Id of the registered face. Account name of registered face. Name of the registered face. Description the registered face. Base64 encoded image. Ids of registered face's groups. Names of registered face's groups.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
The registered face is checked on the UI or not. 1 and onward
Example: {
"data":{ "error_code":0, "ids":[1048], "registered_faces":[
Copyright � Synology Inc. All rights Reserved.
534
Synology Surveillance Station Web API
{ "account":"account1", "checked":false, "description":"description", "face_group_ids":[], "face_group_names":[], "id":1048, "name":"name1"
} ], "success":true, "total":1 }, "success":true }
2.3.57.17 CountRegisteredFace
Count registered face. Request
Key filter
Value
<Registered Face Filter Object>
Description Information of filter .
Availability 1 and onward
<Registered Face Filter Object> Definitions:
Key
Value
Description
offset
<integer>
Start offset of the query result.
limit
<integer>
Limit of the number of the result.
ids
Array of <integer> List faces matching the ids.
account
<string>
List faces having substring in the account.
name description
<string> <string>
List faces having substring in the name. List faces having substring in the description.
face_group_ids Array of <integer>
checked_ids Array of <integer>
keyword
<string>
order_by
<Order Object>
List faces belong to those face groups. Checked face ids on UI. Keyword in the name or description. Using " " separate multiple string pattern. Information of the order.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward
<Order Object> Definitions:
Key
Value
Description Copyright � Synology Inc. All rights Reserved.
Availability 535
Synology Surveillance Station Web API
column order
<string> <string>
One of ID, NAME, REGISTERED_FACE_COUNT One of ASC, DESC
1 and onward 1 and onward
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Face&method=CountRegisteredFace &version=1
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
<Result Object> Definitions:
Key
Value
error_code <integer>
success
<boolean>
count
<integer>
Example: {
"data":{ "error_code":0, "success":true, "count":1
}, "success":true }
Description Error code of the execution. Execution success or not. Number of registered faces
Availability 1 and onward 1 and onward
Availability 1 and onward 1 and onward 1 and onward
2.3.57.18 SearchRegisteredFace
Search registered face. Request
Key
Value
keywords
<string>
append_image <boolean>
_data
Description Information of keywords. Append Base64 encode image with edited registered face.
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
536
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Face&method=SearchRegisteredFace &version=1&keywords="123"
Response
Key data success
Value <Result Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Result Object> Definitions:
Key
Value
error_code <integer>
success
<boolean>
registered_face Array of
s
<Registered Face
Object>
Description Error code of the execution. Execution success or not. Information of registered faces.
Availability 1 and onward 1 and onward 1 and onward
<Registered Face Object> Definitions:
Key
Value
id
<integer>
account name
<string> <string>
description <string> image_data <string> face_group_ids Array of <integer>
face_group_na Array of <integer> mes
checked
<boolean>
Description Id of the registered face. Account name of registered face. Name of the registered face. Description the registered face. Base64 encoded image. Ids of registered face's groups. Names of registered face's groups.
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
The registered face is checked on the UI or not. 1 and onward
Example: {
"data":{ "error_code":0, "registered_faces":[], "success":true
}, "success":true }
Copyright � Synology Inc. All rights Reserved.
537
Synology Surveillance Station Web API
2.3.57.19 API Error Code
Code 400 401 553 554 555 556 557 558 560 561 562 563 567
Description Operation Failed. Illegal parameters. No face detected. Face detected is too small. Multiple faces detected. The account try to set has exists. No image data appended. Add face group failed. The camera try to apply to face task is occupied by another face task. The number of face profile exceeds the maximum limit. The number of face group exceeds the maximum limit. The face profile is created or edited failed due to duplicated account. The face database is under syncrhonization.
Copyright � Synology Inc. All rights Reserved.
538
Synology Surveillance Station Web API
2.3.58 SYNO.SurveillanceStation.Face.Result
This API provides methods to get result information of face task.
Name SYNO.SurveillanceStation.Face.Result
Version 1
Method Name List
Delete Lock Unlock GetEventInfo GetAnalyticsResult Correct MarkAsStranger
Section 2.3.58.1 2.3.58.2 2.3.58.3 2.3.58.4 2.3.58.5 2.3.58.6 2.3.58.7 2.3.58.8
Availability Surveillance Station 8.2.8
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
2.3.58.1 List
Get face result list. Request
Key
Value
filter
<Filter Object>
blIncludeSnaps <boolean>
hot
blIncludeRegist <boolean>
eredFace
limit
<integer>
slaveDsParam <SlaveDsParam
Object>
Description Information of filter Indicate if snapshot should be appended
Availability 1 and onward 1 and onward
Indicate if face profile information should be appended 1 and onward
Max number of result list Parameter for corresponding recording servers
1 and onward 1 and onward
<Filter Object> Definitions:
Key
Value
Description
Availability
offset limit
<integer> <integer>
Start index of face result Max number of result list
1 and onward 1 and onward
ids
Array of <integer> List of result id
1 and onward
registered_face <integer> _id
Id of face profile
1 and onward
task_ids task_events
Array of <integer> List of face task id
1 and onward
Array of <string> List of face result event strings, which are consist of
1 and onward
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
start_date_ts <long long integer> Start utc ms timestamp end_date_ts <long long integer> End utc ms timestamp
1 and onward 1 and onward
start_clock_ms <integer>
end_clock_ms <integer>
threshold
<double>
Start ms timestamp in a day End ms timestamp in a day Similarity threshold between face result and target
1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
539
Synology Surveillance Station Web API
feature
Array of <double>
recompare_reg <integer>
istered_face_id
_
recompare_cap <integer>
tured_face_id
locked
<boolean>
ignore_bad_qu <boolean>
ality
max_id
<integer>
triggering
<boolean>
Feature of target face Id of target compared face profile
Id of target compared face result
Indicate if result is locked Indicate if ignore bad quality results
Max id of face result Indicate if face result is triggering
1 and onward 1 and onward
1 and onward
1 and onward 1 and onward
1 and onward 1 and onward
<SlaveDsParam Object> Definitions:
Key
Value
Description
start max_id
<integer> <integer>
Start index of face results Max id of face results
Availability 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="List"&blIncludeSnapshot=false&blInclu deRegisteredFace=false&filter={"start_date_ts":1593446400000, "end_date_ts":1594051200000,"ignore_bad_quality":true}&limit=1&&slaveDsParam={"0": {"max_id":88731, "start":0}}
Response
Key data success
Value <Data Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Data Object> Definitions:
Key
Value
captured_face Array of <Result
Object>
max id
<integer>
total
<integer>
slaveDsParam <SlaveDsParam
Object>
Description Information of face result list
Max id of face result Total count of face result Parameter for corresponding recording servers
Availability 1 and onward
1 and onward 1 and onward 1 and onward
<Result Object> Definitions:
Key
Value
Description
confirmed start_time
<boolean>
Indicate if this result is good quality
<long long integer> Start utc ms timestamp of result
end_time
<long long integer> End utc ms timestamp of result
taken_time <long long integer> Utc ms timestamp when result snapshot is taken
Availability 1 and onward 1 and onward 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
540
Synology Surveillance Station Web API
id
<integer>
locked
<boolean>
modified
<boolean>
registered_face <integer>
_id
similarity
<double>
task_name task_id triggering mask_status event image_data dsId uniqueId
<string> <integer> <boolean> <string> <string> <string> <integer> <string>
Id of this result.
1 and onward
Indicate if this result is locked
1 and onward
Indicate if this result is modified
1 and onward
Id of face profile if this result is recognized as a certain 1 and onward
profile
Similarity if this result is comared with a certain profile or 1 and onward
result
Task name which this result is generated by
1 and onward
Task id which this result is generated by
1 and onward
Indicate if this result is triggering
1 and onward
UNKNOWN, UNMASKED, MASKED
1 and onward
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP 1 and onward
Base64 encode of result snapshot
1 and onward
Id of belonged DS
1 and onward
Unique id for each result
1 and onward
<SlaveDsParam Object> Definitions:
Key
Value
Description
start max_id
<integer> <integer>
Start index of face result Max id of face result
Example: {
"data":{ "captured_face":[ { "confirmed":true, "dsId":0, "end_time":1594015770308, "event":"UNRECOGNIZED", "id":88731, "locked":false, "mask_status":"UNMASKED", "modified":false, "registered_face_id":0, "similarity":0, "start_time":1594015766542, "taken_time":1594015770175, "task_id":102, "task_name":"test",
Availability 1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
541
Synology Surveillance Station Web API
"triggering":true, "uniqueId":"0_88731" } ], "error_code":0, "max_id":88731, "slaveDsParam": {0: {"max_id": 88731, start: 0}}, "success":true, "total":5397 }, "success":true }
2.3.58.2 Delete
Delete face result. Request
Key filter slaveDsParam
Value
<Filter Object>
<SlaveDsParam Object>
Description Filter result parameter Parameter for corresponding recording servers
Availability 1 and onward 1 and onward
<Filter Object> Definitions:
Key
Value
Description
Availability
offset limit
<integer> <integer>
Start index of face result Max number of result list
1 and onward 1 and onward
ids
Array of <integer> List of result id
1 and onward
registered_face <integer> _id
Id of face profile
1 and onward
task_ids task_events
Array of <integer> List of face task id
1 and onward
Array of <string> List of face result event strings, which are consist of
1 and onward
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
start_date_ts <long long integer> Start utc ms timestamp end_date_ts <long long integer> End utc ms timestamp
1 and onward 1 and onward
start_clock_ms <integer>
end_clock_ms <integer>
threshold
<double>
Start ms timestamp in a day End ms timestamp in a day Similarity threshold between face result and target
1 and onward 1 and onward 1 and onward
feature
Array of <double>
recompare_reg <integer>
istered_face_id
_
Feature of target face Id of target compared face profile
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
542
Synology Surveillance Station Web API
recompare_cap <integer>
tured_face_id
locked
<boolean>
ignore_bad_qu <boolean>
ality
max_id
<integer>
triggering
<boolean>
Id of target compared face result
Indicate if result is locked Indicate if ignore bad quality results
Max id of face result Indicate if face result is triggering
1 and onward
1 and onward 1 and onward
1 and onward 1 and onward
<SlaveDsParam Object> Definitions:
Key
Value
Description
ids
Array of <integer> List of result id
max_id
<integer>
Max id of face results
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="Delete"&filter={"ignore_bad_quality ":false,""max_id":89109}&slaveDsParam={"0":{"max_id":89109, "ids":[89109]}}
Response
Key data success
Value <Data Object> <boolean>
Description Information of execution result. Execution success or not.
<Data Object> Definitions:
Key
Value
captured_face_ Array of <integer>
id
delCnt
<integer>
delSizeMb
<integer>
Description Face result ids to delete.
Deleted count of result Deleted megabyte of result
Example:
{ "data": { "captured_face_id": [], "delCnt": 0, "delSizeMb": 0 }, "success": true
}
Availability 1 and onward 1 and onward
Availability 1 and onward
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
543
Synology Surveillance Station Web API
2.3.58.3 Lock
Lock face result. Request
Key filter slaveDsParam
Value
<Filter Object>
<SlaveDsParam Object>
Description Filter result parameter Parameter for corresponding recording servers
Availability 1 and onward 1 and onward
<Filter Object> Definitions:
Key
Value
Description
Availability
offset
<integer>
Start index of face result
1 and onward
limit
<integer>
Max number of result list
1 and onward
ids
Array of <integer> List of result id
1 and onward
registered_face <integer>
Id of face profile
1 and onward
_id
task_ids
Array of <integer> List of face task id
1 and onward
task_events Array of <string> List of face result event strings, which are consist of
1 and onward
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
start_date_ts <long long integer> Start utc ms timestamp
1 and onward
end_date_ts <long long integer> End utc ms timestamp
1 and onward
start_clock_ms <integer>
Start ms timestamp in a day
1 and onward
end_clock_ms <integer>
End ms timestamp in a day
1 and onward
threshold
<double>
Similarity threshold between face result and target
1 and onward
feature
Array of <double> Feature of target face
1 and onward
recompare_reg <integer>
Id of target compared face profile
1 and onward
istered_face_id
_
recompare_cap <integer>
Id of target compared face result
1 and onward
tured_face_id
locked
<boolean>
Indicate if result is locked
1 and onward
ignore_bad_qu <boolean>
Indicate if ignore bad quality results
1 and onward
ality
max_id
<integer>
Max id of face result
1 and onward
triggering
<boolean>
Indicate if face result is triggering
1 and onward
<SlaveDsParam Object> Definitions:
Key ids
Value Array of <integer> List of result id
Description
max_id
<integer>
Max id of face results
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="Lock"&filter={"ignore_bad_quality":
Copyright � Synology Inc. All rights Reserved.
544
Synology Surveillance Station Web API false,""max_id":89109}&slaveDsParam={"0":{"max_id":89109, "ids":[89109]}}
Response
Key success
Value <boolean>
Example: {
"success":true }
Description Execution success or not.
Availability 1 and onward
2.3.58.4 Unlock
Unlock face result. Request
Key filter slaveDsParam
Value
<Filter Object>
<SlaveDsParam Object>
Description Filter result parameter Parameter for corresponding recording servers
Availability 1 and onward 1 and onward
<Filter Object> Definitions:
Key
Value
Description
Availability
offset
<integer>
Start index of face result
1 and onward
limit
<integer>
Max number of result list
ids
Array of <integer> List of result id
1 and onward 1 and onward
registered_face <integer>
Id of face profile
_id
task_ids
Array of <integer> List of face task id
1 and onward 1 and onward
task_events
Array of <string>
List of face result event strings, which are consist of
1 and onward
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
start_date_ts <long long integer> Start utc ms timestamp
end_date_ts <long long integer> End utc ms timestamp
start_clock_ms <integer>
Start ms timestamp in a day
1 and onward 1 and onward 1 and onward
end_clock_ms <integer>
End ms timestamp in a day
threshold
<double>
Similarity threshold between face result and target
feature
Array of <double> Feature of target face
1 and onward 1 and onward 1 and onward
recompare_reg <integer> istered_face_id _
recompare_cap <integer> tured_face_id
Id of target compared face profile Id of target compared face result
1 and onward 1 and onward
Copyright � Synology Inc. All rights Reserved.
545
Synology Surveillance Station Web API
locked
<boolean>
ignore_bad_qu <boolean>
ality
max_id
<integer>
triggering
<boolean>
Indicate if result is locked Indicate if ignore bad quality results
Max id of face result Indicate if face result is triggering
1 and onward 1 and onward
1 and onward 1 and onward
<SlaveDsParam Object> Definitions:
Key ids
Value Array of <integer> List of result id
Description
max_id
<integer>
Max id of face results
Availability 1 and onward
1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="Unlock"&filter={"ignore_bad_qualit y":false,""max_id":89109}&slaveDsParam={"0":{"max_id":89109, "ids":[89109]}}
Response
Key success
Value <boolean>
Example: {
"success":true }
Description Execution success or not.
Availability 1 and onward
2.3.58.5 GetEventInfo
Get information of recording file corresponding to certain face result. Request
Key
Value
capturedFaceId <integer>
Id of face result
Description
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="GetEventInfo"&capturedFaceId=895 82
Response
Copyright � Synology Inc. All rights Reserved.
546
Synology Surveillance Station Web API
Key data success
Value <Data Object> <boolean>
Description Information of return data. Execution success or not
Availability 1 and onward 1 and onward
<Data Object> Definitions:
Key id task_id video_type
Value <integer> <integer> <integer>
Description Id of face recording id of corresponding task 0: unknown, 1: mjpeg, 2: mpeg4, 3: h264, 6: h265, 7:h264_plus, 8: h265_plus
Availability 1 and onward 1 and onward 1 and onward
Example:
{ "data": { "alignerOffset": 233933289, "archId": 0, "archived": true, "audio_format": "PCMU", "camIdOnRecServer": 0, "cameraId": 1, "camera_name": "wdwd", "cause": 0, "closing": false, "comment": "", "commentOnHost": "", "customLabel": 0, "customLabelOnHost": 0, "dsId": 0, "event_size_bytes": 6291456, "fisheye_origin_view": true, "for_rotation_only": false, "frameCount": 0, "id": 16170, "idOnRecServer": 0, "imgHeight": 1080, "imgWidth": 1920, "markAsDel": false, "mountId": 0, "path": "20210527PM/User Define-20210527-210912-1622120952.mp4", "reason": 0, "recording": false, "setting": { "allowed_color": 2, "allowed_list": "", "blocked_color": 4,
Copyright � Synology Inc. All rights Reserved.
547
Synology Surveillance Station Web API
"blocked_list": "", "camera_id": 1, "deleted": false, "det_region": "0.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0;0.1000,0.9000,0.1000,0.1000,0.9000,0.1000,0.9000,0.9000;0.2000, 0.8000,0.2000,0.2000,0.8000,0.2000,0.8000,0.8000", "det_region_cnt": 1, "display_info": 0, "enable": true, "enable_min_obj_size": false, "enable_schedule": true, "frame_display_info": 1, "id": 12, "id_on_rec_server": 12, "ignore_bad_quality": true, "min_obj_size": 0.2000000029802322, "name": "wdwd", "owner_ds_id": 0, "post_rec_time": 5, "pre_rec_time": 5, "recognized_color": 3, "region_type": 0, "schedule": "111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111", "similarity": 0.8500000238418579, "stream_profile": 0, "task_id": 5, "trans_flags": 0, "trigger_alert": 127, "unrecognized_color": 8, "vip_color": 1, "vip_list": "" }, "startId": 0, "startTime": 1622120952, "status_flags": 0, "stopTime": 1622120969, "systemLabel": 0, "systemLabelAttr": {}, "task_id": 12, "task_name": "wdwd", "update_time": 0, "video_type": 3
Copyright � Synology Inc. All rights Reserved.
548
Synology Surveillance Station Web API
}, "success": true }
2.3.58.6 GetAnalyticsResult
Get recognition information of certain face recording. Request
Key
Value
Description
taskId
<integer>
Id of face task
eventId
<integer>
Id of face recording
startTime
<long long integer> Start utc timestamp
endTime
<long long integer> End utc timestamp
blIncludeRegist <boolean>
Indicate if face profile information should be appended
eredFace
Availability 1 and onward 1 and onward 1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="GetAnalyticsResult"&taskId=102&ev entId=468&startTime=1594017058&endTime=1594017068&blIncludeRegisteredFace=true
Response
Key data success
Value <Data Object> <boolean>
Description Information of return data. Execution success or not
Availability 1 and onward 1 and onward
<Data Object> Definitions:
Key faceResult
Value Array of <Result>
Description Face recognition information
Availability 1 and onward
<Result> Definitions:
Key frameId timestamp instance
Value
Description
<integer>
ms timestamp of this frame from recording start time
<long long integer> utc ms timestamp of this frame
Array of
Recognition list of this frame
<Recognition>
Availability 1 and onward 1 and onward 1 and onward
<Recognition> Definitions:
Key
Value
bbox
<BoundingBox>
Description Bounding box of detected face
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
549
Synology Surveillance Station Web API
captured_face <integer> _id
captured_face <CapturedFace>
registered_fac <RegisteredFace> e
Id of corresponding face result
Corresponding face result information Corresponding face profile information
1 and onward
1 and onward 1 and onward
<BoundingBox> Definitions:
Key
Value
bottom_right <Point>
top_left
<Point>
Description Bottom right coordinate of detection Top left coordinate of detection
Availability 1 and onward 1 and onward
<Point> Definitions:
Key
Value
x
<float>
y
<float>
Description x coordinate of point y coordinate of point
Availability 1 and onward 1 and onward
<CapturedFace> Definitions:
Key event id
Value <string> <integer>
Description
Availability
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP 1 and onward
Id of face result
1 and onward
<RegisteredFace> Definitions:
Key
Value
account id
null or <string> <integer>
name
null or <string>
Description Account of recognized face profile Id of recognized face profile Name of recognized face profile
Availability 1 and onward 1 and onward 1 and onward
Example: {
"data":{ "faceResult":[ { "frameId":5230, "instances":[ { "bbox":{ "bottom_right":{ "x":0.8661458492279053, "y":0.9638888835906982
Copyright � Synology Inc. All rights Reserved.
550
Synology Surveillance Station Web API
}, "top_left":{
"x":0.7786458134651184, "y":0.7740740776062012 } }, "captured_face":{ "event":"UNRECOGNIZED", "id":93528 }, "captured_face_id":93528, "registered_face":{ "account":null, "id":0, "name":null } } ], "timestamp":1594026559836 }, ] }, "success":true }
2.3.58.7 Correct
Correct face result. Request
Key
Value
id
<integer>
registered_face <integer>
_id
Description Id of target face result
Id of face profile which this result is applied to
Availability 1 and onward
1 and onward
Copyright � Synology Inc. All rights Reserved.
551
Synology Surveillance Station Web API
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="Correct"&id=333®istered_face_id= 15
Response
Key data success
Value <Data Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Data Object> Definitions:
Key
Value
captured_face <Result Object>
Description Information of face result list
Availability 1 and onward
<Result Object> Definitions:
Key
Value
Description
Availability
confirmed
<boolean>
Indicate if this result is good quality
1 and onward
start_time
<long long integer> Start utc ms timestamp of result
1 and onward
end_time
<long long integer> End utc ms timestamp of result
1 and onward
taken_time <long long integer> Utc ms timestamp when result snapshot is taken
1 and onward
id
<integer>
Id of this result.
1 and onward
locked
<boolean>
Indicate if this result is locked
1 and onward
modified
<boolean>
Indicate if this result is modified
1 and onward
registered_face <integer>
Id of face profile if this result is recognized as a certain 1 and onward
_id
profile
similarity
<double>
Similarity if this result is comared with a certain profile or 1 and onward
result
task_id
<integer>
Task id which this result is generated by
1 and onward
triggering
<boolean>
Indicate if this result is triggering
1 and onward
mask_status <string>
UNKNOWN, UNMASKED, MASKED
1 and onward
event
<string>
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP 1 and onward
Example: {
"data":{ "captured_face":{ "confirmed":true, "end_time":1594023127352, "event":"RECOGNIZED", "id":93527, "locked":false,
Copyright � Synology Inc. All rights Reserved.
552
Synology Surveillance Station Web API
"mask_status":"UNMASKED", "modified":true, "registered_face_id":176, "similarity":0, "start_time":1594023122993, "taken_time":1594023125819, "task_id":102, "triggering":false }, "error_code":0, "success":true }, "success":true }
2.3.58.8 MarkAsStanger
Mark face results as stranger. Request
Key ids
Value
Description
Array of <integer> Id of target face results
Availability 1 and onward
Example: GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="MarkAsStranger"&ids=[93527,93528]
Response
Key data success
Value <Data Object> <boolean>
Description Information of execution result. Execution success or not.
Availability 1 and onward 1 and onward
<Data Object> Definitions:
Key
Value
captured_face <Result Object>
Description Information of face result list
Availability 1 and onward
<Result Object> Definitions:
Copyright � Synology Inc. All rights Reserved.
553
Synology Surveillance Station Web API
Key
Value
Description
Availability
confirmed
<boolean>
Indicate if this result is good quality
1 and onward
start_time
<long long integer> Start utc ms timestamp of result
1 and onward
end_time
<long long integer> End utc ms timestamp of result
1 and onward
taken_time <long long integer> Utc ms timestamp when result snapshot is taken
1 and onward
id
<integer>
Id of this result.
1 and onward
locked
<boolean>
Indicate if this result is locked
1 and onward
modified
<boolean>
Indicate if this result is modified
1 and onward
registered_face <integer>
Id of face profile if this result is recognized as a certain 1 and onward
_id
profile
similarity
<double>
Similarity if this result is comared with a certain profile or 1 and onward
result
task_id
<integer>
Task id which this result is generated by
1 and onward
triggering
<boolean>
Indicate if this result is triggering
1 and onward
mask_status <string>
UNKNOWN, UNMASKED, MASKED
1 and onward
event
<string>
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP 1 and onward
Example:
{ "data": { "captured_faces": [ { "confirmed": true, "end_time": 1622121993204, "event": "UNRECOGNIZED", "id": 272228, "locked": false, "mask_status": "MASKED", "modified": true, "registered_face_id": 0, "similarity": 0, "start_time": 1622121990066, "taken_time": 1622121992570, "task_id": 12, "triggering": false } ], "error_code": 0, "success": true }, "success": true
}
2.3.58.9 API Error Code
Code 400
Operation Failed.
Description
Copyright � Synology Inc. All rights Reserved.
554
Synology Surveillance Station Web API
401
Illegal parameters.
564
The face result try to query doesn't exist.
Copyright � Synology Inc. All rights Reserved.
555
Synology Surveillance Station Web API
2.3.59 SYNO.SurveillanceStation.Recording.Bookmark
This API provides methods to list, save and delete bookmark.
Name SYNO.SurveillanceStation.Recording.Bookmark
Version 1
Availability Surveillance Station 8.2.7
Method Name SaveBookmark DeleteBookmark
2.3.59.1 SaveBookmark
Add new bookmark or edit exist one. Request
Section 2.3.59.1 2.3.59.2
Availability 1 and onward 1 and onward
Key id eventId cameraId archId
name timestamp comment
Value <integer> <integer> <integer> <integer>
<string> <timestamp> <string>
Description Id of the bookmark, 0 means add. O.W means edit Target event id Target event's camera id Target event's archive task id (set to 0 if the event is not in archive vault app) Bookmark name Timestamp of the bookmark Comment of the bookmark
Availability 1 and onward 1 and onward 1 and onward 1 and onward
1 and onward 1 and onward 1 and onward
Example:
GET /webapi/entry.cgi? id=0&eventId=12&cameraId=15&archId=0&name="bookmark_name"×tamp=1622804136&comment ="COMMENT"&api=SYNO.SurveillanceStation.Recording.Bookmark&method=SaveBookmark&version=1
Response
Key success
Value <boolean>
Example: {
"success":true }
Description Execution success or not.
Availability 1 and onward
Copyright � Synology Inc. All rights Reserved.
556
Synology Surveillance Station Web API
2.3.59.2 DeleteBookmark
Delete bookmark Request
Key
Value
bookmarkIds Array of <integer> List of result id
Description
Availability 1 and onward
Example:
GET /webapi/entry.cgi? api="SYNO.SurveillanceStation.Recording.Bookmark"&version="1"&method="DeleteBookmark"&bookmark Ids="4,6"
Response
Key success
Value <boolean>
Example:
{ "success": true
}
Description Execution success or not.
Availability 1 and onward
2.3.59.3 List
The section describes how to use version 5 of SYNO.SurveillanceStation.Recording List method, to get recording information which also includes the corresponding bookmark detail.
Request
Parameter offset
Value <integer>
limit
<integer>
cameraIds <string>
fromTime
<integer>
Description
Availability
Optional.
5 and onward
The offset to be shifted in the total result.
If not specified, the offset will be 0.
Optional.
5 and onward
Number of recordings to be returned.
If not specified, return recordings to the end of recording
list.
Optional.
5 and onward
The list of <CAMERA_ID> to be queried concatenated by ",".
If not specified, this parameter will be ignored and get all re-
lated events.
Optional.
5 and onward
Copyright � Synology Inc. All rights Reserved.
557
Synology Surveillance Station Web API
toTime
<integer>
Query start time. If not specified, the default value is 0.
Optional. Query stop time. If not specified, the default value is 0.
5 and onward
Example:
GET /webapi/entry.cgi? version=6&cameraIds="1,2"&api="SYNO.SurveillanceStation.Recording"&toTime=0&offset=0&limit=80&fro mTime=0&method="List"
Response Key
events offset timestamp
total
Value Array of <events> <integer> <timestamp>
<integer>
Description
Information of the queried events. The shifted offset in the total result.
UTC unix timestamp. The time when the system respond this request. The number of total recordings.
Availability 5 5 5
5 and onward
<events> definition:
Key
archId audioCodec
Value <integer>
<string>
bookmark bookmarkCount cameraId
Array of <bookmark> <integer> <integer>
dsId folder
<integer> <string>
id imgHeight imgWidth
<integer> <integer> <boolean>
startTime stopTime videoCodec
<timestamp> <timestamp> <string>
Description Archive task id. 0 means not archive task.
The audio codec of the recording.
Information of bookmark. Bookmark count of this recording. The belonged camera id of the recording. The owner ds id of queried recordings. The folder path of the recording file. The id of the recording. The image height of the recording. The image width of the recording. Recording start utc timestamp. Recording stop utc timestamp. The video codec of the recording.
Availability 5
5
5 5 5 5 5 5 5 5 5 5 5
<bookmark> definition:
Key
archId cameraId comment eventId id name timestamp
Value <integer>
<integer> <string> <integer> <integer> <string> <timestamp>
Description Archive task id. 0 means not archive task.
The belonged camera id of the bookmark. The comment of the bookmark. The belonged recording id of the bookmark. The id of the bookmark. The name of the bookmark. The bookmark timestamp of the recording.
Availability 5
5 5 5 5 5 5
Copyright � Synology Inc. All rights Reserved.
558
Synology Surveillance Station Web API
Example:
{ "data":{ "events":[ { "archId":0, "audioCodec":"MPEG4-GENERIC", "bookmark":[ { "archId":0, "cameraId":26, "comment":"11", "eventId":10336, "id":9, "name":"New Bookmark", "timestamp":1623036448 }, { "archId":0, "cameraId":26, "comment":"222", "eventId":10336, "id":10, "name":"New Bookmark2", "timestamp":1623036475 } ], "bookmarkCount":2, "cameraId":26, "dsId":0, "event_size_bytes":3145728, "folder":"/volume2/surveillance/fffffffff_ccc", "id":10334, "imgHeight":844, "imgWidth":1456, "startTime":1623036368, "stopTime":1623036369, "videoCodec":"H.264", } ], "offset":0, "timestamp":"1623161204", "total":1 },
"success":true }
Copyright � Synology Inc. All rights Reserved.
559
Synology Surveillance Station Web API
3. Resources
REST: http://en.wikipedia.org/wiki/Representational_state_transfer
SOAP: http://en.wikipedia.org/wiki/SOAP
JSON: http://en.wikipedia.org/wiki/JSON
HTTP: Hypertext Transfer Protocol � HTTP/1.0 http://www.w3.org/Protocols/rfc1945/rfc1945 Hypertext Transfer Protocol � HTTP/1.1 http://www.w3.org/Protocols/rfc2616/rfc2616.html
Copyright � Synology Inc. All rights Reserved.
560
Synology Surveillance Station Web API
Appendix: Valid values
The following valid values are used in this document:
Value m ... n m ... <boolean>
Description Any number between number m and number n. Any number larger than or equal to number m. A Boolean data type.
<integer> <float> <string>
Any number between 0 and 4,294,967,295 (232-1). A floating point number. Any string encoded by UTF-8.
<timestamp>
Unix time, seconds elapsed since UTC of Thursday, Jan 1st, 1970.
<value 1>, <value 2>, Enumeration, only the given values are valid.
<value 3>, ...
Array of <object> <schedule string>
A list of object in JSON array format.
A string consists of 48 digits to represent the scheduling of a weekday. Note that each digit stands for the schedule type of half-hour: 0: No scheduled plan 1: Continuous Recording 2: Motion Detection Recording 3: Alarm Recording 4: Motion Detection and Alarm Recording
Example: "111111111111222222222222333333333333444444444444"
<XXX Object> <CAMERA_ID>
The particular JSON object created to carry particular information. For example: <Camera Object> defined by "List" method in section 2.3.4 is used to represent
the information of a camera. <Event Object> defined by "Query" method in section 2.3.11 is used to repre-
sent the information of an event.
A unique ID to identify an installed camera. The camera IDs can be obtained by calling "List" method of SYNO.SurveillanceStation.Camera (section 2.3.4).
<CAMERA_GROUP_ID A unique ID to identify an existing camera group. The IDs can be obtained by calling
>
"ListGroup" method of SYNO.SurveillanceStation.Camera (section 2.3.4).
<PRESET_ID>
A unique ID to identify an existing preset position of a camera. The IDs can be ob-
tained by calling "ListPreset" method of SYNO.SurveillanceStation.PTZ (section 2.3.9).
<PATROL_ID>
A unique ID to identify an existing patrol of a camera. The IDs can be obtained by calling "ListPatrol" method of SYNO.SurveillanceStation.PTZ (section 2.3.9).
<EVENT_ID> <EMAP_ID>
A unique ID to identify a recorded event. The IDs can be obtained by calling "Query" method of SYNO.SurveillanceStation.Recording (section 2.3.37 ). A unique ID to identify an existing E-Map. The IDs can be obtained by calling "List" method of SYNO.SurveillanceStation.Emap (section 2.3.22).
Copyright � Synology Inc. All rights Reserved.
561
