Synology
Surveillance Station Web API
ver: 3.11
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
REVISION HISTORY
VERSION DATE DESCRIPTION NAME
0.1 2012/03/07 Creation of this document. Wai Chi Kan
0.2 2012/04/18 Add “SYNO.SurveillanceStation.Info”. Sheldon Lin
0.3 2012/04/23 Document format modification. Sheldon Lin
0.4 2012/04/24 Rename to “Synology Surveillance Station Web API.” Sheldon Lin
0.5 2012/04/25 'offset', 'limit' parameters as optional. Sheldon Lin
0.6 2012/04/25 More info in “SYNO.SurveillanceStation.Info”. Sheldon Lin
0.7 2012/05/25 Error code, VS status in Device API. Claire
Huang
0.8 2012/05/30 info.cgi for non-login users. Claire
Huang
0.9 2012/05/31 Modify SYNO.API.Auth. Claire
Huang
0.10 2012/06/01 Modify SYNO.Surveillance.Event Audio Format. Claire
Huang
0.11 2012/07/19 Merge Chad's modification, rephrase, RecTime. Claire
Huang
0.12 2012/08/08 Add SYNO.API.Auth version = 2. Claire
Huang
1.0 2012/09/11 Version 1 as official release. Sheldon Lin
1.1 2012/09/17 Add SYNO.SurveillanceStation.Emap. Sheldon Lin
1.2 2012/10/01 Implement SYNO.SurveillanceStation.Emap. Chih-Pei
Yang
1.3 2013/11/04 Error Code Update. Kai Wang
1.4 2014/04/28 1. Update SYNO.Surveillance.Info
2. Add privilege parameter for List, ListGroup in
SYNO.Surveillance.Camera
Pei-Wen Wu
1.5 2014/05/20 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
Pei-Wen Wu
1.6 2014/05/21 Replace“SS”with“Surveillance Station” Kai Wang
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
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 Pei-Wen Wu
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
Josh Lin
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
Chuan-Che
Yen
Bismarck
Hsu
Ben Tsai
2.1 2015/10/16 Update calling examples using entry.cgi
Request
Info
Camera Enable
External Recording
Addons GetUpdateInfo
Chuan-Che
Yen
2.2 2015/12/16 Update calling example which refer to _sid
Add Document the API “External Event”
Chuan-Che
Yen
2.3 2016/3/9 Correct old version webapi path
Add example of PTZ webapi GoPreset method
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
Chuan-Che
Yen
Septem Hsu
David Lai
2.5 16/7/28 Rename following APIs
Event → Recording
Analytics → Alert
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
Jack
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
Terry
Copyright © Synology Inc. All rights Reserved. 3
Synology Surveillance Station Web API
Delete
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
James Chan
Kayle Chang
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
Blake Lin
Copyright © Synology Inc. All rights Reserved. 4
Synology Surveillance Station Web API
CountByCategory
RecountEventSize
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
hungchengl
3 18/12/28 Modify document of following methods
SYNO.SurveillanceStation.SnapShot
List
SYNO.SurveillanceStation.Camera
MDParamSave
SYNO.SurveillanceStation.License
Load
Saipher
3.1 19/1/9 Add document of following methods
SYNO.SurveillanceStation.YoutubeLive
Load
Save
CloseLive
Saipher
Copyright © Synology Inc. All rights Reserved. 5
Synology Surveillance Station Web API
3.2 19/5/27 Modify document of following methods
SYNO.SurveillanceStation.Recording
Download
Saipher
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.
Alan Lyu
3.4 20/3/17 Add document of following APIs
SYNO.SurveillanceStation.IVA
ListTask
GetCount
Star Chen
3.5 20/3/23 Add document of following APIs
SYNO.SurveillanceStation.Recording
RangeExport
GetRangeExportProgress
OnRangeExportDone
David Lai
3.6 20/10/28 Modify document of following methods
SYNO.API.Auth
login
logout
Ruby Lin
3.7 21/5/31 Add document of of following APIs
SYNO.SurveillanceStation.Face
SYNO.SurveillanceStation.Face.Result
Septem Hsu
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
Leon Luo
3.9 21/6/4 Add document of of following APIs
SYNO.SurveillanceStation.Recording.Bookmark
SaveBookmark
DeleteBookmark
Star Chen
Copyright © Synology Inc. All rights Reserved. 6
Synology Surveillance Station Web API
Add document of how to list bookmarks in
SYNO.SurveillanceStation.Recording
List
3.10
21/6/22 Add request parameter "recordSchedule" of following
method
SYNO.SurveillanceStation.Camera
Save
Tom Chueh
3.11
21/12/30 Modify document of following methods
SYNO.SurveillanceStation.Camera
GetInfo
Save
GetLiveViewPath
Andy Huang
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 3
rd
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:
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
Surveillance Station
Surveillance Station
3
rd
Party Application
3
rd
Party Application
Web API
Web API
HTTP
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 3
rd
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, 3
rd
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:
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
3
rd
party
application
3
rd
party
application
Surveillance Station
Surveillance Station
4. Session logout (request SYNO.API.Auth)
4. Session logout (request SYNO.API.Auth)
1. Query APIs’ information (request SYNO.API.Info)
1. Query APIs’ information (request SYNO.API.Info)
2. Session login (request SYNO.API.Auth)
2. Session login (request SYNO.API.Auth)
3. Send API request and get response
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 Description
<URL_PATH> API’s URL path
<API> Name of the API
<METHOD > Name of the API method
<VERSION> The version of API
<SESSION_ID> Optional, the designate session ID. See 2.3.2
<PARAM_LIST> 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 3
rd
party application in JSON format.
JSON Containers:
Attribute Value Description
success <boolean> Whether this request is successful or not.
Copyright © Synology Inc. All rights Reserved. 24
Synology Surveillance Station Web API
data <Result Object> Optional. It will return data info if this request is successful, for more
details please refer to chapters for each API method.
error <Error Object> Optional. It will return the error info if this request fails.
<Error Object> Definitions:
Attribute Value Description
code <integer> 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 Description
100 Unknown error
101 Invalid parameters
102 API does not exist
103 Method does not exist
104 This API version is not supported
105 Insufficient user privilege
106 Connection time out
107 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 Description Section
SYNO.API.Info Discover all API information 2.3.1
SYNO.API.Auth Perform session login and logout 2.3.2
SYNO.SurveillanceStation.Info Retrieve Surveillance Station-related general
information
2.3.3
SYNO.SurveillanceStation.Camera Retrieve camera-related information 2.3.4
SYNO.SurveillanceStation.PTZ Perform camera PTZ actions 2.3.9
SYNO.SurveillanceStation.ExternalRecording Control external recording of cameras 2.3.10
SYNO.SurveillanceStation.Recording Query recording information 2.3.11
SYNO.SurveillanceStation.Emap Get information of defined E-Maps. 2.3.22
SYNO.SurveillanceStation.Emap.Image Get Image of defined E-Maps. 2.3.23
SYNO.SurveillanceStation.Notification Get authorized token of DS. 2.3.24
Each API has its following definition:
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 3
rd
party application must retrieve
other APIs' information by calling “Query” method.
API Name Version Availability
SYNO.API.Info 1 DSM 3.1-1594
Method Name Section Availability
Query 2.3.1.1 1 and onward
2.3.1.1 Query method
Discover available APIs and corresponding information.
Request
Parameter Value Description Availability
query ALL,
<string>
ALL: Get information of all available APIs.
<string>: The list of <API Query Unit> to be queried
concatenated by “,”.
1 and onward
<API Query Unit> definition:
Notation Value Description Availability
<API Query Unit> <API Query Name>,
<API Query Prefix>
Unit of API query target. It could be full name of an
API, or prefix of APIs.
1 and onward
<API Query Name> <string> Full name of API to be queried. Must be in
“SYNO.XXX.YYY” format.
Ex: SYNO.API.Auth.
1 and onward
<API Query Prefix> <string> Prefix of APIs to be queried. Must be in “SYNO.XX.”
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.
1 and onward
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 Value Description Availability
key <string> The string of API name 1 and onward
path <string> The string of URL path 1 and onward
minVersion <integer> The minimum supported API version 1 and onward
maxVersion <integer> The maximum supported API version 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 Version Availability
SYNO.API.Auth 1 DSM 3.2
2 DSM 4.1
3 DSM 4.2
4 DSM 5.2
5 DSM 6.0 beta 1
6 DSM 6.0 beta2
Method Name Section Availability
login 2.3.2.1 1 and onward
logout 2.3.2.2 1 and onward
2.3.2.1 login method
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 Value Description Availability
account <string> Login account name 1 and onward
passwd <string> Login account password 1 and onward
session <string> Optional.
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.
1 and onward
enable_syno_token
<string> Optional.
Return synotoken if value is "yes".
3 and onward
format cookie, sid Optional.
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.”
2 and onward
otp_code <integer> Optional.
6-digit OTP code.
3 and onward
enable_device_to
ken
<string> Optional.
yes or no, default to no.
6 and onward
Copyright © Synology Inc. All rights Reserved. 30
Synology Surveillance Station Web API
device_id <string> Optional.
Device id (max: 255).
6 and onward
device_name <string> Optional.
Device name (max: 255).
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 Value Description Availability
sid <string>
Session ID, pass this value by HTTP argument
"_sid" or Cookie argument.
2 and onward
did <string>
Device id, use to skip OTP checking. 6 and onward
synotoken <string>
If CSRF enabled in DSM, pass this value by
HTTP argument "SynoToken"
3 and onward
is_portal_port <boolean>
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 Value Description Availability
session <string> Optional.
Application session name.
User can assign “SurveillanceStation” to this
parameter to logout SurveillanceStation.
If not specified, default session is DSM.
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 Description
100 Unknown error.
101 The account parameter is not specified.
400 Invalid password.
401 Guest or disabled account.
402
Permission denied.
403
One time password not specified.
404
One time password authenticate failed.
405
App portal incorrect.
406
OTP code enforced.
407
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 Version Availability
SYNO.SurveillanceStation.Info 1 Surveillance Station 6.0-2337
4 Surveillance Station 6.3-3316
5 Surveillance Station 7.0-3718
Method Name Section Availability
GetInfo 2.3.3.1 1 and onward
2.3.3.1 GetInfo method
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 Value Description Availability
version <Version Object> Version object to represent package version of
Surveillance Station.
For all users.
1 and onward
path <string> UI path to Surveillance Station.
For all users.
1 and onward
customizedPortHttp <integer> Optional.
Customized port of Surveillance Station (HTTP).
For Surveillance-login users only.
1 and onward
customizedPortHttps <integer> Optional.
Customized port of Surveillance Station (HTTPS).
For Surveillance-login users only.
1 and onward
cameraNumber <integer> The total number of installed cameras.
For Surveillance-login users only.
1 and onward
licenseNumber <integer> The total number of installed licenses.
For Surveillance-login users only.
1 and onward
maxCameraSupport <integer> Maximum number of camera support for this DS.
For Surveillance-login users only.
1 and onward
serial <string> DS serial number 2 and onward
Copyright © Synology Inc. All rights Reserved. 34
Synology Surveillance Station Web API
For Surveillance-login users only.
isAdmin <boolean> Login user is admin or not.
For Surveillance-login users only.
2 and onward
userPriv <integer> PRIV_AUTH_NO_ACCESS = 0x00
PRIV_AUTH_ADMIN = 0x01
PRIV_AUTH_MANAGER = 0x02
PRIV_AUTH_VIEWER= 0x04
PRIV_AUTH_ALL = 0xFF
For Surveillance-login users only.
3 and onward
isLicenseEnough <boolean> Is license enough or not.
For Surveillance-login users only.
3 and onward
allowSnapshot <boolean> If user has privilege to take snapshot or not.
For Surveillance-login users only.
4 and onward
allowManualRec <boolean> If user has privilege to do manual recording or
not.
For Surveillance-login users only.
4 and onward
allowDeleteRec <boolean> If user has privilege to delete recordings or not.
For Surveillance-login users only.
4 and onward
<Version Object> definition:
Name Value Description Availability
major <integer> Major version of Surveillance Station. 1 and onward
minor <integer> Minor version of Surveillance Station. 1 and onward
build <integer> Build number of Surveillance Station. 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 Version Availability
SYNO.SurveillanceStation.Camera 1 Surveillance Station 6.0-2337
2 Surveillance Station 6.1
6 Surveillance Station 6.3
9 Surveillance Station 8.0
Method Name Section Availability
Save 2.3.4.1 9 and onward
List 2.3.4.2 9 and onward
GetInfo 2.3.4.3 From 1 to 8
ListGroup 2.3.4.4 From 1 to 8
GetSnapshot 2.3.4.5 9 and onward
Enable 2.3.4.6 3 and onward
Disable 2.3.4.7 3 and onward
GetCapabilityByCamId 2.3.4.8 From 4 to 8
MigrationEnum 2.3.4.9 From 7 to 8
Migrate 2.3.4.10 From 7 to 8
CountByCategory 2.3.4.11 From 7 to 8
RecountEventSize 2.3.4.12 From 7 to 8
SaveOptimizeParam 2.3.4.13 From 7 to 8
GetOccupiedSize 2.3.4.14 From 7 to 8
CheckCamValid 2.3.4.15 From 7 to 8
MigrationCancel 2.3.4.16 From 7 to 8
Delete 2.3.4.17 7 and onward
GetLiveViewPath 2.3.4.18 9 and onward
2.3.4.1 Save method
Add new camera or edit existing camera setting.
Request
Parameter Value Description Availability
id <CAMERA_ID> Optional.
Camera id to be edited.
If equal to 0, add new camera according to
request parameter.
9 and onward
name <string> Optional.
Camera name to be edited. Note that this
parameter is only valid when “id” is not specified
and “dsId“ is specified.
9 and onward
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).
Camera ip.
9 and onward
port
<integer> Optional (Needed when add case).
Camera port.
9 and onward
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 <integer> Optional.
Camera video codec.
0 - Unknown
1 - MJPEG
2 - MPEG4
3 - H264
5 - MXPEG
6 - H265
7 - H264+
9 and onward
audioCodec <integer> Optional.
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
tvStandard <integer> Optional.
Camera tv standard.
1 - NTSC
2 - PAL
9 and onward
Copyright © Synology Inc. All rights Reserved. 38
Synology Surveillance Station Web API
channel <string> Optional.
Camera channel.
9 and onward
userDefinePath <string> Optional (Needed when add user define camera).
Camera streaming path.
This parameter only valid when camera vendor is
“User” and model is “Define”.
9 and onward
fov <string> Optional.
Camera field of view.
9 and onward
streamXX <Stream
Setting object>
Optional.
XX – Stream number.
9 and onward
recordTime <integer> Optional.
The recording length in minute.
9 and onward
preRecordTime <integer> Optional.
Extra recording time before the start of each
recording in second.
9 and onward
postRecordTime <integer> Optional.
Extra recording time after the end of each
recording in second.
9 and onward
enableRecordingKeepDays <boolean> Optional.
Does the rotation occur when the limit time is
reached.
9 and onward
recordingKeepDays <integer> Optional.
The upper bound indicating how long a file can
be store before rotation.
9 and onward
enableRecordingKeepSize <boolean> Optional.
Does the rotation occur when the limit space
is reached.
9 and onward
recordingKeepSize <integer> Optional.
The upper bound that total file size can reach
before rotation.
9 and onward
enableLowProfile <boolean> Optional.
Does low bandwidth profile enabled.
9 and onward
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
9 and onward
Copyright © Synology Inc. All rights Reserved. 39
Synology Surveillance Station Web API
4: Custom Detection 2
rtspPathTimeout <integer> Optional.
The timeout of share stream.
0 - One hour
1 - Forever
9 and onward
<Stream Setting Object> definition:
Key Value Description Availability
fps <integer> Optional.
Frames per second of the stream
9 and onward
resolution <string> Optional.
Denoted as width * height
9 and onward
bitrateCtrl <integer> Optional.
The bitrate control type.
0 - None
1 - Variable bitrate
2 - Constant bitrate
9 and onward
quality <integer> Optional.
An integer ranged from 1 to 5 to indicate the
quality of the stream.
This parameter only valid when using
variable bitrate.
9 and onward
constantBitrate <integer> Optional.
The constant bitrate value.
This parameter only valid when using
constant bitrate.
9 and onward
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
id <CAMERA_ID> The add/edit camera id. 9 and onward
camera <Camera List object> The detail information of add/edit
camera.
9 and onward
Copyright © Synology Inc. All rights Reserved. 40
Synology Surveillance Station Web API
2.3.4.2 List method
Get the list of all cameras.
Request
Parameter Value Description Availability
idList <string> Optional.
The list of <CAMERA_ID> to be queried concatenated by
“,”.
9 and onward
offset <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
9 and onward
limit <integer> Optional.
Number of cameras to be returned.
If not specified, return cameras to the end of camera list.
9 and onward
blFromCamList
<boolean> 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
9 and onward
privCamType
0 … 15 Weighted sum indicated the types of the camera
0x00: NONE
0x01: LIVEVIEW
0x02: PLAYBACK
0x04: LENS
0x08: AUDIO
9 and onward
basic
<boolean> Optional
Indicating to show basic settings or not
set to be false if not specified
9 and onward
streamInfo
<boolean> Optional
Indicating to show streaming information or not
set to be false if not specified
9 and onward
blPrivilege
<boolean> Optional
Indicating if the user privilege should be checked or not
set to be false if not specified
9 and onward
camStm
0,
1,
2
Stream number of the camera live view
0: Live stream
1: Recording stream
2: Mobile stream (default value)
9 and onward
Example: List 2 cameras starting from offset 10 with all additional information.
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
Copyright © Synology Inc. All rights Reserved. 41
Synology Surveillance Station Web API
st"
Response
Key Value Description Availability
total <integer> The number of total installed cameras. 9 and onward
cameras Array of <Camera List
Object>
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 <string> Field of view of the camera 9 and onward
streamXX <Stream Setting
object>
XX – Stream number. 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
13: Storage removed
14: Stopping
15: Connect hist failed
16: Unauthorized
17: RTSP error
18: No video
9 and onward
ip <string>
IP address of the camera
9 and onward
id <CAMERA_ID>
Camera ID
9 and onward
Copyright © Synology Inc. All rights Reserved. 42
Synology Surveillance Station Web API
enableRecordingKeepDays <boolean> Does the rotation occur when the limit time
is reached.
9 and onward
model <string>
Model name of the Camera
9 and onward
name <string>
Name of the camera
9 and onward
port <integer>
Port of the camera
9 and onward
recordingKeepDays <integer>
The parameter for replacement strategy
9 and onward
recordingKeepSize <string>
The parameter for replacement strategy
9 and onward
tvStandard <integer>
Indicating the TV Standard
0: None
1: NTSC
2: PAL
9 and onward
videoCodec <integer> Optional.
Camera video codec.
0 - Unknown
1 - MJPEG
2 - MPEG4
3 - H264
5 - MXPEG
6 - H265
7 - H264+
9 and onward
vendor <string>
Vendor of the camera
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,
"fov":"",
"id":144,
"ip":"10.13.22.37",
"model":"TVIP72500",
"newName":"ABUS – TVIP72500",
"port":80,
"postRecordTime":5,
Copyright © Synology Inc. All rights Reserved. 43
Synology Surveillance Station Web API
"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":"",
"id":154,
"ip":"10.13.23.15",
"model":"Generic_ONVIF",
"newName":"ONVIF",
"port":80,
"postRecordTime":5,
"preRecordTime":5,
"recordTime":30,
"recordingKeepDays":30,
"recordingKeepSize":"10",
"status":1,
"tvStandard":0,
"vendor":"ONVIF",
"videoCodec":3
Copyright © Synology Inc. All rights Reserved. 44
Synology Surveillance Station Web API
}
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
From 1 to 8
blIncludeDeletedCam <boolean> Optional.
Is deleted cameras included
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.
Is information of device output capability included
From 4 to 8
fisheye <boolean> Optional.
Is fisheye information included
From 4 to 8
camAppInfo <boolean> Optional.
Is information of camera Application included
From 4 to 8
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 Value Description Availability
cameras Array of <Camera
Information Object>
The list of all queried cameras. From 1 to 8
Copyright © Synology Inc. All rights Reserved. 45
Synology Surveillance Station Web API
<Camera Information Object> definition:
Key Value Description Availability
ADCap <integer> Audio detection capability From 4 to 8
DINum <integer> Digital input number From 4 to 8
DONum <integer> Digital output number From 4 to 8
MDCap <integer> Which codec has MD capability From 4 to 8
TDCap <integer> Tamper detection capability From 4 to 8
analyticsBeep <boolean> Point out that beep or not From 4 to 8
analyticsDirection 0,
1
0 : one way
1 : two way
From 4 to 8
analyticsDwellTime <integer> Analytics dwellTime for
ANALYTICS_TYPE_LOITERING
From 4 to 8
analyticsFrame <boolean> Point out that show frame or not From 4 to 8
analyticsHeight <integer> Parameter for the live detection(no longer
relevent)
From 4 to 8
analyticsLine <boolean> Point out that show line or not From 4 to 8
analyticsObjSize <integer> Analytics objSize for
ANALYTICS_TYPE_FOREIGN_OBJ
From 4 to 8
analyticsRegion <string> Analytics region From 4 to 8
analyticsSens 1,
2,
3
1: LOW
2: MEDIUM
3: HIGH
From 4 to 8
analyticsType 1 … 9 1: NONE
2: MOTION
3: MISSING_OBJ
4: FOREIGN_OBJ
5: CAM_OCCLUSION
6: FOCUS_LOST
7: LOITERING
8: OBJ_COUNTING
9: VIRTUAL_FENCE
From 4 to 8
analyticsVirtualFence <boolean> Point out that show virtual fence or not From 4 to 8
analyticsWidth <integer> Parameter for the live detection(no longer
relevent)
From 4 to 8
audioCap <boolean> Audio capability From 4 to 8
audioOut <boolean> Does the camera support audioOut From 4 to 8
audioType <integer> Audio type From 4 to 8
autoFocus <boolean> Auto focus From 4 to 8
autoPan <integer> Auto pan From 4 to 8
blLiveviewPriv <boolean> live view privilege From 4 to 8
blPresetSpeed <boolean> Can speed pre-setted From 4 to 8
camIdOnRecServer <integer> Camera ID on recording server From 4 to 8
camLiveMode 0,
1
Determing the source of live view
0: DS
1: Camera
From 4 to 8
camMountType 0,
1,
2
How camera is mounted
0: CEILING
1: WALL
From 4 to 8
Copyright © Synology Inc. All rights Reserved. 46
Synology Surveillance Station Web API
2: FLOOR
camPath <string> Camera Path From 4 to 8
camStatus 0 … 4
Indicating the camera status
0: Normal
1: Disconnected
2: Disabled
3: Deleted
4: Others
From 4 to 8
channel_id <string>
Camera channel id
From 4 to 8
daybegin <integer> Camera optimization exposure mode day
begin time
From 4 to 8
dayend <integer> Camera optimization exposure mode day end
time
From 4 to 8
deleted <boolean>
Is deleted
From 4 to 8
detailInfo <Camera DerailInfo
Object>
Detail information of the camera From 4 to 8
deviceType 1 … 15
Using weighted sum to verify the device
type
0x01: CAMERA
0x02: VIDEO_SERVER
0x04: PTZ
0x08: FISHEYE
From 4 to 8
dsIp <string>
IP of the DS
From 4 to 8
dsPort <integer>
Port of the DS
From 4 to 8
enabled <boolean>
Is the camera enabled?
From 4 to 8
exposure_control 0 … 6 Indicating type of exposure control
0: AUTO
1: 50HZ
2: 60HZ
3: HOLD
4: OUTDOOR
5: NONE
6: UNKNOWN
From 4 to 8
exposure_mode 0 … 4 Indicating exposure mode
0: AUTO
1: DAY
2: NIGHT
3: SCHEDULE
4: UNKNOWN
From 4 to 8
feRegionList Array of <Fisheye
Region Object>
List of fisheye camera regions From 4 to 8
fisheyeDispMode <string> The display mode of fisheye camera From 4 to 8
fisheyeType <integer> The type of fisheye From 4 to 8
folder <string>
Path to the recorded video
From 4 to 8
fps <integer>
The fps of recording stream
From 4 to 8
hasCamParam <boolean>
True if the camera has parameter capability
From 4 to 8
host <string>
IP address of the camera
From 4 to 8
id <integer>
Camera ID
From 4 to 8
imageEnhancement <Image
Enhancement
The parameters of the image enhancement From 4 to 8
Copyright © Synology Inc. All rights Reserved. 47
Synology Surveillance Station Web API
Object>
isStatusUnrecognized <boolean>
Is status of the camera unrecognized
From 4 to 8
is_rotated_by_date <boolean>
Indicating if the replacing strategy
"rotation_by_date" is enabled
From 4 to 8
is_rotated_by_space <boolean>
Indicating if the replacing strategy
"rotation_by_space" is enabled
From 4 to 8
model <string>
Model name of the Camera
From 4 to 8
multiDI <boolean> Is there multi digital input From 4 to 8
mute <boolean> Is the camera mute From 4 to 8
name <string>
Name of the camera
From 4 to 8
objTrack <boolean> Is the camera with capability of object
tracking
From 4 to 8
osd_format 0 … 3 Indicating the format of OSD is
0: NON
1: DATE
2: TIME
3: TEXT
From 4 to 8
osd_position <integer> The position of osd From 4 to 8
osd_status <boolean> Is the OSD on/off From 4 to 8
ownerDsId <integer>
The id of the owner of this camera
From 4 to 8
param_chklist 0 … 127 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
From 4 to 8
port <integer>
Port of the camera
From 4 to 8
presetNum <integer>
The maximal number of preset regions for
the PTZ camera
From 4 to 8
ptzCap <integer>
Capability of PTZ camera
From 4 to 8
ptzContinuous <integer> Is PTZ moving in continuous mode From 4 to 8
ptzDirection <integer> The number of directions PTZ camera
supports
From 4 to 8
quality <string>
Quality of the recording stream
From 4 to 8
recBitrateCtrl 0,
1,
2
Indicating the bitrate of recording stream
0: NONE
1: VARIABLE
2: CONSTANT
From 4 to 8
recCbrBitrate <integer>
A constant indicating the bitrate
From 4 to 8
recStatus <integer>
Indicating the recording method
From 4 to 8
resolution <string>
Resolution of the camera
From 4 to 8
rotation_by_date <integer>
The parameter for replacement strategy
From 4 to 8
rotation_by_space <string>
The parameter for replacement strategy
From 4 to 8
rotation_option <integer>
The recording option when rotation occurs
From 4 to 8
setDICap <boolean> Does camera have the capability of digital
input
From 4 to 8
setDOCap <boolean> Does camera have the capability of digital From 4 to 8
Copyright © Synology Inc. All rights Reserved. 48
Synology Surveillance Station Web API
output
singleStream <boolean>
Does the camera provide only single
stream
From 4 to 8
snapshot_path <string>
The path for obtaining snapshop
From 4 to 8
status <integer>
Indicating the status of the camera
0: ENABLED
1: DISABLED
2: ACCTIVATING
3: DISABLING
4: RESTARTING
5: UNKNOWN
From 4 to 8
status_flags <integer>
Flags of the camera status
From 4 to 8
stmFisheyeType 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
From 4 to 8
stm_info Array of <Stream
Information Object>
Information of each stream profile
Length of Array is 3.
Array[0]: High quality stream profile.
Array[1]: Balanced stream profile.
Array[2]: Low bandwidth stream profile.
From 4 to 8
profileSettingList
<string> Stream profile of each functionality
concatenated by ",".
Functionality in order:
Liveview
Mobile
Recording Stream - continuous
Recording Stream - motion detection
Recording Stream - customize1
Recording Stream - customize2
(deprecated)
(deprecated)
(deprecated)
From 4 to 8
Copyright © Synology Inc. All rights Reserved. 49
Synology Surveillance Station Web API
Recording Stream - edge
(deprecated)
Liveview dynamic switch profile
Advanced recording
Video analysis
time_server <string> The NTP server From 4 to 8
tvStandard 0,
1,
2
Indicating the TV Standard
0: NTSC
1: PAL
2: NONE
From 4 to 8
type <integer>
Type of the camera
From 4 to 8
update_time <integer>
The last update time in timestamp
From 4 to 8
vendor <string>
Vendor of the camera
From 4 to 8
videoCapList Array of <Video
Capability Object>
List of the video capability
From 4 to 8
video_flip <boolean> Is the video flip From 4 to 8
video_mirror <boolean> Is the video mirror From 4 to 8
video_rotation <integer> Is the video rotated From 4 to 8
volume <integer> Size of the volume From 4 to 8
volume_space <string>
The size of the recorded videos of the
camera
From 4 to 8
From 4 to 8
<Camera DetailInfo Object> definition:
Key Value Description Availability
camAudioType 0 … 5 Indicating audio type
0: UNKNOWN
1: PCM
2: G711
3: G726
4: AAC
5: AMR
From 4 to 8
camChannel <string> Channel of the output video From 4 to 8
camFolder <string> Folder to store configuration and video From 4 to 8
camFov <string> Field of view of the camera From 4 to 8
camFps <integer> The fps of recording stream From 4 to 8
camIP <string> IP address of the camera From 4 to 8
camIsRotByDate <boolean> Does the rotation occur when the limit time
is reached
From 4 to 8
camIsRotBySpace <boolean> Does the rotation occur when the limit space
is reached
From 4 to 8
camLiveBitrateCtrl 0,
1,
2
Indicating the bitrate of live stream
0: NONE
1: Variable
2: Constant
From 4 to 8
camLiveCbrBitrate <integer> A constant indicating the bitrate From 4 to 8
camLiveFps <integer> The fps of live stream From 4 to 8
camLiveMode 0,
1
Determining the source of live view
0: DS
1: Camera
From 4 to 8
camLiveQuality <string> The quality of live stream From 4 to 8
Copyright © Synology Inc. All rights Reserved. 50
Synology Surveillance Station Web API
camLiveResolution <string> The resolution of live stream From 4 to 8
camLiveStreamNo <integer> The stream number of live stream From 4 to 8
camMobileBitrateCtrl 0,
1,
2
Indicating the bitrate of mobile stream
0: NONE
1: Variable
2: Constant
From 4 to 8
camMobileCbrBitrate <integer> A constant indicating the bitrate From 4 to 8
camMobileFps <integer> The fps of mobile stream From 4 to 8
camMobileQuality <string> The quality of mobile stream From 4 to 8
camMobileResolution <string> The resolution of mobile stream From 4 to 8
camMobileStreamNo <integer> The stream number of mobile stream From 4 to 8
camModel <string> Model name of the camera From 4 to 8
camMountType 0,
1,
2
How camera is mounted
0: CEILING
1: WALL
2: FLOOR
From 4 to 8
camName <string> Camera name From 4 to 8
camPassWord <string> Password of the camera From 4 to 8
camPort <integer> Port of the camera From 4 to 8
camPostRecTime <integer> Extra recording time after the end of each
recording
From 4 to 8
camPreRecTime <integer> Extra recording time before the start of each
recording
From 4 to 8
camPrefix <string> The prefix of the recording file name From 4 to 8
camQuality <string> The quality of recording stream From 4 to 8
camRecBitrateCtrl 0,
1,
2
Indicating the bitrate of recording stream
0: NONE
1: Variable
2: Constant
From 4 to 8
camRecCbrBitrate <integer> A constant indicating the bitrate From 4 to 8
camRecStreamNo <integer> Stream number of recording stream From 4 to 8
camRecTime <integer> The recording length in minute From 4 to 8
camResolution <string> The resolution of recording stream From 4 to 8
camRotByDate <integer> The upper bound indicating how long a file
can be store before rotation
From 4 to 8
camRotBySpace <integer> The upper bound that total file size can reach
before rotation
From 4 to 8
camRotOption <integer> Indicating the behavior when the space is
full, rotate/stop
From 4 to 8
camRtspProtocol 0 … 4 Indicating the protocol of RTSP
0: NONE
1: UDP
2: TCP
3: HTTP
4: Auto
From 4 to 8
camSchedule Array of <integer> This variable is actually a 2-dimension, 48*7
array indicating the recording schedule at
each half hour
From 4 to 8
camServer <integer> The DS Id on which the camera is mounted From 4 to 8
camTvStandard <integer> Indicating the TV Standard From 4 to 8
Copyright © Synology Inc. All rights Reserved. 51
Synology Surveillance Station Web API
0: NTSC
1: PAL
2: NONE
camUserName <string> User name to access the camera From 4 to 8
camVendor <string> Vendor of the camera From 4 to 8
camVideoType <string> Indicating video type
0: UNKNOWN
1: MJPEG
2: MPEG4
3: H264
4: EMAP
5: MXPEG
From 4 to 8
customAlarmDetect <integer> Determining the type of alarm in the
schedule field
From 4 to 8
customDetect <integer> Determining the type of motion detection in
the schedule field
From 4 to 8
edgeStgDownloadSch Array of <integer> This variable is actually a 2-dimension, 48*7
array indicating the recording schedule at
each half hour
From 4 to 8
edgeStgEnabled <boolean> Is the edge storage enabled From 4 to 8
edgeStgRecDays <integer> Using an weighted sum for verifying which
day to record
From 4 to 8
edgeStgRecMode 1 … 15 A weighted sum indicating the recording
mode
0x01: CONTINUOUS
0x02: MD
0x04: DI
0x08: AUDIO_DET
From 4 to 8
edgeStgRecStartTime <string> The start time of edge storage recording From 4 to 8
edgeStgRecStopTime <string> The stop time of edge storage recording From 4 to 8
edgeStgRetrieveAction 0,
1,
2,
3
Indicating the retrieve action is
0: NONE
1: DOWNLOAD
2: GET_LOST
3: NO_RETRIEVE
From 4 to 8
<Fisheye Region Object> definition:
Key Value Description Availability
camId <integer> Camera ID From 4 to 8
id <integer> Region ID From 4 to 8
name <string> Name of the Region From 4 to 8
posX <integer> X-coordinate value of the dewarping region From 4 to 8
posY <integer> Y-coordinate value of the dewarping region From 4 to 8
regions Array of <Fisheye
Sub-region Object>
List of sub regions of the camera From 4 to 8
type -1 … 6 Type of fisheye region.
-1: FISHEYE_NOT_REGION
0: FISHEYE_REGION
1: FISHEYE_PANORAMA
From 4 to 8
Copyright © Synology Inc. All rights Reserved. 52
Synology Surveillance Station Web API
2: FISHEYE_DOUBLE_PANORAMA
3: FISHEYE_TRIPLE_VIEW
4: FISHEYE_QUAD_VIEW
5: FISHEYE_SUB_REGION
6: FISHEYE_SUB_PANORAMA
zoom <integer> Zoom value From 4 to 8
<Fisheye Sub-region Object> definition:
Key Value Description Availability
camId <integer> Camera ID From 4 to 8
id <integer> Region ID From 4 to 8
name <string> Name of the sub-region From 4 to 8
location <integer> Location of the Region From 4 to 8
posX <integer> X-coordinate value of the dewarping region From 4 to 8
posY <integer> Y-coordinate value of the dewarping region From 4 to 8
strSubRegionInfo <string> Information about sub-region From 4 to 8
type -1 … 6 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
From 4 to 8
zoom <integer> Zoom value From 4 to 8
<Image Enhancement Object> definition:
Key Value Description Availability
brightness <integer> Brightness of images From 4 to 8
contrast <integer> Degree of contrast of images From 4 to 8
saturation <integer> Saturation of images From 4 to 8
sharpness <integer> Sharpness of images 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,
Copyright © Synology Inc. All rights Reserved. 53
Synology Surveillance Station Web API
"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,
"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
Copyright © Synology Inc. All rights Reserved. 54
Synology Surveillance Station Web API
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": [
{
"camPath": "cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2
Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"type": 0
},
{
"camPath": "cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2
Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"type": 1
},
{
"camPath": "cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2
Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"type": 2
}
],
"camLiveMode": 0,
"volume": 50,
"ptzDirection": 32,
"dayend": 18,
"folder": "/var/services/surveillance/P5415-E-001",
"tvStandard": 0,
Copyright © Synology Inc. All rights Reserved. 55
Synology Surveillance Station Web API
"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],
"customAlarmDetect": 3,
Copyright © Synology Inc. All rights Reserved. 56
Synology Surveillance Station Web API
"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",
"model": "P5415-E",
Copyright © Synology Inc. All rights Reserved. 57
Synology Surveillance Station Web API
"resolution": "800x450"
}
]
}
2.3.4.4 ListGroup method
Get all camera group information.
Request
Parameter Value Description Availability
offset <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
From 1 to 8
limit <integer> Optional.
Number of camera groups to be returned.
If not specified, return camera groups to the end of
camera group list.
From 1 to 8
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
method="ListGroup"&api="SYNO.SurveillanceStation.Camera"&limit=3&version="8"&offset=10
Response
Key Value Description Availability
total <integer> The number of total camera groups. From 1 to 8
offset <integer> The shifted offset in the total result. From 1 to 8
cameraGroups Array of <Camera Group Object> The camera group list. From 1 to 8
<Camera Group Object> definition:
Key Value Description Availability
id <CAMERA_GROUP_ID> Unique camera group ID. From 1 to 8
name <string> Camera group name. From 1 to 8
cameraIds Array of <CAMERA_ID> The list of camera ID within this group. From 1 to 8
description <string> The description of the camera group. From 1 to 8
privilege <integer> The user privilege about this camera group.
Use bit operation to get the privilege.
0x01: liveview
0x02: playback
0x04: lens
0x08: audio
From 4 to 8
Example:
{
"total": 38,
"offset": 10,
"cameraGroups": [
{
Copyright © Synology Inc. All rights Reserved. 58
Synology Surveillance Station Web API
"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
}
]
}
2.3.4.5 GetSnapshot method
Get the up-to-date snapshot of the selected camera in JPEG format.
Request
Parameter Value Description Availability
id <CAMERA_ID> Unique camera ID. 9 and onward
name <string> Optional.
The name of queried camera.
This parameter only valid when “id” is not
specified and “dsId“ is specified.
9 and onward
dsId <integer> Optional.
The owner ds id of queried camera. Used only
combined with “name“ parameter.
9 and onward
profileType <integer> Optional.
Profile type of selected camera. Default value is
1.
0 - High quality
1 - Balanced
2 - Low bandwidth
9 and onward
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.
Copyright © Synology Inc. All rights Reserved. 59
Synology Surveillance Station Web API
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 Value Description Availability
idList <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.
2.3.4.7 Disable method
Disable cameras.
Request
Parameter Value Description Availability
idList <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 Value Description Availability
Copyright © Synology Inc. All rights Reserved. 60
Synology Surveillance Station Web API
cameraId <CAMERA_ID> Unique camera ID. 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 Value Description Availability
ptzPan <boolean> Capability to perform pan action. From 4 to 8
ptzTilt <boolean> Capability to perform tilt action. From 4 to 8
ptzZoom <boolean> Capability to perform zoom action. From 4 to 8
ptzHome <boolean> Capability to perform home action. From 4 to 8
ptzPresetNumber <integer> The maximum number of preset supported by
the model. 0 stands for preset incapability.
From 4 to 8
ptzPan <integer> 0: doesn't support pan action.
1: support step operation
2: support continuous operation
From 5 to 8
ptzTilt <integer> 0: doesn't support tilt action.
1: support step operation
2: support continuous operation
From 5 to 8
ptzZoom <integer> 0: doesn't support zoom action.
1: support step operation
2: support continuous operation
From 5 to 8
ptzIris <integer> 0: doesn't support iris action.
1: support step operation
2: support continuous operation
From 5 to 8
ptzFocus <integer> 0: doesn't support focus action.
1: support step operation
2: support continuous operation
From 5 to 8
ptzAbs <boolean> Capability to perform absolute PTZ action. From 6 to 8
ptzAutoFocus <boolean> Capability to perform auto focus action. From 6 to 8
ptzDirection <integer> The PTZ directions that camera support From 6 to 8
ptzSpeed <boolean> Capability to perform change speed. From 6 to 8
audioOut <boolean> Capability to perform audio output to camera. 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,
Copyright © Synology Inc. All rights Reserved. 61
Synology Surveillance Station Web API
"audioOut":true
}
2.3.4.9 MigrationEnum method
Enumerates current status of migration
Request
Parameter Value Description Availability
start <integer> The beginning of the enumeration list From 7 to 8
limit <integer> Amount of the events for showing From 7 to 8
ownerDsId <integer> The source DS ID in the CMS table 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 Value Description Availability
camInfo Array of <Migration
Info Object>
Information of each listed migration event From 7 to 8
total <integer> The total number of events in the database From 7 to 8
<Migration Info Object> definition:
Key Value Description Availability
from <integer> The source DS of the migration From 7 to 8
id <integer> ID of selected migration event From 7 to 8
ip <string> IP of camera From 7 to 8
is_rotated_by_space <boolean> Replacement policy once the space is full From 7 to 8
name <string> Name of the camera specified at the source DS From 7 to 8
occupied <string> Occupied space in the destination DS denoted
in GB
From 7 to 8
progress <float> The completeness of the event From 7 to 8
rotation_by_space <string> Parameter of the replacement policy From 7 to 8
status <integer> Status of the migration event From 7 to 8
to <integer> The destination DS From 7 to 8
Example:
{
"data": {
"total": 3,
"camInfo": [
Copyright © Synology Inc. All rights Reserved. 62
Synology Surveillance Station Web API
{
"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
}
]
}
2.3.4.10 Migrate method
Migrating Cameras and recorded video (optional) to specified DS
Request
Parameter Value Description Availability
serverId <integer> The destination of the migration From 7 to 8
camIdList <string> List of To-Be-Migrated cameras From 7 to 8
delMode <integer> Choosing to preserve, remove or migrate
recorded videos
From 7 to 8
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 Value Description Availability
start <integer> The starting offset in the list of cameras From 7 to 8
limit <integer> The number of cameras to show From 7 to 8
Copyright © Synology Inc. All rights Reserved. 63
Synology Surveillance Station Web API
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
start=0&api="SYNO.SurveillanceStation.Camera"&limit=0&version="8"&method="CountByCategory"
Response
Key Value Description Availability
cam_brand Array of <Group Status
Object>
List of camera counts categorized by brand From 7 to 8
cam_device Array of <Group Status
Object>
The list of camera counts categorized by devic From 7 to 8
cam_group Array of <Group Status
Object>
The list of camera counts categorized by user
defined groups
From 7 to 8
cam_status Array of <Group Status
Object>
The list of camera counts categorized by camera
status
From 7 to 8
server Array of <Group Status
Object>
The list of camera counts categorized by owner
DS
From 7 to 8
total <integer> The amount of cameras From 7 to 8
<Group Status Object> definition:
Key Value Description Availability
id <string> The identifier of status in the selected group From 7 to 8
Example:
{
"cam_brand": [
{
"id": "-1: 2"
},
{
"id": "ABUS: 1"
},
{
"id": "iPUX: 1"
}
],
"cam_group": [
{
"id": "-1: 2"
},
{
"id": "1: 1"
}
],
"cam_status": [
{
"id": "-1: 2"
},
{
Copyright © Synology Inc. All rights Reserved. 64
Synology Surveillance Station Web API
"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": [
{
"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.
Copyright © Synology Inc. All rights Reserved. 65
Synology Surveillance Station Web API
Request
Parameter Value Description Availability
camId <integer> Specified cam 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 Value Description Availability
size <float> The total size of the migrated data 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
Request
Parameter Value Description Availability
cameraIds <integer> Specified cam From 7 to 8
camParamChkList <integer> Optional.
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
From 7 to 8
timeServer <string> Optional.
Specified NTP server
From 7 to 8
vdoMirror <boolean> Optional.
1 for turning on while 0 for turning off
From 7 to 8
vdoFlip <boolean> Optional.
1 for turning on while 0 for turning off
From 7 to 8
vdoRotation <boolean> Optional.
1 for turning on while 0 for turning off
From 7 to 8
Copyright © Synology Inc. All rights Reserved. 66
Synology Surveillance Station Web API
expCtrl <integer> Optional.
Degree of exposure control
From 7 to 8
expMode <integer> Optional.
Modes for days and nights respectively
From 7 to 8
dayBegin <integer> Optional.
Determine the start hour for the schedule of
day mode
From 7 to 8
dayEnd <integer> Optional.
Determine the end hour for the schedule of day
mode
From 7 to 8
osdStatus <boolean> Optional.
Specify whether osd is turned on/off
From 7 to 8
osdFormat <integer> Optional.
Determine the format of osd if supported
From 7 to 8
osdPosition <integer> Optional.
Determin the position of osd
From 7 to 8
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 Value Description Availability
id <integer> Return the camera id From 7 to 8
Example:
{
"id": 28
}
2.3.4.14 GetOccupiedSize method
This method returns the occupied volume in GigaBytes
Request
Parameter Value Description Availability
camIdList <string> The list of <CAMERA_ID> to be queried
concatenated by “,”.
From 7 to 8
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
Copyright © Synology Inc. All rights Reserved. 67
Synology Surveillance Station Web API
api="SYNO.SurveillanceStation.Camera"&camIdList="46,48"&version="8"&method="GetOccupiedSize"
Response
Key Value Description Availability
ID <string> This field is actually replaced by camera ID
dynamically, as a consequence the result for
example should be {"46":"0.260","48":"0.050"}
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 Value Description Availability
cameraId <CAMERA_ID> Specified Cam ID From 7 to 8
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
api="SYNO.SurveillanceStation.Camera"&version="8"&cameraId=27&method="CheckCamValid"
Response
Key Value Description Availability
categEntryVal <string> The mapped entry for specified camera From 7 to 8
itemStatus integer Status of the shortcut From 7 to 8
Example:
{
"categEntryVal": "iPUX",
"itemStatus": 0
}
2.3.4.16 MigrationCancel method
Deleting selected tasks
Copyright © Synology Inc. All rights Reserved. 68
Synology Surveillance Station Web API
Request
Parameter Value Description Availability
taskIds <string> To-Be-Deleted tasks 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 Value Description Availability
idList <string> The list of <CAMERA_ID> to be queried
concatenated by “,”.
9 and onward
keepRecording <boolean> To delete recorded videos or not 9 and onward
Response
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.
Note
The effective time of the streaming path can be set by parameter rtspPathTimeout of method
SYNO.SurveillanceStation.Camera.Save.
Request
Parameter Value Description Availability
idList <string> The list of <CAMERA_ID> to be queried
concatenated by “,”.
9 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
api="SYNO.SurveillanceStation.Camera"&method="GetLiveViewPath"&version=9&idList="14,15"
Copyright © Synology Inc. All rights Reserved. 69
Synology Surveillance Station Web API
Response
Key Value Description Availability
data Array of <PathInfo
Object>
Detail path information of quried cameras. 9 and onward
<PathInfo Object> definition:
Key Value Description Availability
id <integer> ID of the camera. 9 and onward
mjpegHttpPath <string> Mjpeg stream path(over http) of the camera 9 and onward
multicstPath <string> Multi-cast path of the camera. 9 and onward
mxpegHttpPath <string> mxpeg stream path of the camera. 9 and onward
rtspOverHttpPath <string> RTSP stream(over http) path of the camera. 9 and onward
rtspPath <string> RTSP stream path of the camera. 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:[email protected]: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:[email protected]:554/Sms=14.unicast"
},
{
"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:[email protected]: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:[email protected]:554/Sms=15.unicast"
}
]
Copyright © Synology Inc. All rights Reserved. 70
Synology Surveillance Station Web API
}
2.3.4.19 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
Copyright © Synology Inc. All rights Reserved. 71
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 Version Availability
SYNO.Surveillance.Camera.Event 1 Surveillance Station 7.0
Method Name Section Availability
AudioEnum 2.3.5.1 Surveillance Station 7.0
AlarmEnum 2.3.5.2 Surveillance Station 7.0
TamperingEnum 2.3.5.3 Surveillance Station 7.0
MDParamSave 2.3.5.4 Surveillance Station 7.0
MotionEnum 2.3.5.5 Surveillance Station 7.0
ADParamSave 2.3.5.6 Surveillance Station 7.0
DIParamSave 2.3.5.7 Surveillance Station 7.0
AlarmStsPolling 2.3.5.8 Surveillance Station 7.0
TDParamSave 2.3.5.9 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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 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 Value Description Availability
ADParam <ADParam Object> The audio detection parameters. 4 and onward
<ADParam Object> Definition:
Key Value Description Availability
keep <boolean> Define the keep the camera original setting. 4 and onward
source <integer> Define the detection source. e.g. -1:disable,
0:by_camera.
4 and onward
level <Level Object> The level's detail informations. 4 and onward
Copyright © Synology Inc. All rights Reserved. 72
Synology Surveillance Station Web API
<Level Object> Definition:
Key Value Description Availability
cap <boolean> Define if support the level detection argument. 4 and onward
minValue <integer> Define the minimum value of level. 4 and onward
maxValue <integer> Define the maximun value of level. 4 and onward
value <integer> Define the current value of level. 4 and onward
Example:
{
"ADParam": {
"source": 0,
"level": {
"cap": true,
"maxValue": 100,
"value": 50,
"minValue": 0
},
"keep": true
}
}
2.3.5.2 AlarmEnum method
Enumerate alarm setting list. e.g. normal and keep
Request
Parameter Value Description Availability
camId <CAMERA_ID> The selected camera id. 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 Value Description Availability
DIParam Array of <AlarmSettingList
Object>
The updated alarm setting list. 4 and onward
<AlarmSettingList Object> Definition:
Key Value Description Availability
keep <boolean> Define the keep the camera original setting. 4 and onward
idx <integer> The index of alarm. 4 and onward
normal <integer> The normal state of this alarm. e.g.
0:open_circuit, 1:ground_circuit.
4 and onward
Copyright © Synology Inc. All rights Reserved. 73
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 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 Value Description Availability
TDParam <TDParam Object> The tampering detection parameters. 4 and onward
<TDParam Object> Definition:
Key Value Description Availability
keep <boolean> Define the keep the camera original setting. 4 and onward
source <integer> Define the detection source. e.g. -1:disable,
0:by_camera.
4 and onward
duration <Duration Object> The duration's detail informations. 4 and onward
<Duration Object> Definition:
Key Value Description Availability
cap <boolean> Define if support the duration detection
argument.
4 and onward
minValue <integer> Define the minimum value of duration. 4 and onward
maxValue <integer> Define the maximun value of duration. 4 and onward
value <integer> Define the current value of duration. 4 and onward
Copyright © Synology Inc. All rights Reserved. 74
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
source <integer> Optional.
Define the detection source. e.g. -1:disable,
0:by_camera and 1:by_surveillance.
4 and onward
mode <integer> Optional.
Define the keep thie camera original setting.
e.g. 0:keep camera setting and 1:not keep
camera setting.
4 and onward
sensitivity <integer> Optional.
Define the sensitivity number.
4 and onward
threshold <integer> Optional.
Define the threshold number.
4 and onward
objectSize <integer> Optional.
Define the object size you want to detect.
4 and onward
percentage <integer> Optional.
Define the percentage number.
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
Copyright © Synology Inc. All rights Reserved. 75
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 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 Value Description Availability
MDParam <MDParam Object> The motion detection parameters. 4 and onward
<MDParam Object> Definition:
Key Value Description Availability
keep <boolean> Define the keep the camera original setting. 4 and onward
source <integer> Define the detection source. e.g. -1:disable,
0:by_camera, 1:by_surveillance.
4 and onward
sensitivity <Sensitivity Object> The sensitivity's detail informations. 4 and onward
threshold <Threshold Object> The threshold's detail informations. 4 and onward
objectSize <ObjectSize Object> The objectSize's detail informations. 4 and onward
percentage <Percentage Object> The percentage's detail informations. 4 and onward
<Threshold Object> Definition:
Key Value Description Availability
camCap <boolean> Define if camera support the threshold
detection argument.
4 and onward
ssCap <boolean> Define if surveillance station support the
threshold detection argument.
4 and onward
minValue <integer> Define the minimum value of threshold. 4 and onward
Copyright © Synology Inc. All rights Reserved. 76
Synology Surveillance Station Web API
maxValue <integer> Define the maximun value of threshold. 4 and onward
value <integer> Define the current value of threshold. 4 and onward
<ObjectSize Object> Definition:
Key Value Description Availability
camCap <boolean> Define if camera support the objectSize
detection argument.
4 and onward
ssCap <boolean> Define if surveillance station support the
objectSize detection argument.
4 and onward
minValue <integer> Define the minimum value of objectSize. 4 and onward
maxValue <integer> Define the maximun value of objectSize. 4 and onward
value <integer> Define the current value of objectSize. 4 and onward
<Percentage Object> Definition:
Key Value Description Availability
camCap <boolean> Define if camera support the percentage
detection argument.
4 and onward
ssCap <boolean> Define if surveillance station support the
percentage detection argument.
4 and onward
minValue <integer> Define the minimum value of percentage. 4 and onward
maxValue <integer> Define the maximun value of percentage. 4 and onward
value <integer> Define the current value of percentage. 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. 77
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
source <integer> Optional.
Define the detection source. e.g. -1:disable,
0:by_camera and 1:by_surveillance.
4 and onward
keep <boolean> Optional.
Define the keep thie camera original setting.
4 and onward
level <integer> Optional.
Define the level number.
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 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. 78
Synology Surveillance Station Web API
Request
Parameter Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
idx <integer> Define digital input index. 4 and onward
keep <boolean> Optional.
Define the keep thie camera original setting.
4 and onward
normal <integer> Optional.
Define the normal status. e.g. 0:open_circuit,
1:ground_circuit
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
Example:
{
"camId": 280
}
2.3.5.8 AlarmStsPolling method
Enumerate alarm trigger state list.
Request
Parameter Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
timeOut <integer> Optional.
Define the maximum waiting time for polling
alarm trigger status if no changed.
4 and onward
list
Array of
<AlarmStateList>
Optional.
Define the keep thie camera original setting.
4 and onward
< AlarmStateList Object> Definition:
Key Value Description Availability
idx <integer> The index of alarm. 4 and onward
trigger <integer> The trigger state of this alarm. e.g. 0:untrigger,
1:triggered.
4 and onward
Copyright © Synology Inc. All rights Reserved. 79
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 Value Description Availability
list Array of <AlarmStateList> The updated alarm state list. 4 and onward
Example:
{
"list": [
{
"trigger": 0,
"idx": 0
}
]
}
2.3.5.9 TDParamSave method
Save tampering detection parameters. e.g. Duration
Request
Parameter Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
source <integer> Optional.
Define the detection source. e.g. -1:disable,
0:by_camera.
4 and onward
keep <boolean> Optional.
Define the keep thie camera original setting.
4 and onward
duration <integer> Optional.
Define the duration number.
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 Value Description Availability
camId <CAMERA_ID> The selected camera id. 4 and onward
Example:
{
Copyright © Synology Inc. All rights Reserved. 80
Synology Surveillance Station Web API
"camId": 280
}
2.3.5.10 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
407 CMS closed.
Copyright © Synology Inc. All rights Reserved. 81
Synology Surveillance Station Web API
2.3.6 SYNO.SurveillanceStation.Camera.Group
This API provides operations for camera groups
API Name Version Availability
SYNO.SurveillanceStation.Camera.Group 1 Surveillance Station 7.0
Method Name Section Availability
Enum 2.3.6.1 4 and onward
Save 2.3.6.2 4 and onward
Delete 2.3.6.3 4 and onward
2.3.6.1 Enum method
Enumerate group information. e.g. Group list and camera list in the group.
Request
Parameter Value Description Availability
privCamType <integer> The privilege type in enumeration groups. 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 Value Description Availability
allCamGrpInfo Array of <allCamGrpInfo
Object>
The list of all groups. 4 and onward
data Array of <data Object> The group list in the seleted privilege and
the camera list in this group.
4 and onward
<allCamGrpInfo Object> definition:
Key Value Description Availability
dsId <integer> The DS ID of the group. 4 and onward
id <integer> The group ID 4 and onward
name <string> The name of the group. 4 and onward
uniqueId <string> True unique ID of the group. 4 and onward
<data Object> definition:
Key Value Description Availability
CamList Array of <CamList Object> The camera list of the group. 4 and onward
dsId <integer> The DS ID of the group. 4 and onward
Copyright © Synology Inc. All rights Reserved. 82
Synology Surveillance Station Web API
id <integer> The group ID 4 and onward
name <string> The name of the group. 4 and onward
desc <string> The description of the group. 4 and onward
uniqueId <string> True unique ID of the group. 4 and onward
<CamList Object> definition:
Key Value Description Availability
dsId <integer> The DS ID of the camera. 4 and onward
id <integer> The camera ID 4 and onward
name <string> The name of the camera. 4 and onward
camIdOnRecServer <integer> True camera ID on the recording server. 4 and onward
dsName <string> The DS name of the camera. 4 and onward
dsStatus <integer> The DS status of the camera. 4 and onward
ip <string> The IP address of the camera. 4 and onward
preview <string> The webAPI preview path of the camera. 4 and onward
Resolution <string> The resolution of the camera. 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. 83
Synology Surveillance Station Web API
"id": 1,
"desc": "GrpDesc"
}
]
}
2.3.6.2 Save method
Save the specific groups.
Request
Parameter Value Description Availability
groupList Array of <groupList
Object>
The Saved group list. 4 and onward
<allCamGrpInfo Object> definition:
Key Value Description Availability
camList Array of <CamList Object> The camera list of the group. 4 and onward
id <integer> The group ID 4 and onward
name <string> The name of the group. 4 and onward
desc <string> The description of the group. 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 Value Description Availability
groupList Array of <groupList Object> The Saved group list. 4 and onward
Example:
{
"groupList": [
{
"camList": [
{
"camIdOnRecServer": 0,
"dsName": "DS_Name",
"dsId": 4,
"id": 10,
"name": "CameraName"
Copyright © Synology Inc. All rights Reserved. 84
Synology Surveillance Station Web API
}
],
"desc": "GrpDesc",
"id": 9,
"name": "GrpName"
}
]
}
2.3.6.3 Delete method
Delete the specific groups.
Request
Parameter Value Description Availability
Id <string> The deleted group ID list in a string format. ex:
"1,3,9"
4 and onward
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 Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
407 CMS closed.
Copyright © Synology Inc. All rights Reserved. 85
Synology Surveillance Station Web API
2.3.7 SYNO.SurveillanceStation.Camera.Import
This API provides operations for importing camera
API Name Version Availability
SYNO.SurveillanceStation.Camera.Import 1 Surveillance Station 7.0
Method Name Section Availability
Save 2.3.7.1 4 and onward
ArchiveCamEnum 2.3.7.2 4 and onward
ArchiveEnum 2.3.7.3 4 and onward
2.3.7.1 Save method
Enumerate group information. e.g. Group list and camera list in the group.
Request
Parameter Value Description Availability
camServerId <integer> The privilege type in enumeration groups. 4 and onward
shareName <string> The share folder which contains the archive 4 and onward
archiveName <string> The name of the archive 4 and onward
camlist Array of
<CamImportList
Object>
The detail object of the import 4 and onward
actFromHost <boolean> Is the method called by CMS host 4 and onward
<CamImportList Object> definition:
Key Value Description Availability
channel <string> Channel of the camera 4 and onward
checked <boolean> Indicating if the camera is chosen 4 and onward
enable_quota <boolean> Indicating if the replacing strategy
"rotation_by_space" is enabled
4 and onward
folder <string> Path to the recorded video 4 and onward
id <integer> Camera id 4 and onward
idx <integer> The index in the archive 4 and onward
ipaddr <string> ip address of the camera 4 and onward
model <string> The camera model 4 and onward
name <string> The name of the camera 4 and onward
port <integer> Port of the Camera 4 and onward
rotatequota <integer> Parameter of the replacing strategy if
enable_quota is true
4 and onward
vendor <string> Vendor of the camera 4 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 86
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 Value Description Availability
camera Array of <Camera
Information Object>
The detail object of camera information 4 and onward
keyUsedCnt <integer> 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. 87
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": [
{
"camPath":
"cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"type": 0
Copyright © Synology Inc. All rights Reserved. 88
Synology Surveillance Station Web API
},
{
"camPath":
"cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"type": 1
},
{
"camPath":
"cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"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. 89
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. 90
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"
}
],
"keyUsedCnt": 8
}
2.3.7.2 ArchiveCamEnum method
Enumerating cameras in the selected archive
Request
Parameter Value Description Availability
shareName <string> The share folder which stores archives 4 and onward
archiveName <string> The target archive 4 and onward
serverId <integer> The destination DS which camera imports to 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"
Copyright © Synology Inc. All rights Reserved. 91
Synology Surveillance Station Web API
Response
Key Value Description Availability
camlist Array of <CamImportList
Object>
The imported cameras 4 and onward
Example:
{
"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 Value Description Availability
shareName <string> Folder selected to enumerate the archives 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 Value Description Availability
archivelist Array of <Archive
Object>
The archives inside the folder 4 and onward
<CamImportList Object> definition:
Copyright © Synology Inc. All rights Reserved. 92
Synology Surveillance Station Web API
Key Value Description Availability
display <string> The display name of the archive 4 and onward
value <string> The folder name of the archive 4 and onward
2.3.7.4 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
407 CMS closed.
Copyright © Synology Inc. All rights Reserved. 93
Synology Surveillance Station Web API
2.3.8 SYNO.SurveillanceStation.Camera.Wizard
This API provides Saving/Editing operations for camera
API Name Version Availability
SYNO.SurveillanceStation.Camera.Wizard 1 Surveillance Station 7.0
Method Name Section Availability
CheckSDCardSize 2.3.8.1 4 and onward
CheckQuota 2.3.8.2 4 and onward
CamBatAddSaveAll 2.3.8.3 4 and onward
FormatSDCard 2.3.8.4 4 and onward
QuickCreate 2.3.8.5 4 and onward
2.3.8.1 CheckSDCardSize method
Check the available size in SD card
Request
Parameter Value Description Availability
camId <CAMERA_ID> Specified camera ID 4 and onward
host <string> Address of the camera 4 and onward
port <string> Port of the camera 4 and onward
user <string> The user who tries to log in 4 and onward
pass <string> The Correlated password 4 and onward
vendor <string> Vendor of the camera 4 and onward
model <string> Model of the camera 4 and onward
ch <string> Optional.
parameter for decoding real password
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"
Copyright © Synology Inc. All rights Reserved. 94
Synology Surveillance Station Web API
Response
Key Value Description Availability
size <integer> The remaining size of the SD card in KB 4 and onward
status <integer> The status of the camera 4 and onward
Example:
{
"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 Value Description Availability
iKeyTotal <integer> Total amount of licence in the CMS system 4 and onward
iKeyUsed <integer> Used amount of licence in the CMS system 4 and onward
localCamNum <integer> Used amount of licence in the local DS 4 and onward
localMaxCamNum <integer> The maximal number of camera that can be
mount at current platform
4 and onward
Example:
{
"localMaxCamNum": 10,
"iKeyUsed": 2,
"iKeyTotal": 12,
"localCamNum": 0
}
Copyright © Synology Inc. All rights Reserved. 95
Synology Surveillance Station Web API
2.3.8.3 CamBarAddSaveAll method
This API saves the configuration from batch add
Request
Parameter Value Description Availability
camServerId <integer> The DS id on which cameras mounted 4 and onward
data <CamBatAdd Object> The data of To-Be-Added cameras 4 and onward
<CamBatAdd Object> definition:
Key Value Description Availability
camList Array of <CamCreate
Object>
The list of To-Be-Added cameras 4 and onward
tvStandard <string> Standard of the input video 4 and onward
camMountType <string> How camera is mounted
0: CEILING
1: WALL
2: FLOOR
4 and onward
camChannel <string> Channel of the output video 4 and onward
name <string> The type of the creation 4 and onward
<CamCreate Object> definition:
Key Value Description Availability
vendor <string> Vendor of the camera 4 and onward
model <string> Model of the camera 4 and onward
ip <string> IP address of the camera 4 and onward
port <integer> port of the camera 4 and onward
username <string> The user trying to access the camera 4 and onward
password <string> Password of the user 4 and onward
name <string> The name of the camera stored in the
database
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"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-E-
001", "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":
Copyright © Synology Inc. All rights Reserved. 96
Synology Surveillance Station Web API
""}&version="1"&method="CamBatAddSaveAll"
Response
Key Value Description Availability
pid <integer> The process id for other API to trace the
creation process
4 and onward
Example:
{
"pid": 3585
}
2.3.8.4 FormatSDCard method
Format the SD card in the specified camera which offers edge storage service
Request
Parameter Value Description Availability
camId <CAMERA_ID> Specified camera ID 4 and onward
host <string> Address of the camera 4 and onward
port <string> Port of the camera 4 and onward
user <string> The user who tries to log in 4 and onward
pass <string> The Correlated password 4 and onward
vendor <string> Vendor of the camera 4 and onward
model <string> Model of the camera 4 and onward
ch <string> Optional.
parameter for decoding real password
4 and onward
timeout integer
Setting the expired time in seconds
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 Value Description Availability
result <integer> The occupied space in the SD card 4 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 97
Synology Surveillance Station Web API
{
"result": 0
}
2.3.8.5 QuickCreate method
This API provides the capability of quick-creating single camera
Request
Parameter Value Description Availability
camServerId <integer> The DS id on which this camera mounted 4 and onward
actFromHost <boolean> Indicating if the api is called from CMS host 4 and onward
camStreamingType <string> The streaming protocol of the camera 4 and onward
camName <string> User-defined name of the camera 4 and onward
camIP <string> IP address of the camera 4 and onward
camPort <string> Port of the camera 4 and onward
camVendor <string> Vendor of the camera 4 and onward
camModel <string> Model name of the camera 4 and onward
camMountType <string>
How camera is mounted, for example, on
the wall, ceiling
4 and onward
camChannel <string>
Channel number of the camera
4 and onward
camVideoType <string>
Video type of the camera
4 and onward
camAudioType <string>
Indicating audio type
0: UNKNOWN
1: PCM
2: G711
3: G726
4: AAC
5: AMR
4 and onward
camSourcePath <string>
Path of recorded videos
4 and onward
camUserName <string>
The input camera user
4 and onward
camPassWord <string>
The input camera password
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
Copyright © Synology Inc. All rights Reserved. 98
Synology Surveillance Station Web API
Key Value Description Availability
camId <CAMERA_ID> The remaining size of the SD card in KB 4 and onward
Camera Array of <Camera
Information Object>
The added camera object 4 and onward
keyUsedCnt <integer> The status of the camera 4 and onward
Example:
{
"camId": 80,
"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",
Copyright © Synology Inc. All rights Reserved. 99
Synology Surveillance Station Web API
"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": [
{
"camPath":
"cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"type": 0
},
{
"camPath":
"cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2Rw",
"fps": 15,
Copyright © Synology Inc. All rights Reserved. 100
Synology Surveillance Station Web API
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"type": 1
},
{
"camPath":
"cnRzcDovL2FkbWluOnN5bm8xMjM0QDEwLjE3LjUyLjIwOTo1NTQvbGl2ZTEuc2Rw",
"fps": 15,
"quality": "5",
"resolution": "2592x1944",
"stmNo": 1,
"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",
Copyright © Synology Inc. All rights Reserved. 101
Synology Surveillance Station Web API
"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
},
"enabled": true,
"analyticsSens": 1,
"analyticsWidth": 0,
"recCbrBitrate": 1000,
Copyright © Synology Inc. All rights Reserved. 102
Synology Surveillance Station Web API
"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"
}
],
"keyUsedCnt": 8
}
2.3.8.6 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
407 CMS closed.
Copyright © Synology Inc. All rights Reserved. 103
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 Version Availability
SYNO.SurveillanceStation.PTZ 1 Surveillance Station 6.0-2337
2 Surveillance Station 6.1
3 Surveillance Station 6.3
Method Name Section Availability
Move 2.3.9.1 1 and onward
Zoom 2.3.9.2 1 and onward
ListPreset 2.3.9.3 1 and onward
GoPreset 2.3.9.4 1 and onward
ListPatrol 2.3.9.5 1 and onward
RunPatrol 2.3.9.6 2 and onward
Focus 2.3.9.7 3 and onward
Iris 2.3.9.8 3 and onward
AutoFocus 2.3.9.9 3 and onward
AbsPtz 2.3.9.10 3 and onward
Home 2.3.9.11 5 and onward
AutoPan 2.3.9.12 5 and onward
ObjTracking 2.3.9.13 5 and onward
2.3.9.1 Move method
Copyright © Synology Inc. All rights Reserved. 104
Synology Surveillance Station Web API
Control the PTZ camera to move its lens.
Request
Parameter Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 1 and onward
direction up,
down,
left,
right,
dir_n
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]
3 and onward
speed <integer> Optional.
1 to 5
1 slowest
5 fastest
3 and onward
moveType Start,
Stop
Optional.
Start continous move
Stop continous move
3 and onward
Parameter Description
dir_n 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 Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 1 and onward
control in,
out
Zoom control.
in: Make camera to zoom in.
out: Make camera to zoom out.
1 and onward
moveType Start, Optional. 3 and onward
Copyright © Synology Inc. All rights Reserved. 105
Synology Surveillance Station Web API
Stop Start continous move
Stop continous move
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
cameraId <CAMERA_ID> Unique camera ID. 1 and onward
offset <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
1 and onward
limit <integer> Optional.
Number of presets to be returned.
If not specified, return presets to the end of
preset list.
1 and onward
Example:
GET /webapi/entry.cgi?
api=SYNO.SurveillanceStation.PTZ&method=ListPreset&version=1&offset=10&limit=3&cameraId=10
Response
Key Value Description Availability
total <integer> The number of total presets. 1 and onward
offset <integer> The shifted offset in the total result. 1 and onward
presets Array of <Preset Object> The preset list of the target camera. 1 and onward
<Preset Object> definition:
Key Value Description Availability
id <PRESET_ID> Unique preset ID. 1 and onward
name <string> Preset name. 1 and onward
Example:
{
Copyright © Synology Inc. All rights Reserved. 106
Synology Surveillance Station Web API
“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
cameraId <CAMERA_ID> Unique camera ID. 1 and onward
presetId <PRESET_ID> Unique preset ID. 1 ~ 3
position <PRESET_POS_INDEX> Unique preset position index. 4 and onward
speed <PRESET_SPEED> Go preset speed. 4 and onward
type <PRESET_TYPE> Preset type. 0 for normal preset, and 1 for home
preset.
4 and onward
isPatrol <boolean> Whether the command is to trigger preset in
patrol or not
4 and onward
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
Copyright © Synology Inc. All rights Reserved. 107
Synology Surveillance Station Web API
Enumerate the patrol list of a PTZ camera.
Request
Parameter Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 1 and onward
offset <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
1 and onward
limit <integer> Optional.
Number of patrols to be returned.
If not specified, list patrols to the end of patrol
list.
1 and onward
Example:
GET /webapi/entry.cgi?
api=SYNO.SurveillanceStation.PTZ&method=ListPatrol&version=1&offset=10&limit=2&cameraId=10
Response
Key Value Description Availability
total <integer> The number of total patrols. 1 and onward
offset <integer> The shifted offset in the total result. 1 and onward
patrols Array of <Patrol Object> The patrol list of the target camera. 1 and onward
<Patrol Object> definition:
Key Value Description Availability
id <PATROL_ID> Unique patrol ID. 1 and onward
name <string> Patrol name. 1 and onward
stayTime 5, 10, 15, 20, 25, 30, 35,
40, 45, 50, 55, 60
The stay time of one preset position (seconds). 1 and onward
sequence 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]
Copyright © Synology Inc. All rights Reserved. 108
Synology Surveillance Station Web API
}
]
}
2.3.9.6 RunPatrol method
Force the camera to execute the specific patrol.
Request
Parameter Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 2 and onward
patrolId <PATROL_ID> Unique patrol ID. 2 and onward
Example:
GET /webapi/entry.cgi?
api=SYNO.SurveillanceStation.PTZ&method=RunPatrol&version=2&cameraId=10&patrolId=11
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 Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 3 and onward
control In,
out
Focus control.
in: Make camera to focus in.
out: Make camera to focus out.
3 and onward
moveType Start,
Stop
Optional.
Start continous move
Stop continous move
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
Copyright © Synology Inc. All rights Reserved. 109
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.9.8 Iris method
Control the camera to iris in or iris out.
Request
Parameter Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 3 and onward
control in,
out
Iris control.
in: Make camera to iris in.
out: Make camera to iris out.
3 and onward
moveType Start,
Stop
Optional.
Start continous move
Stop continous move
3 and onward
Example:
GET /webapi/entry.cgi?
api=SYNO.SurveillanceStation.PTZ&method=Iris&version=3&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.9 AutoFocus method
Let camera adjust its focus automatically.
Request
Parameter Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 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 Value Description Availability
Copyright © Synology Inc. All rights Reserved. 110
Synology Surveillance Station Web API
cameraId <CAMERA_ID> Unique camera ID. 3 and onward
posX <integer> [0 to 640]
Absolutely position in horizontal-axis on screen.
> 320: move right
< 320: move left
3 and onward
posY <integer> [0 to 480]
Absolutely position in vertical-axis on screen.
>240: move up
<240: 240 move down
3 and onward
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.
2.3.9.11 Home method
Move the camera PTZ to Home position.
Request
Parameter Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 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 Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 5 and onward
moveType <string> Optional.
Start or Stop camera auto pan, default to start.
"Step": Start
"Stop": Stop
5 and onward
Copyright © Synology Inc. All rights Reserved. 111
Synology Surveillance Station Web API
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 Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 5 and onward
moveType <string> Optional.
Start or Stop object tracking, default to start.
"Step": Start
"Stop": Stop
5 and onward
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 Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
Copyright © Synology Inc. All rights Reserved. 112
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 Version Availability
SYNO.SurveillanceStation.ExternalRecording 1 Surveillance Station 6.0-2337
2 Surveillance Station 6.1
Method Name Section Availability
Record 2.3.10.1 1 and onward
2.3.10.1 Record method
Start or stop external recording of a camera.
Request
Parameter Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 1 and onward
action start,
stop
Start or stop external recording. 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 Value Description Availability
success <boolean> Whether starting/stopping recording is
successful or not.
2 and onward
2.3.10.2 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
Copyright © Synology Inc. All rights Reserved. 113
Synology Surveillance Station Web API
2.3.11 SYNO.SurveillanceStation.Recording
This API provides method to query recording information.
API Name Version Availability
SYNO.SurveillanceStation.Recording 1 Surveillance Station 6.0-2337
3 Surveillance Station 6.3
4 Surveillance Station 7.0
6 Surveillance Station 8.0
Method Name Section Availability
List 2.3.11.1 6 and onward
Delete 2.3.11.2 6 and onward
DeleteFilter 2.3.11.3 3 and onward
DeleteAll 2.3.11.4 3 and onward
ApplyAdvanced 2.3.11.5 4 and onward
CountByCategory 2.3.11.6 4 and onward
Keepalive 2.3.11.7 4 and onward
Trunc 2.3.11.8 4 and onward
LoadAdvanced 2.3.11.9 4 and onward
LockFilter 2.3.11.10 4 and onward
UnLock 2.3.11.11 6 and onward
UnLockFilter 2.3.11.12 4 and onward
Lock 2.3.11.13 6 and onward
Download 2.3.11.14 6 and onward
CheckEventValid 2.3.11.15 4 and onward
Stream 2.3.11.16 6 and onward
RangeExport 2.3.11.17 6 and onward
GetRangeExportProgress 2.3.11.18 6 and onward
OnRangeExportDone 2.3.11.19 6 and onward
2.3.11.1 List method
Query event list by specific filter conditions.
Request
Parameter Value Description Availability
offset <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
6 and onward
limit <integer> Optional.
Number of recordings to be returned.
If not specified, return recordings to the end of recording
list.
6 and onward
cameraIds <string> Optional.
The list of <CAMERA_ID> to be queried concatenated by “,”.
If not specified, this parameter will be ignored and get all
6 and onward
Copyright © Synology Inc. All rights Reserved. 114
Synology Surveillance Station Web API
related events.
fromTime <integer> Optional.
Query start time.
If not specified, the default value is 0.
6 and onward
toTime <integer> Optional.
Query stop time.
If not specified, the default value is 0.
6 and onward
dsId <integer> Optional.
The owner ds id of queried recordings.
6 and onward
mountId <integer> Optional.
The mount id of queried recording.
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 Value Description Availability
total <integer> The number of total recordings. total
recordings Array of <recordings> List of the queried recordings. recordings
dsId <integer> The belonged ds id of queried recordings. dsId
<recordings> definition:
Key Value Description
id
<integer> The id of the recording
videoCodec <integer> The video codec of the recording.
0 - Unknown
1 - MJPEG
2 - MPEG4
3 - H264
5 - MXPEG
6 - H265
7 - H264+
audioCodec <integer> 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)
height <integer> The image height of the recording.
width <integer> The image width of the recording.
cameraId <integer> The belonged camera id of the recording.
cameraName <integer> The belonged camera name of the recording.
sizeByte <integer> The size of the recording.
filePath <integer> The file path of the recording.
Copyright © Synology Inc. All rights Reserved. 115
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. 116
Synology Surveillance Station Web API
Request
Parameter Value Description Availability
idList <string> The list of recording id to be deleted
concatenated by ",".
6 and onward
dsId <integer> Optional.
The owner ds id of recording to be deleted.
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 Value Description Availability
reason <string> 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
6: External Recording
7: Analytics Recording
8: Edge Recording
9: Action Rule Recording
10: Advanced Continuous
3 and onward
cameraIds <string> Optional.
The list of <Camera ID> to be queried concatenated by “,”.
If not specified, this parameter will be ignored and get all
related events.
3 and onward
fromTime <timestamp> Optional.
Query start time.
If not specified, this parameter will be ignored and get all
related events.
3 and onward
toTime <timestamp> Optional. 3 and onward
Copyright © Synology Inc. All rights Reserved. 117
Synology Surveillance Station Web API
Query stop time.
If not specified, this parameter will be ignored and get all
related events.
locked <integer> Query locked. 4 and onward
evtSrcType 0,
1,
2,
3
Optional.
The filtered source.
0: None
1: Local
2: Recording Server
3: Mount
If not specified, the default value is 0.
4 and onward
evtSrcId <integer> CONDITIONAL "depend": Param("evtSrcType").valid()
The specific slave ds or mount id.
If not specified, the default value is -1.
4 and onward
blIncludeSnaps
hot
<boolean> Include snapshot or not.
If not specified, the default value is false.
4 and onward
includeAllCam <boolean> Include all camera or not.
If not specified, the default value is false.
4 and onward
from_end <integer> Time from end.
If not specified, the default value is 0.
4 and onward
from_start <integer> Time from start.
If not specified, the default value is 0.
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. 118
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 Availability
rotateUnrecogCam
<boolean> Optional.
Rotate unrecognized camera nor not.
If not specified, the default value will be false.
4 and onward
Example:
GET /webapi/entry.cgi?
rotateUnrecogCam=true&api="SYNO.SurveillanceStation.Recording"&version="4"&method="ApplyAdvanc
ed"
Response
Key Value Description Availability
rotateUnrecogCam <boolean> Optional.
Rotate unrecognized camera nor not.
If not specified, the default value will be false.
4 and onward
Example:
{
"rotateUnrecogCam": true
}
2.3.11.6 CountByCategory method
Get the count number of Event in category.
Request
Parameter Value Description Availability
offset <integer> Optional.
Offset of timezone.
If not specified, the offset will be 0.
4 and onward
limit <integer> Optional.
Number of events to be returned.
If not specified, return events to the end of event list.
4 and onward
reason <string> Optional.
The list of recording mode to be queried concatenated by
",".
4 and onward
Copyright © Synology Inc. All rights Reserved. 119
Synology Surveillance Station Web API
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
cameraIds <string> Optional.
The list of <Camera ID> to be queried concatenated by “,”.
If not specified, this parameter will be ignored and get all
related events.
4 and onward
fromTime <integer> Optional.
Query start time.
If not specified, the default value is 0.
4 and onward
toTime <integer> Optional.
Query stop time.
If not specified, the default value is 0.
4 and onward
locked <integer> Query locked. 4 and onward
evtSrcType 0,
1,
2,
3
Optional.
The filtered source.
0: None
1: Local
2: Recording Server
3: Mount
If not specified, the default value is 0.
4 and onward
evtSrcId <integer> CONDITIONAL "depend": Param("evtSrcType").valid()
The specific slave ds or mount id.
If not specified, the default value is -1.
4 and onward
blIncludeSnaps
hot
<boolean> Include snapshot or not.
If not specified, the default value is false.
4 and onward
includeAllCam <boolean> Include all camera or not.
If not specified, the default value is false.
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. 120
Synology Surveillance Station Web API
Response
Key Value Description Availability
date Array of <day_cnt> Number of Event of each day.
-1: Total number count.
yyyy/mm/dd: Number count of yyyy/mm/dd.
(Ex:1990/05/09)
4 and onward
evt_cam Array of
<evt_cam_ds_info>
Information of event camera. 4 and onward
total <integer> Total number of Event. 4 and onward
<day_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 4 and onward
yyyy/mm/dd <time_cnt> Number count of log of yyyy/mm/dd.
(Ex:1990/05/09)
4 and onward
<time_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 4 and onward
am <integer> Number count of log in am. 4 and onward
pm <integer> Number count of log in pm. 4 and onward
<evt_cam_ds_info> definition:
Key Value Description Availability
-1 <integer> Total number count. 4 and onward
X <evt_cam_info> X is the local DS id. 4 and onward
<evt_cam_info> definition:
Key Value Description Availability
-1 <integer> Total number count. 4 and onward
CAMERA_NAME <integer> CAMERA_NAME is the name of camera. (Ex:
"39-FD8171-001":98)
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. 121
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 Value Description Availability
idList Array of <idList> Optional.
Event id lists.
4 and onward
<idList> definition:
Parameter Value Description Availability
id <string> Unique camera ID with Unique event ID.
"CAMERA_ID : EVENT_ID"
3 and onward
dsId <integer> Event's owner dsId 3 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 122
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 Description Availability
rotateUnrecogCam <boolean> Rotate unrecognized camera nor not. 4 and onward
Example:
{
"rotateUnrecogCam": true
}
2.3.11.10 LockFilter method
Lock the selected events in filter.
Request
Parameter Value Description Availability
reason <string> 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
4 and onward
Copyright © Synology Inc. All rights Reserved. 123
Synology Surveillance Station Web API
6: External Recording
7: Analytics Recording
8: Edge Recording
9: Action Rule Recording
10: Advanced Continuous
cameraIds <string> Optional.
The list of <Camera ID> to be queried concatenated by “,”.
If not specified, this parameter will be ignored and get all
related events.
4 and onward
fromTime <integer> Optional.
Query start time.
If not specified, the default value is 0.
4 and onward
toTime <integer> Optional.
Query stop time.
If not specified, the default value is 0.
4 and onward
locked <integer> Query locked. 4 and onward
evtSrcType 0,
1,
2,
3
Optional.
The filtered source.
0: None
1: Local
2: Recording Server
3: Mount
If not specified, the default value is 0.
4 and onward
evtSrcId <integer> 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 Value Description Availability
idList <string> The list of recording id to be unlocked concatenated by
",".
6 and onward
dsId <integer> Optional. 6 and onward
Copyright © Synology Inc. All rights Reserved. 124
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 Value Description Availability
reason <string> 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
6: External Recording
7: Analytics Recording
8: Edge Recording
9: Action Rule Recording
10: Advanced Continuous
4 and onward
cameraIds <string> Optional.
The list of <Camera ID> to be queried concatenated by “,”.
If not specified, this parameter will be ignored and get all
related events.
4 and onward
fromTime <integer> Optional.
Query start time.
If not specified, the default value is 0.
4 and onward
toTime <integer> Optional.
Query stop time.
If not specified, the default value is 0.
4 and onward
locked <integer> Query locked. 4 and onward
evtSrcType 0,
1,
2,
Optional.
The filtered source.
0: None
4 and onward
Copyright © Synology Inc. All rights Reserved. 125
Synology Surveillance Station Web API
3
1: Local
2: Recording Server
3: Mount
If not specified, the default value is 0.
evtSrcId <integer> 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 Value Description Availability
idList <string> The list of recording id to be locked concatenated by ",". 6 and onward
dsId <integer> Optional.
The belonged ds id of recordings to be locked.
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 Value Description Availability
id <integer> Id of recording. 6 and onward
Copyright © Synology Inc. All rights Reserved. 126
Synology Surveillance Station Web API
If not specified, the default value will be 0.
mountId <integer> Optional.
Mount id of recording.
If not specified, the default value will be 0.
6 and onward
offsetTimeMs <integer> Optional.
The start time offset of the download recording.
6 and onward
playTimeMs <integer> Optional.
The duration of the download recording.
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 Value Description Availability
eventId <integer> Optional.
Id of event.
If not specified, the default value will be 0.
4 and onward
chkDetail <boolean> Optional.
Default value: true.
Check camera playback privilege and recording existence.
4 and onward
mountId <integer> Optional.
Default value: 0.
Check if mount status normal for mounted recording.
4 and onward
dsId <integer> Optional.
Default value: 0.
Check if recording server status normal for recording on
slave ds.
4 and onward
Example:
GET /webapi/entry.cgi?
eventId=5753&version="4"&api="SYNO.SurveillanceStation.Recording"&method="CheckEventValid"
Copyright © Synology Inc. All rights Reserved. 127
Synology Surveillance Station Web API
Response
Key Value Description Availability
itemStatus <integer> If recording playable.
0: Normal
1: Not Exist
2: No Privilege
4 and onward
Example:
{
"itemStatus": 0
}
2.3.11.16 Stream method
Play a specific recording.
Request
Parameter Value Description Availability
recordingId <integer> Optional.
Id of recording.
6 and onward
dsId <integer> Optional.
Owner ds id of recording.
6 and onward
mountId <integer> Optional.
Mount id of recording.
6 and onward
alertRecording <boolean> Optional.
True if played recording is triggered by live view alert.
The default value is false.
6 and onward
videoCodec <integer> 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+
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. 128
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 Description
Accept-Ranges Let clients know that server accept byte range request.
Content-Length The data length of the data chunk actually returned.
Content-Range The requested range of byte for the data in the body.
Content-Type 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. 129
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 Value Description Availability
camId <integer> Id of camera. 6 and onward
fromTime <integer> The start of UTC time range. 6 and onward
toTime <integer> The end of UTC time range. 6 and onward
fileName <string> Download file name without file extension.
Use for included recording name if zip file needed.
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 Value Description Availability
dlid <integer> The download id of this range export task. 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 Value Description Availability
dlid <integer> Response of RangeExport method. 6 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Recording"&method="GetRangeExportProgress"&version=6&dlid=20069
Copyright © Synology Inc. All rights Reserved. 130
Synology Surveillance Station Web API
Response
Name Value Description Availability
progress <integer> The progress of target RangeExport method
task.
Receive -1 if task failed.
6 and onward
fileExt <string> "zip", “mp4" or empty.
Reval response data of OnRangeExportDone
method if progress is 100.
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 Value Description Availability
dlid <integer> Response of RangeExport method. 6 and onward
fileName <string> Download file name without file extension.
Use for zip file name if zip file needed.
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 Description
400 Execution failed.
401 Parameter invalid.
405 CMS server connection failed.
414 Some events not exist.
Copyright © Synology Inc. All rights Reserved. 131
Synology Surveillance Station Web API
439 Too many items selected.
Copyright © Synology Inc. All rights Reserved. 132
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 Version Availability
SYNO.SurveillanceStationEvent.Recording
.Export
1 Surveillance Station 7.0
Method Name Section Availability
Load 2.3.12.1 1 and onward
CheckName 2.3.12.2 1 and onward
CamEnum 2.3.12.3 1 and onward
CheckAvailableExport 2.3.12.4 1 and onward
Save 2.3.12.5 1 and onward
GetEvtExpInfo 2.3.12.6 1 and onward
2.3.12.1 Load method
Handle load event export.
Request
Parameter Value Description Availability
start <integer> Optional.
The offset to be shifted in the total result.
If not specified, the default value will be 0.
1 and onward
limit <integer> Optional.
Number of Visual Stations to be returned.
If not specified, the default value will be 0.
1 and onward
Example:
GET /webapi/entry.cgi?
start=0&api="SYNO.SurveillanceStation.Recording.Export"&limit=100&version="1"&method="Load"
Response
Key Value Description Availability
evtexptotal <integer> Total number of export task. 1 and onward
exporttask Array of
<exporttask_info>
Information of export task. 1 and onward
<exporttask_info> definition:
Key Value Description Availability
id <integer>
Id of export task.
1 and onward
Copyright © Synology Inc. All rights Reserved. 133
Synology Surveillance Station Web API
name <string>
Name of export task.
1 and onward
srcDsId
<integer>
Id of source DS.
1 and onward
dstDsId
<integer>
Id of destination DS.
1 and onward
dstdir
<string>
Directory of destination.
1 and onward
start_time
<integer>
Start time of event.
1 and onward
stop_time
<integer>
Stop time of event.
1 and onward
status
<integer>
Status of export task.
1 and onward
total_count
<integer>
Total count number of events.
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.12.2 CheckName method
Check the name of export event.
Request
Parameter Value Description Availability
dsId <integer> Optional.
DS Id.
If not specified, the default value will be 0.
1 and onward
name <string> Optional.
Name of the export event.
1 and onward
share <string> Optional.
Export destination.
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. 134
Synology Surveillance Station Web API
Response
Key Value Description Availability
conflict <integer> The current status of the VS.
0: None
1: Overwrite
2: Cannot overrite.
1 and onward
Example:
{
"conflict": 0
}
2.3.12.3 CamEnum method
Get list information of all cameras.
Request
Parameter Value Description Availability
dsId <integer> Optional.
DS Id.
If not specified, the default value will be -1.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Recording.Export"&dsId=0&version="1"&method="CamEnum"
Response
Key Value Description Availability
camlist
Array of
<camlist_info>
Camera list.
1 and onward
<camlist_info>definition:
Key Value Description Availability
checked <boolean> Is the camera checked or not. 1 and onward
id <integer> Id of camera. 1 and onward
idOnRecServ <integer> Id of camera on recording server. 1 and onward
enable <boolean> Is the mount event enabled or not. 1 and onward
name <string> Name of camera. 1 and onward
ipaddr <string> IP address of camera. 1 and onward
status <integer> Status of mount event.
0: Normal
1: Disable
1 and onward
Copyright © Synology Inc. All rights Reserved. 135
Synology Surveillance Station Web API
2: Unreachable
3: Server disconnected
4: Configuring
5: Deleting
deleted <boolean> Is the camera being deleted. 1 and onward
Example:
{
"camlist": [
{
"status": 3,
"enable": true,
"checked": false,
"name": "M1031-W",
"deleted": false,
"idOnRecServ": 0,
"ipaddr": "10.13.22.115",
"id": 32
}
]
}
2.3.12.4 CheckAvailableExport method
Check if the destination folder is available for export or not.
Request
Parameter Value Description Availability
freeSize <integer> Optional.
Free size (MB).
If not specified, the default value will be 0.
1 and onward
startTime <integer> Optional.
Start time of event.
If not specified, the default value will be 0.
1 and onward
stopTime <integer> Optional.
Stop time of event.
If not specified, the default value will be 0.
1 and onward
camIdList <string> Optional.
List of camera Id.
1 and onward
Example:
GET /webapi/entry.cgi?
Copyright © Synology Inc. All rights Reserved. 136
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 Value Description Availability
result <integer> The feasibility of exporting target events.
0: Normal
1: Error
2: No event
3: Oversize
1 and onward
Example:
{
"result": 0
}
2.3.12.5 Save method
Handle save event export.
Request
Parameter Value Description Availability
name <string> Name of export task. 1 and onward
srcDsId <integer> Optional.
Id of source DS.
If not specified, the default value will be 0.
1 and onward
dstDsId <integer> Optional.
Id of destination DS.
If not specified, the default value will be 0.
1 and onward
dstdir <string> Directory of destination. 1 and onward
freesize <integer> Optional.
Free size (MB).
If not specified, the default value will be 0.
1 and onward
start_time <integer> Optional.
Start time of event.
If not specified, the default value will be 0.
1 and onward
stop_time <integer> Optional.
Stop time of event.
If not specified, the default value will be 0.
1 and onward
isoverwrite <integer> Remove the conflict dir with user's confirm.
0: false
1: true
1 and onward
camlistid <string> List of camera Id. 1 and onward
Copyright © Synology Inc. All rights Reserved. 137
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 Value Description Availability
startTime <integer> Optional.
Start time of event.
If not specified, the default value will be 0.
1 and onward
stopTime <integer> Optional.
Stop time of event.
If not specified, the default value will be 0.
1 and onward
camIdList <string> List of camera Id. 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 Value Description Availability
camEvtInfoList Array of
<camEvtInfoList_info>
Information list of target events. 1 and onward
eventIdList <string> List of event Id.
fisheyeIdList <string> List of fisheye Id.
totalEvtCnt <integer> Total count number of events.
totalEvtSize <integer> Total size of events. (MB)
<camEvtInfoList_info>definition:
Key Value Description Availability
camEvtList Array of
<camEvtList_info>
Information of target camera event. 1 and onward
camId <integer> Id of camera. 1 and onward
Copyright © Synology Inc. All rights Reserved. 138
Synology Surveillance Station Web API
camStoragePath <string> Storage path of the camera. 1 and onward
<camEvtList_info>definition:
Key Value Description Availability
path <string> Detail path of target camera event. 1 and onward
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 Description
400 Execution failed.
401 Parameter invalid.
405 CMS server connection failed.
414 Some events not exist.
439 Too many items selected.
Copyright © Synology Inc. All rights Reserved. 139
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 Version Availability
SYNO.SurveillanceStation.Recording.Mount 1 Surveillance Station 7.0
Method Name Section Availability
Load 2.3.13.1 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 Value Description Availability
eventmount Array of
<mount_element>
Mount event. 1 and onward
total <integer> Total number of mount event. 1 and onward
<mount_element> definition:
Key Value Description Availability
camlist Array of <cam_info> Camera List. 1 and onward
dsId <integer> Id of DS. 1 and onward
enable <boolean> Is the mount event enabled or not. 1 and onward
expid <string> Export info. 1 and onward
id <integer> Id of mount event. 1 and onward
name <string> Name of mount event. 1 and onward
start_time <integer> Start time of mount event. 1 and onward
status <integer> Status of mount event.
0: Normal
1: Disable
2: Unreachable
3: Server disconnected
4: Configuring
5: Deleting
1 and onward
stop_time <integer> Stop time of mount event. 1 and onward
Copyright © Synology Inc. All rights Reserved. 140
Synology Surveillance Station Web API
<cam_info> definition:
Key Value Description Availability
analyticsDirection <integer> Analytics type of liveview.
0: One way direction in analytics
1: Two way direction in analytics
1 and onward
analyticsDwellTime <integer> Setting of dwelling time in liveview
analytics.
1 and onward
analyticsObjSize <integer> Setting of object size in liveview analytics.
0: One forth object size
1: One ninth object size
2: One sixteenth object size
1 and onward
analyticsRegion <string> Setting of analytics Region in liveview
analytics.
0: Unset
1: Set
1 and onward
analyticsSens <integer> Analytics type of liveview.
0: Low
1: Medium
2: High
1 and onward
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
1 and onward
camMountType <integer> Type of mounted camera.
0: ceiling
1: wall
2: floor
3: CNT
1 and onward
feRegionList Array of <feRegion_info> List of fisheye region. 1 and onward
fisheyeType <integer> Type of fisheye.
0: no fisheye
other than 0: one of vendor
1 and onward
id <integer> Camera Id. 1 and onward
name <string> Camera name. 1 and onward
<feRegion_info> definition:
Key Value Description Availability
camId <integer> Camera Id. 1 and onward
id <integer> Id of fisheye region. 1 and onward
name <string> Name of fisheye region. 1 and onward
posX <integer> Position X of fisheye region. 1 and onward
posY <integer> Position Y of fisheye region. 1 and onward
type <integer> Type of fisheye region. 1 and onward
Copyright © Synology Inc. All rights Reserved. 141
Synology Surveillance Station Web API
-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 <integer> 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. 142
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. 143
Synology Surveillance Station Web API
}
2.3.13.2 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
405 CMS server connection failed.
414 Some events not exist.
439 Too many items selected.
Copyright © Synology Inc. All rights Reserved. 144
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 Version Availability
SYNO.SurveillanceStation.CMS 1 Surveillance Station 7.0
Method Name Section Availability
Redirect
2.3.14.1 1 and onward
ModifySharePriv
2.3.14.2 1 and onward
ApplyOption
2.3.14.3 1 and onward
GetInfo
2.3.14.4 1 and onward
DoSyncData
2.3.14.5 1 and onward
CheckSambaEnabled
2.3.14.6 1 and onward
BatCheckSambaService
2.3.14.7 1 and onward
GetMDSnapshot
2.3.14.8 1 and onward
GetCMSStatus
2.3.14.9 1 and onward
EnableSamba
2.3.14.10 1 and onward
NotifyCMSBreak
2.3.14.11 1 and onward
LockSelf
2.3.14.12 1 and onward
2.3.14.1 Redirect method
Redirect the webAPI to target DS.
Request
Parameter Value Description Availability
dsId <integer>
Optional.
DS Id.
1 and onward
webAPI Array of
<webAPI_info>
Optional.
Webapi.
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. 145
Synology Surveillance Station Web API
2.3.14.2 ModifySharePriv method
Modify share privilege.
Request
Parameter Value Description Availability
privSet <integer> Optional.
Privilege setting.
If not specified, the default value will be 0.
1 and onward
shareName <string> Optional.
Name of share folder.
1 and onward
Example:
GET /webapi/entry.cgi?
shareName=""&privSet=0&api="SYNO.SurveillanceStation.CMS"&version="1"&method="ModifySharePriv"
Response
Key Value Description Availability
privOrg <integer> Original privilege setting. 1 and onward
Example:
{
"privOrg": 0
}
2.3.14.3 ApplyOption method
Apply the option setting.
Request
Parameter Value Description Availability
central_auto_video_relay <boolean>
Optional.
Is auto video relay enabled or not.
If not specified, the default value will be false.
1 and onward
central_enable <boolean>
Optional.
Is central enable or not.
If not specified, the default value will be false.
1 and onward
central_mode <string> Optional.
Central CMS mode.
0: Disable
1: Host server
1 and onward
Copyright © Synology Inc. All rights Reserved. 146
Synology Surveillance Station Web API
2: Rec server
central_rec_mask_mode <boolean> Optional.
Prevent other user to change the setting of
recording server.
If not specified, the default value will be false.
1 and onward
central_rec_sync_time <boolean> Optional.
Is the time of recording server syncronized with
host.
If not specified, the default value will be false.
1 and onward
nvr_enable <boolean> Optional.
Is NVR enabled.
If not specified, the default value will be false.
1 and onward
nvr_lang <string> Optional.
Language of NVR.
1 and onward
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 Description Availability
central_auto_vide
o_relay
<boolean> Is auto video relay enabled or not.
1 and onward
central_enable <boolean> Is central enable or not.
1 and onward
central_host_ip <string> IP of paired host.
1 and onward
central_locked <boolean> Is recServer locked or not.
1 and onward
central_mode <string> Central CMS mode.
0: Disable
1: Host server
2: Rec server
1 and onward
central_paired_ho
st_model
<string> Model of paired host.
1 and onward
central_paired_ho
st_name
<string> Name of paired host.
1 and onward
central_rec_mask
_mode
<boolean> Prevent other user to change the setting of
recording server.
1 and onward
central_rec_status <integer> Status of recServer.
1 and onward
Copyright © Synology Inc. All rights Reserved. 147
Synology Surveillance Station Web API
0: normal
1: disable
3: disconnect
central_rec_sync_
time
<boolean> Is the time of recording server syncronized with
host.
1 and onward
confirm_key <string> Confirm key.
1 and onward
enable_video_rela
y
<boolean> Enable video relay or not.
1 and onward
key <string> Key.
1 and onward
nvr_enable <boolean> Is NVR enabled.
1 and onward
nvr_lang <string> Language of NVR.
1 and onward
vs_enable <boolean> Is VisualStation enabled.
1 and onward
success <boolean> Success or not.
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 Value Description Availability
isPolling <boolean> Optional. 1 and onward
Copyright © Synology Inc. All rights Reserved. 148
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 Description Availability
central_auto_vide
o_relay
<boolean> Is auto video relay enabled or not.
1 and onward
central_enable <boolean> Is central enable or not.
1 and onward
central_host_ip <string> IP of paired host.
1 and onward
central_locked <boolean> Is recServer locked or not.
1 and onward
central_mode <string> Central CMS mode.
0: Disable
1: Host server
2: Rec server
1 and onward
central_paired_ho
st_model
<string> Model of paired host.
1 and onward
central_paired_ho
st_name
<string> Name of paired host.
1 and onward
central_rec_mask
_mode
<boolean> Prevent other user to change the setting of
recording server.
1 and onward
central_rec_status <integer> Status of recServer.
0: normal
1: disable
3: disconnect
1 and onward
central_rec_sync_
time
<boolean> Is the time of recording server syncronized with
host.
1 and onward
confirm_key <string> Confirm key.
1 and onward
enable_video_rela
y
<boolean> Enable video relay or not.
1 and onward
key <string> Key.
1 and onward
nvr_enable <boolean> Is NVR enabled.
1 and onward
nvr_lang <string> Language of NVR.
1 and onward
vs_enable <boolean> Is VisualStation enabled.
1 and onward
success <boolean> Success or not.
1 and onward
Copyright © Synology Inc. All rights Reserved. 149
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 Value Description Availability
syncType <integer> Optional.
Privilege setting.
If not specified, the default value will be 0.
1 and onward
syncTargetId <integer> Optional.
Syncronized target DS Id.
If not specified, the default value will be 1.
1 and onward
limit <integer> Optional.
limit in SQL.
If not specified, the default value will be 0.
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. 150
Synology Surveillance Station Web API
remainCnt <integer> Count number of unsyncronized data. 1 and onward
syncDataList Array of <syncDataList_info> Syncronized data list. 1 and onward
<syncDataList_info> definition
Key Value Description Availability
event_msg <string> Event messeage.
1 and onward
id <integer> Id of Log.
1 and onward
itemId <integer> Id of Item.
1 and onward
level <integer> Level of log message.
1 and onward
logGrp <integer> Group of message.
1 and onward
logType <integer> Type of Log.
1 and onward
timestamp <integer> Time stamp.
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 Value Description Availability
sambaEnabled <boolean> Check Samba of target DS enabled or
not.
1 and onward
Copyright © Synology Inc. All rights Reserved. 151
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 Value Description Availability
dsIdList <string > Optional.
DS Id list.
1 and onward
Example:
GET /webapi/entry.cgi?
dsIdList="3"&api="SYNO.SurveillanceStation.CMS"&version="1"&method="BatCheckSambaService"
Response
Key Value Description Availability
allSambaEnabled <boolean> All Samba enabled or not. 1 and onward
Example:
{
"allSambaEnabled": true
}
2.3.14.8 GetMDSnapshot method
Get encoded single-image snapshot of target camera.
Request
Parameter Value Description Availability
camId <integer> Optional.
Camera Id.
If not specified, the default value will be 0.
1 and onward
Example:
GET /webapi/entry.cgi?
Copyright © Synology Inc. All rights Reserved. 152
Synology Surveillance Station Web API
api="SYNO.SurveillanceStation.CMS"&camId=0&version="1"&method="GetMDSnapshot"
Response
Key Value Description Availability
snapshot <string> Encoded MD snapshot. 1 and onward
Example:
{
"snapshot": (CONTENT OF ENCODED MD SNAPSHOT)
}
2.3.14.9 GetCMSStatus method
Get CMS status.
Request
Parameter Value Description Availability
camId <integer> Optional.
Camera Id.
If not specified, the default value will be 0.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.CMS"&camId=1&version="1"&method="GetCMSStatus"
Response
Key Value Description Availability
CMSEnabled <boolean> The camera is enabled in CMS. 1 and onward
Example:
{
"CMSEnabled": true
}
2.3.14.10 EnableSamba method
Enable Samba service.
Request
Copyright © Synology Inc. All rights Reserved. 153
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 Value Description Availability
locked <boolean> Optional.
Setting of locked recording server or not.
If not specified, the default value will be false.
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. 154
Synology Surveillance Station Web API
2.3.14.13 API Error Code
Code Description
400 Execution failed.
401 Invalid parameter.
415 message connect failed.
Copyright © Synology Inc. All rights Reserved. 155
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 Version Availability
SYNO.SurveillanceStation.CMS.GetDsStatus 1 Surveillance Station 7.0
Method Name Section Availability
EnableCMS
2.3.15.1 1 and onward
UnPair
2.3.15.2 1 and onward
GetFreeSpace
2.3.15.3 1 and onward
Lock
2.3.15.4 1 and onward
Test
2.3.15.5 1 and onward
Logout
2.3.15.6 1 and onward
Pair
2.3.15.7 1 and onward
Login
2.3.15.8 1 and onward
2.3.15.1 EnableCMS method
Enable DS into recording server mode.
Request
Parameter Value Description Availability
adminUsername <string>
Optional.
User name.
If not specified, the default value will be "admin" .
1 and onward
adminPasswd <string> Password.
1 and onward
central_rec_mask_mode <string>
Optional.
Prevent other user to change the setting of
recording server.
If not specified, the default value will be "false" .
1 and onward
central_rec_sync_time <string>
Optional.
Is the time of recording server syncronized with
host.
If not specified, the default value will be "false" .
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. 156
Synology Surveillance Station Web API
Response
Key Value Description Availability
status <integer> 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
1 and onward
Example:
{
"status": 0
}
2.3.15.2 UnPair method
Unpair recording server from the host.
Request
Parameter Value Description Availability
dminUsername <string> Optional.
User name.
If not specified, the default value will be “admin”.
1 and onward
key <string> Optional.
Key.
1 and onward
mac <string> Optional.
1 and onward
Copyright © Synology Inc. All rights Reserved. 157
Synology Surveillance Station Web API
Mac address.
cmsMode <integer> 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 Value Description Availability
freeSizeMb <integer> Free size of memory in MB. 1 and onward
Example:
{
"freeSizeMb": 922467
}
2.3.15.4 Lock method
Handle lock slave ds.
Copyright © Synology Inc. All rights Reserved. 158
Synology Surveillance Station Web API
Request
Parameter Value Description Availability
lock <boolean> Optional.
Lock setting.
If not specified, the default value will be false.
1 and onward
adminUsername <string> Optional.
User name of Host.
If not specified, the default value will be “admin”.
1 and onward
key <string> Optional.
Key of Host.
1 and onward
mac <string> Optional.
Mac address of Host.
1 and onward
masterAuthKey <string> Optional.
Authorized key of Host.
1 and onward
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 Value Description Availability
status <integer> 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
1 and onward
Copyright © Synology Inc. All rights Reserved. 159
Synology Surveillance Station Web API
16: License invalid
Example:
{
"status": 0
}
2.3.15.5 Test method
Get the information of target DS.
Request
Parameter Value Description Availability
slaveDsIp <string> Optional.
IP of slave Ds.
1 and onward
Example:
GET /webapi/entry.cgi?
slaveDsIp=""&api="SYNO.SurveillanceStation.CMS.GetDsStatus"&version="1"&method="Test"
Response
Key Value Description Availability
auth_key
<string>
Authorized Key.
1 and onward
cms_locked
<boolean>
Prevent the changing of settings from
other server.
1 and onward
dsModel
<string>
Model of DS.
1 and onward
keyTotal
<integer>
Total number of key.
1 and onward
keyUsed
<integer>
Used number of key.
1 and onward
licenseList
<string>
List of license.
1 and onward
mac
<string>
Mac address.
1 and onward
status
<integer> Status of slave DS connection.
0: Normal
1: Disable
2: Unauthorized
3: Disconnect
4: Deleted
5: Inaccessible
6: Occupied
7: Configuring
1 and onward
Copyright © Synology Inc. All rights Reserved. 160
Synology Surveillance Station Web API
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
Example:
{
"mac": "0011323CC393",
"dsModel": "DS2015xs",
"cms_locked": false,
"status": 8,
"keyTotal": 0,
"auth_key": "14C0MON392200",
"licenseList": "",
"keyUsed": 0
}
2.3.15.6 Logout method
Handle logout slave ds.
Request
Parameter Value Description Availability
adminUsername <string> Optional.
User name.
1 and onward
key <string> Optional.
Key.
1 and onward
mac <string> Optional.
Mac address.
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. 161
Synology Surveillance Station Web API
Key Value Description Availability
status <integer> 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
1 and onward
Example:
{
"status": 3
}
2.3.15.7 Pair method
Handle pair slave ds.
Request
Parameter Value Description Availability
dsname <string>
Optional.
DS name of Host.
1 and onward
slaveDsIp <string>
Optional.
Slave DS Ip.
1 and onward
port <integer>
Optional.
Port of Host.
If not specified, the default value will be 0.
1 and onward
masterAuthKey <string>
Optional.
Authorized Key of Host.
1 and onward
Copyright © Synology Inc. All rights Reserved. 162
Synology Surveillance Station Web API
model <string>
Optional.
Model of Host.
1 and onward
mac <string>
Optional.
Mac address of Host.
1 and onward
cms_locked <boolean>
Optional.
Prevent the changing of settings from other
server.
If not specified, the default value will be false.
1 and onward
cms_masked <boolean>
Optional.
Prevent other user to change the setting of
recording server.
If not specified, the default value will be false.
1 and onward
cms_sync_time <boolean>
Optional.
Is the time of recording server syncronized with
host.
If not specified, the default value will be false.
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 Value Description Availability
auth_key <string> Authorized Key of slave DS.
1 and onward
mac <string> Mac address of slave DS.
1 and onward
ds_model <string> Model of slave DS.
1 and onward
cookie <string> Cookie.
1 and onward
dp_version <string> Device package version of slave DS.
1 and onward
dsm_version <string> DSM version of slave DS.
1 and onward
serial_num <string> Serial number of slave DS.
1 and onward
ss_version <string> Surveillance Station version of slave DS.
1 and onward
status <integer> Status of slave DS connection.
0: Normal
1: Disable
2: Unauthorized
3: Disconnect
4: Deleted
5: Inaccessible
Copyright © Synology Inc. All rights Reserved. 163
Synology Surveillance Station Web API
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
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"
}
2.3.15.8 Login method
Handle login slave ds.
Request
Parameter Value Description Availability
adminUsername
<string> Optional.
User name of host.
If not specified, the default value will be “admin”.
1 and onward
key
<string> Optional.
Key of host.
1 and onward
mac
<string> Optional.
Mac address of host.
1 and onward
masterAuthKey
<string> Optional.
Authorized key of host.
1 and onward
hostName
<string> Optional. 1 and onward
Copyright © Synology Inc. All rights Reserved. 164
Synology Surveillance Station Web API
Host name.
hostPort
<integer> Optional.
Port of host.
If not specified, the default value will be 0.
1 and onward
ignoreAuthError
<string> Optional.
Ignore Authorized error or not.
If not specified, the default value will be “no”.
1 and onward
hostDisconnect
<boolean> Optional.
Is host disconnected.
If not specified, the default value will be false.
1 and onward
blUpdateVolSpace
<boolean> Optional.
Update Volume space or not.
If not specified, the default value will be false.
1 and onward
enable_rec
<boolean> Optional.
Enable recording server or not.
If not specified, the default value will be false.
1 and onward
cms_locked
<boolean> Optional.
Prevent the changing of settings from other
server.
If not specified, the default value will be true.
1 and onward
cms_masked
<boolean> Optional.
Prevent other user to change the setting of
recording server.
If not specified, the default value will be true.
1 and onward
cms_sync_time
<boolean> Optional.
Is the time of recording server syncronized with
host.
If not specified, the default value will be true.
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 Value Description Availability
cam_count <integer> Number of camera.
1 and onward
camera_info Array of <camera_info_obj> information of cameras.
1 and onward
cms_locked <boolean> Prevent the changing of settings from
other server.
1 and onward
Copyright © Synology Inc. All rights Reserved. 165
Synology Surveillance Station Web API
cms_masked <boolean> Prevent other user to change the
setting of recording server.
1 and onward
cms_sync_time <boolean> Is the time of recording server
syncronized with host.
1 and onward
cookie <string> Cookie.
1 and onward
default_license_c
nt
<integer> Number of default license of slave ds.
1 and onward
dp_version <string> Device package version of slave ds.
1 and onward
dsm_version <string> DSM version of slave ds of slave ds.
1 and onward
serial_num <string> Serial number of slave ds.
1 and onward
ss_version <string> Surveillance Station version of slave ds.
1 and onward
status <integer>
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
1 and onward
<camera_info_obj>
Key Value Description Availability
id <integer> Camera Id.
1 and onward
status <integer> Camera connection status.
0: Unknown
1: Normal
2: Connection fail
3: Unauthorized
1 and onward
Copyright © Synology Inc. All rights Reserved. 166
Synology Surveillance Station Web API
4: Content error
5: Resolution error
6: Activating
7: Stopping
recStatus <integer> Camera recording status.
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
1 and onward
occupied <integer> Occuppied size.
1 and onward
statusFlags <integer> Status flag.
1 and onward
livePort <integer> live port.
1 and onward
livePath <string> 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 Description
400 Execution failed.
401 Invalid parameter.
415 message connect failed.
Copyright © Synology Inc. All rights Reserved. 167
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 Version Availability
SYNO.SurveillanceStation.CMS.SlavedsWizard 1 Surveillance Station 7.0
Method Name Section Availability
Save
2.3.16.1 1 and onward
2.3.16.1 Save method
Handle save slave ds
Request
Parameter Value Description Availability
slavedsName <string>
Optional.
Name of slave Ds.
1 and onward
slavedsModel <string>
Optional.
Model of slave Ds.
1 and onward
slavedsPort <integer>
Optional.
Port of slave Ds.
If not specified, the default value will be 0.
1 and onward
slavedsVersion <string>
Optional.
Surveillance version of slave Ds.
1 and onward
slavedsMaxCamNum <integer>
Optional.
Maximum number of camera of slave Ds.
If not specified, the default value will be -1.
1 and onward
slavedsId <string>
Optional.
Id of slave Ds.
1 and onward
slavedsIP <string>
Optional.
IP of slave Ds.
1 and onward
slavedsEnable <integer>
Optional.
Is slave Ds enabled.
0: false
1: true
If not specified, the default value will be 0.
1 and onward
slavedsCamCnt <integer>
Optional.
Count number of camera in slave Ds.
If not specified, the default value will be -1.
1 and onward
adminUsername <string>
Optional.
Admin username.
1 and onward
Copyright © Synology Inc. All rights Reserved. 168
Synology Surveillance Station Web API
If not specified, the default value will be "admin" .
adminPasswd <string>
Optional.
Admin password.
1 and onward
cms_locked <boolean>
Optional.
Prevent the changing of settings from other
server.
If not specified, the default value will be false .
1 and onward
cms_masked <boolean>
Optional.
Prevent other user to change the setting of
recording server or not.
If not specified, the default value will be false .
1 and onward
cms_sync_time <boolean>
Optional.
Is the time of recording server syncronized with
host.
If not specified, the default value will be false .
1 and onward
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.0-
3736"&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 Description
400 Execution failed.
401 Invalid parameter.
415 message connect failed.
Copyright © Synology Inc. All rights Reserved. 169
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 Version Availability
SYNO.SurveillanceStation.CMS.SlavedsList 1 Surveillance Station 8.0
Method Name Section Availability
Load
2.3.17.1 1 and onward
2.3.17.1 Load method
Handle Load slave ds list.
Request
Parameter Value Description Availability
blNeedStatus <boolean>
Optional.
Get DS status or not.
If false, Get enabled DS only.
If not specified, the default value will be false.
1 and onward
blGetSortInfo <boolean>
Optional.
Get list sort info or not.
If not specified, the default value will be false.
1 and onward
blRuntimeInfo <boolean>
Optional.
Consider “Under failover” case or not.
If true, The DS under failover and in the specified
mode will be filtered out.
If not specified, the default value will be true.
1 and onward
slaveMode -1 … 1
Optional.
Load only specified mode DS.
-1: All slave mode.
0: Recording mode only.
1: Failover mode only.
If not specified, the default value will be -1.
1 and onward
dsIds <string>
Optional.
The list of <DS_ID> to be queried concatenated by
“,”.
If not specified, this parameter will be ignored and
get all DS.
1 and onward
sortInfo <Type,
Order>
Optional.
Set sort info, blGetSortInfo must be true.
Type:
id
1 and onward
Copyright © Synology Inc. All rights Reserved. 170
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 Value Description Availability
slaveds Array of <DS
Object>
The list of queried slave DS.
1 and onward
sortInfo <Type,Order> The sort info of slave DS list.
1 and onward
total <integer> Total number of slave DS.
1 and onward
<DS Object> definition:
Key Value Description Availability
accessToken <string> Access token of slaves DS. 1 and onward
cms_locked <boolean> Does slave DS locked or not. 1 and onward
cms_masked <boolean> Does slave DS masked or not. 1 and onward
connectType 0 ... 1 Connect type of slaves DS.
0: Connect by IP or domain name.
1: Connect by Quickconnect.
1 and onward
cookie <string> Cookie token of slave DS. 1 and onward
curr_cam_num <integer> Current number of cameras used. 1 and onward
curr_dev_num <integer> Current number of all device used. 1 and onward
curr_io_num <integer> Current number of iomodule used. 1 and onward
curr_speaker_dev
_num
<integer> Current number of speaker used. 1 and onward
curr_trans_dev_n
um
<integer> Current number of transactions device used. 1 and onward
default_license <integer> Default license number of slaves DS. 1 and onward
dp_version <string> Device Pack version of slaves DS. 1 and onward
ds_model <string> Model name of slaves DS. 1 and onward
dsm_version <string> DSM version of slaves DS. 1 and onward
enable <boolean> Does slave DS enabled or not. 1 and onward
failoverReason 0 ... 6 Reason for failover.
0: None
1: Disconnected
2: Volume crashed
3: Volume degraded
1 and onward
Copyright © Synology Inc. All rights Reserved. 171
Synology Surveillance Station Web API
4: Manual
5: Package uninstalled
6: Package disabled
failoverServer <string> Id of failover server. 1 and onward
failoverServerSts 0 … 20 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
1 and onward
failoverStatus 0 … 4 Failover execution status
0: None
1: Failovering
2: Recovering
3: Failover error
4: Wait manual restore
1 and onward
failover_pair_id <integer> Pair ID of failover DS. 1 and onward
id <integer> ID of slave DS. 1 and onward
ip <string> IP of slave DS. 1 and onward
key_total <integer> The total number of licenses 1 and onward
key_used <integer> The used number of licenses 1 and onward
max_cam_num <integer> Maximum number of cameras can be set. 1 and onward
max_io_num <integer> Maximum number of iomodules can be set. 1 and onward
max_speaker_dev
_num
<integer> Maximum number of speakers can be set. 1 and onward
max_trans_dev_n
um
<integer> Maximum number of transactinos devices can
be set.
1 and onward
name <string> Name of slave DS. 1 and onward
pkgStatus 0 … 12 Package execution status
0: Unknow
1: Running
2: Stop
1 and onward
Copyright © Synology Inc. All rights Reserved. 172
Synology Surveillance Station Web API
3: Installing
4: Not installed
5: Upgrading
6: Repairing
7: Uninstalling
8: Starting
9: Stopping
10: Need to upgrade
11: Broken
12: Unavailable
port <integer> Port of slave DS. 1 and onward
quickConnectId <string> QuickConnect Id of slave DS. 1 and onward
recoverProgress <integer> Recovering progress. 1 and onward
serial_num <string> Serial number of slave DS. 1 and onward
slave_mode -1 … 1 Slave mode of slave DS.
-1: All
0: Recording
1: Failover
1 and onward
ss_version <string> Surveillance Station version of slave DS. 1 and onward
status 0 … 20 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
1 and onward
status_flags 0,1,2,4,16,32 Execution status of slave DS.
0: None
1: Enabling
2: Disabling
4: Deleting
8: Locking
16: Unlocking
1 and onward
Copyright © Synology Inc. All rights Reserved. 173
Synology Surveillance Station Web API
32: Configuring
useHttps <boolean> Does slave DS used https or not. 1 and onward
volSpace <double> Volume space of slave DS. 1 and onward
volStatus 0 … 2 Volume status of slave DS.
0: Normal
1: Degrade
2: Crash
1 and onward
Example:
{
"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",
Copyright © Synology Inc. All rights Reserved. 174
Synology Surveillance Station Web API
"status": 1,
"status_flags": 0,
"useHttps": false,
"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
Copyright © Synology Inc. All rights Reserved. 175
Synology Surveillance Station Web API
},
"success": true
}
2.3.17.2 API Error Code
Code Description
400 Execution failed.
401 Invalid parameter.
415 message connect failed.
Copyright © Synology Inc. All rights Reserved. 176
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 Version Availability
SYNO.SurveillanceStation.Log 1 Surveillance Station 7.0
Method Name Section Availability
CountByCategory
2.3.18.1 1 and onward
Clear
2.3.18.2 1 and onward
List
2.3.18.3 1 and onward
GetSetting
2.3.18.4 1 and onward
SetSetting
2.3.18.5 1 and onward
2.3.18.1 CountByCategory method
Get the count number of log in category.
Request
Parameter Value Description Availability
slavedsName <string>
Optional.
Name of slave Ds.
1 and onward
start <integer>
Optional.
Value of offset in SQL.
If not specified, the default value will be 0 .
1 and onward
limit <integer>
Optional.
Value of limit in SQL.
If not specified, the default value will be 0 .
1 and onward
level <string>
Optional.
Type of log.
0: None
1: Information
2: Warning
3: Error
If not specified, the default value will be “0”.
1 and onward
filterCamera <string>
Optional.
Apply camera filter or not.
1 and onward
cameraIds <string>
Optional.
Id list of camera.
1 and onward
Copyright © Synology Inc. All rights Reserved. 177
Synology Surveillance Station Web API
from <integer>
Optional.
From time of filter.
If not specified, the default value will be 0.
1 and onward
to <integer>
Optional.
To time of filter.
If not specified, the default value will be 0.
1 and onward
keyword <string>
Optional.
Keyword.
1 and onward
keywordDsId <string>
Optional.
Keyword of DS id.
1 and onward
time2String <string>
Optional.
Decide the format of time.
If not specified, the default value will be “yes”.
1 and onward
dsId <integer>
Optional.
Id of DS.
If not specified, the default value will be -1.
1 and onward
srcType <integer>
Optional.
Source type of log.
0: None
1: Local
2: Slaveds
4: Camera group
If not specified, the default value will be 0.
1 and onward
timezoneOffset <integer>
Optional.
Offset of time zone.
If not specified, the default value will be 0.
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 Value Description Availability
date <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)
1 and onward
log_type <type_cnt> Number of log of each log type.
1 and onward
Copyright © Synology Inc. All rights Reserved. 178
Synology Surveillance Station Web API
-1: Total number count.
1: Number count of Information type.
2: Number count of Warning type.
3: Number count of Error type.
server <server_cnt> Number of log of each server.
-1: Total number count.
X: Number count of server with X Id.
1 and onward
total integer Total number of log.
1 and onward
<day_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
yyyy/mm/dd <time_cnt> Number count of log of yyyy/mm/dd.
(Ex:1990/05/09)
1 and onward
<time_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
am <integer> Number count of log in am. 1 and onward
pm <integer> Number count of log in pm. 1 and onward
<type_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
1 <integer> Number count of Information type. 1 and onward
2 <integer> Number count of Warning type. 1 and onward
3 <integer> Number count of Error type. 1 and onward
<server_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
X <integer> Number count of log with X server Id. 1 and onward
Example:
{
"date": {
"-1": 2,
"yyyy/mm/dd": {
"am": 0,
"-1": 2,
"pm": 2
}
},
"total": 2,
Copyright © Synology Inc. All rights Reserved. 179
Synology Surveillance Station Web API
"log_type": {
"1": 2,
"3": 0,
"2": 0,
"-1": 2514
},
"server": {
"X": 2,
"-1": 2
}
}
2.3.18.2 Clear method
Clear the selected logs.
Request
Parameter Value Description Availability
blClearAll <boolean>
Optional.
Clear all log or not.
If not specified, the default value will be true.
1 and onward
level <integer>
Optional.
Type of log.
0: None
1: Information
2: Warning
3: Error
If not specified, the default value will be 0.
1 and onward
dsId <integer>
Optional.
Id of DS.
If not specified, the default value will be -1.
1 and onward
srcType <integer>
Optional.
Source type of log.
0: None
1: Local
2: Slaveds
4: Camera group
If not specified, the default value will be 0.
1 and onward
filterCamera <string>
Optional.
Apply camera filter or not.
1 and onward
cameraIds <string>
Optional.
Id list of camera.
1 and onward
Copyright © Synology Inc. All rights Reserved. 180
Synology Surveillance Station Web API
from <integer>
Optional.
From time of filter.
If not specified, the default value will be 0.
1 and onward
to <integer>
Optional.
To time of filter.
If not specified, the default value will be 0.
1 and onward
keyword <string>
Optional.
Keyword.
1 and onward
keywordDsId <string>
Optional.
Keyword of DS id.
1 and onward
timezoneOffset <integer>
Optional.
Offset of time zone.
If not specified, the default value will be 0.
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 Value Description Availability
success
<boolean>
Success or not.
1 and onward
Example:
{
"success": true
}
2.3.18.3 List method
Get the detail information of log.
Request
Parameter Value Description Availability
start <integer>
Optional.
Value of offset in SQL.
If not specified, the default value will be 0.
1 and onward
limit <integer>
Optional.
Value of limit in SQL.
If not specified, the default value will be 0.
1 and onward
Copyright © Synology Inc. All rights Reserved. 181
Synology Surveillance Station Web API
level <string>
Optional.
Type of log.
0: None
1: Information
2: Warning
3: Error
If not specified, the default value will be “0”.
1 and onward
filterCamera <string>
Optional.
Apply camera filter or not.
1 and onward
cameraIds <string>
Optional.
Id list of camera.
1 and onward
from <integer>
Optional.
From time of filter.
If not specified, the default value will be 0.
1 and onward
to <integer>
Optional.
To time of filter.
If not specified, the default value will be 0.
1 and onward
keyword <string>
Optional.
Keyword.
1 and onward
keywordDsId <string>
Optional.
Keyword of DS id.
1 and onward
time2String <string>
Optional.
Decide the format of time.
If not specified, the default value will be “yes”.
1 and onward
dsId <integer>
Optional.
Id of DS.
If not specified, the default value will be -1.
1 and onward
srcType <integer>
Optional.
Source type of log.
0: None
1: Local
2: Slaveds
4: Camera group
If not specified, the default value will be 0.
1 and onward
all <boolean>
Optional.
List all log or not.
1 and onward
blIncludeRecCnt <string>
Optional.
Include recent count or not.
1 and onward
blIncludeAuInfo <string>
Optional.
Include audio information or not.
1 and onward
Copyright © Synology Inc. All rights Reserved. 182
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 Value Description Availability
log Array of
<log_detail>
Information detail of log.
1 and onward
recCntData <rec_cnt> Recent count of log information.
1 and onward
success <boolean> Success or not.
1 and onward
timestamp <string> Time stamp.
1 and onward
total <integer> Total number of log.
1 and onward
<log_detail> definition:
Key Value Description Availability
desc <string> Description of log.
1 and onward
dsId <integer> Id of DS.
1 and onward
id <string> Id of log.
1 and onward
time <integer> Time of log.
1 and onward
pm <integer> Type of log.
1 and onward
pm <integer> Update time of log.
1 and onward
<rec_cnt> definition:
Key Value Description Availability
date <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)
1 and onward
log_type <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.
1 and onward
server <server_cnt> Number of log of each server.
-1: Total number count.
X: Number count of server with X Id.
1 and onward
Copyright © Synology Inc. All rights Reserved. 183
Synology Surveillance Station Web API
total integer Total number of log.
1 and onward
<day_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
yyyy/mm/dd <time_cnt> Number count of log of yyyy/mm/dd.
(Ex:1990/05/09)
1 and onward
<time_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
am <integer> Number count of log in am. 1 and onward
pm <integer> Number count of log in pm. 1 and onward
<type_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
1 <integer> Number count of Information type. 1 and onward
2 <integer> Number count of Warning type. 1 and onward
3 <integer> Number count of Error type. 1 and onward
<server_cnt> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
X <integer> Number count of log with X server Id. 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. 184
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 Value Description Availability
data Array of
<log_advanced_setting>
The list of all log advanced setting. 1 and onward
success <boolean> Get setting successly or not.
1 and onward
<log_advanced_setting> definition:
Key Value Description Availability
SSLogType <integer> Type of log.
1 and onward
enable <integer> Enable of log. If the value is 1, the corrsponding
log type is recorded and vice versa.
1 and onward
logGrp <integer> Group of log.
1 and onward
logTypeKey <string> Key of log.
1 and onward
Copyright © Synology Inc. All rights Reserved. 185
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 Value Description Availability
data Array of
<log_advanced_setting>
Required.
The list of log advanced setting.
1 and onward
<log_advanced_setting> definition:
Key Value Description Availability
SSLogType <integer> Required.
Type of log.
1 and onward
enable <integer> Required.
Enable of log. If the value is 1, the corrsponding
log type is recorded and vice versa.
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. 186
Synology Surveillance Station Web API
2.3.18.6 API Error Code
Code Description
400 Execution failed.
Copyright © Synology Inc. All rights Reserved. 187
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 Version Availability
SYNO.SurveillanceStation.License 1 Surveillance Station 7.0
Method Name Section Availability
Load
2.3.19.1 1 and onward
CheckQuota
2.3.19.2 1 and onward
2.3.19.1 Load method
Load license data.
Request
Parameter Value Description Availability
num_only <integer>
Optional.
Load the detail info of every License or not.
0: false
1: true
If not specified, the default value will be 0.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.License"&num_only=1&version="1"&method="Load"
Response
Key Value Description Availability
blCMSLosthost
<boolean> Is CMS host lost.
1 and onward
keyPostponedCnt
<integer> Number of postponed key.
1 and onward
key_max
<integer> Maximum IP camera number in NAS.
1 and onward
key_total
<integer> Number of total license.
1 and onward
key_used
<integer> Number of used license.
1 and onward
license_num
<integer> Number of license key.
1 and onward
localAcsCnt
<integer> Number of AXIS control door.
1 and onward
localCamCnt
<integer> Number of Acting Camera.
1 and onward
localIOCnt
<integer> Number of IO module.
1 and onward
Copyright © Synology Inc. All rights Reserved. 188
Synology Surveillance Station Web API
localKeyTotal
<integer> Number of license in this NAS.
1 and onward
localSpeakerCnt
<integer> Number of IP speaker.
1 and onward
localTransCnt
<integer> Number of transaction.
1 and onward
slaveDsCnt
<integer> Number of slave DS.
1 and onward
success <boolean> Load successly or not.
1 and onward
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
}
2.3.19.2 CheckQuota method
Check the quota of license.
Request
Parameter Value Description Availability
camList Array of
<CamInfo>
Optional.
List of camera on the server.
1 and onward
camServerId <integer>
Optional.
Camera Server Id.
1 and onward
<CamInfo> definition:
Key Value Description Availability
ip <string> IP of the camera.
1 and onward
port <integer> Port of the camera.
1 and onward
Copyright © Synology Inc. All rights Reserved. 189
Synology Surveillance Station Web API
vendor <string> Vendor of the camera.
1 and onward
model <string> Model of the camera.
1 and onward
Example:
GET /webapi/entry.cgi?camServerId=1&camList=[{"ip": "10.13.22.141", "model": "DCS-3110", "vendor": "D-
Link", "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 Description
400 Execution failed.
407 CMS closed.
412 Need to add license.
413 Reach the maximum of platform.
Copyright © Synology Inc. All rights Reserved. 190
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 Version Availability
SYNO.SurveillanceStation.Stream 1 Surveillance Station 7.0
Method Name Section Availability
EventStream
2.3.20.1 1 and onward
2.3.20.1 EventStream method
Get HTTP video stream of the specific recording event
Request
Parameter Value Description Availability
writeHeader <boolean>
Optional.
Write Header or not.
If not specified, the default value will be true.
1 and onward
analyevent <boolean>
Optional.
Is it an analytics event or not.
If not specified, the default value will be false.
1 and onward
mountId <integer>
Optional.
Mount Id.
If not specified, the default value will be 0.
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 Description
400 Execution failed.
Copyright © Synology Inc. All rights Reserved. 191
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 Version Availability
SYNO.SurveillanceStation.ActionRule 1 Surveillance Station 7.0
Method Name Section Availability
Save
2.3.21.1 1 and onward
DownloadHistory
2.3.21.2 1 and onward
SendData2Player
2.3.21.3 1 and onward
DeleteHistory
2.3.21.4 1 and onward
List
2.3.21.5 1 and onward
Disable
2.3.21.6 1 and onward
Enable
2.3.21.7 1 and onward
ListHistory
2.3.21.8 1 and onward
Delete
2.3.21.9 1 and onward
2.3.21.1 Save method
Save the action rule.
Request
Parameter Value Description Availability
id <integer> Required.
Unique rule id.
1 and onward
name <string> Required.
The name of the rule.
1 and onward
ruleType <integer> Required.
The rule type.
0: Triggered.
1: Scheduled.
1 and onward
actType <integer> Required.
The action type.
0: Interruptible.
1: Uninterruptible.
1 and onward
evtSrc <integer> Conditional. When 'ruleType' is equal to 0,
The event source.
1 and onward
Copyright © Synology Inc. All rights Reserved. 192
Synology Surveillance Station Web API
0: Camera.
1: External event.
2: Door.
3: Access controller.
evtDsId <integer> Conditional. When (not 'evtSrc' is equal to 1),
The server id of event device.
1 and onward
evtDevId <integer> Conditional. When (not 'evtSrc' is equal to 1),
The device id of event device.
1 and onward
evtId <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.
1 and onward
evtItem <integer> Conditional.
When the camera support per alarm detection,
can choose the alarm channel. -1: All alarm
channel.
1 and onward
evtMinIntvl <integer> Conditional.
The minimum interval to triggered rule. It would
be needed when the event is detected for many
times in the short time.
1 and onward
Actions Array of
<Action> Object
Required
The specified Action to this rule.
1 and onward
actSchedule <string> Required.
The schedule of the rule to execute.
1 and onward
Copyright © Synology Inc. All rights Reserved. 193
Synology Surveillance Station Web API
<Action> Definition
Parameter Value Description Availability
Id <integer> Required
The action id
1 and onward
actSrc <integer> Required.
The action source.
0: Camera.
1: External command.
4: Surveillance Web Client
1 and onward
actDsId <integer> Conditional.
The server id of action device.
1 and onward
actDevId <integer> Conditional.
The device id of action device.
1 and onward
actId <integer> Required.
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.
1 and onward
actTimes <integer> Conditional. When (('actId' is equal to 6 and
'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.
1 and onward
actTimeUnit <integer> Required.
The time unit of the time duration.
-2: Forever.
1 and onward
Copyright © Synology Inc. All rights Reserved. 194
Synology Surveillance Station Web API
0: None.
1: Second.
2: Minute.
3: Hour.
actTimeDur <integer> Required.
The duration or interval of the executed action.
1 and onward
actItemId <integer> Conditional. When ('actId' is equal to 5 or 'actId' is
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.
1 and onward
actRetPos <integer> Conditional. When ('actId' is equal to 5 or 'actId' is
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
1 and onward
extUrl <string> Conditional. When 'actSrc' is equal to 1,
The url command to be executed.
1 and onward
userName <string> Conditional. When 'actSrc' is equal to 1,
The user name of the device to execute external
command.
1 and onward
password <string> Conditional. When 'actSrc' is equal to 1,
The password of the device to execute external
command.
1 and onward
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"%3A-
1,"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. 195
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. 196
Synology Surveillance Station Web API
Parameter Value Description Availability
idList <string> Required.
The list of rule id to be queried concatenated by
",". -1 can delete all histories.
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 Value Description Availability
Start <integer> Optional.
The start to be shifted in the total result.
If not specified, the default value will be 0.
1 and onward
limit <integer> Optional.
Number of action rules to be returned. If not
specified, return rules to the end of rule list.
1 and onward
Example:
GET /webapi/entry.cgi?
start=0&api="SYNO.SurveillanceStation.ActionRule"&limit=0&version="1"&method="List"
Response
Key Value Description Availability
actRule Array of
<ActionRule>
The list of action rule.
1 and onward
total <integer> The total number of rules.
1 and onward
Example:
{
"actRule": [
{
"ruleType": 0,
Copyright © Synology Inc. All rights Reserved. 197
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 Value Description Availability
idList <string> Required.
The list of rule id to be queried concatenated by
","
1 and onward
Copyright © Synology Inc. All rights Reserved. 198
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 Value Description Availability
idList <string> Required.
The list of rule id to be queried concatenated by
","
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 Value Description Availability
start <integer> Required.
The start to be shifted in the total result.
If not specified, the default value will be 0.
1 and onward
limit <integer> 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. 199
Synology Surveillance Station Web API
GET /webapi/entry.cgi?
start=0&api="SYNO.SurveillanceStation.ActionRule"&limit=100&version="1"&method="ListHistory"
Response
Key Value Description Availability
history Array of
<RuleHistory>
The rule history list.
1 and onward
total <integer> The number of total rule histories.
1 and onward
<RuleHistory> definition:
Key Value Description Availability
id <integer> The unique id of history
1 and onward
level <integer> 1: info, 2: warning, 3: error
1 and onward
time <integer> timestamp of the history.
1 and onward
ruleName <string> The name of triggered rule.
1 and onward
ruleType <integer> The type of triggered rule.
0: Triggered.
1: Scheduled.
1 and onward
actResult <integer> The action result of triggered rule.
0: Finished.
2: Interrupted.
3: Failed.
4: Ignored.
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. 200
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 Value Description Availability
idList <string> Required.
The list of rule id to be queried concatenated by
","
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 Description
400 Execution failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 201
Synology Surveillance Station Web API
2.3.22 SYNO.SurveillanceStation.Emap
This API provides methods to get information about user-defined E-Maps.
Name Version Availability
SYNO.SurveillanceStation.Emap 1 Surveillance Station 8.0
Method Name Section Availability
List 2.3.22.1 1 and onward
Load 2.3.22.2 1 and onward
2.3.22.1 List method
Get the list of all E-Maps.
Request
Parameter Value Description Availability
start <integer> Optional.
Start searching after the specified number data.
If not specified, the offset will be 0.
1 and onward
limit <integer> Optional.
Number of emaps to be returned.
If not specified, return E-Maps to the end of E-Map list.
1 and onward
emapIds <string> Optional.
The list of <EMAP_ID> to be queried concatenated by “,”.
If not specified, this parameter will be ignored and get all
emaps.
1 and onward
includeImage <boolean> Optional.
Include complete image or not.
If not specified, the default value is false.
1 and onward
includeItems <boolean> Optional.
Include all item on emap or not.
If not specified, the default value is false.
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 Value Description Availability
total <integer> The number of total E-maps. 1 and onward
success <boolean> The method result. 1 and onward
emap Array of <E-Map Object> The list of queried E-Maps. 1 and onward
Copyright © Synology Inc. All rights Reserved. 202
Synology Surveillance Station Web API
<E-Map Object> definition:
Key Value Description Availability
id <EMAP_ID> Unique E-Map ID. 1 and onward
name <string> E-Map name. 1 and onward
filename <string> Name of image file. 1 and onward
filesize <integer> Size of image file.
imageWidth <integer> Image width of the E-Map image. 1 and onward
imageHeight <integer> Image height of the E-Map image. 1 and onward
imageData <string> Image data in base64 format.
item Array of <E-Map Item
Object>
The list of items marked on the E-Map. 1 and onward
hideItemName <boolean> Does item name hide or not
<E-Map Item Object> definition:
Key Value Description Availability
id <Item_ID> Item ID. 1 and onward
name <string> Item name. 1 and onward
type 0 … 6 Type of the E-Map item.
0: Camera
1: E-Map
2: Door
3: IOModule
4: Transactions Device
5: IP Speaker
6: IP Speaker Group
1 and onward
dsId 0, <DS_ID> Unique DS ID which this E-Map item belongs to.
0: On local host.
<DS_ID>: ID of a DS.
1 and onward
uniqueId <integer> Unique ID of this item. When this item is a
camera, it means <CAMERA_ID>. When this item
is an E-Map, it means <EMAP_ID>. And so on.
1 and onward
itemName <string> Name of this item. When this item is a camera, it
describes camera name. When this item is an E-
Map, it describes E-Map name.
1 and onward
x <integer> X-coordinate of the E-Map item assuming that
top-left of the E-Map is the origin.
1 and onward
y <integer> Y-coordinate of the E-Map item assuming that
top-left of the E-Map is the origin.
1 and onward
iconCenterX <integer> X-coordinate of the E-Map item icon certer
assuming that top-left of the E-Map is the origin.
1 and onward
iconCenterY <integer> Y-coordinate of the E-Map item icon certer
assuming that top-left of the E-Map is the origin.
1 and onward
direction 0 … 7 Direction of the camera. If the type of this item is
E-Map, direction will be always 0.
0: Westward
1: Northwestward
2: Northward
3: Northeastward
4: Eastward
5: Southeastward
1 and onward
Copyright © Synology Inc. All rights Reserved. 203
Synology Surveillance Station Web API
6: Southward
7: Southwestward
blPlayback <boolean> This item can be played or not. 1 and onward
camIdOnRec 0,
<CAMERA_ID>
ID of the camera or the paired camera of item on
recording server.
0: On local host.
<CAMERA_ID>: Cam ID on recording server.
1 and onward
camVideoType 1 … 8 Video type of the camera or the paired camera of
item.
1: MJPEG
2: MPEG4
3: H264
4: EMAP
5: MXPEG
6: H265
7: H264+
8: H265+
1 and onward
deviceType 1, 2, 4, 8, 16, 32, 64,
128, 256, 512
Type of Camera or E-Map item.
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
1 and onward
portIdx <integer> Port index of Item.
Will be -1, If the item dont have any port.
status 1 ... 18
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
Copyright © Synology Inc. All rights Reserved. 204
Synology Surveillance Station Web API
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,
"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. 205
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
Copyright © Synology Inc. All rights Reserved. 206
Synology Surveillance Station Web API
Parameter Value Description Availability
emapIds <string> The list of <EMAP_ID> to be queried concatenated by “,”. 1 and onward
includeImage <boolean> Optional.
Include complete image or not.
If not specified, the default value is false.
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 Value Description Availability
total <integer> The number of total E-maps. 1 and onward
success <boolean> The method result. 1 and onward
emap Array of <E-Map Object> The list of queried E-Maps. 1 and onward
<E-Map Object> definition:
Key Value Description Availability
id <EMAP_ID> Unique E-Map ID. 1 and onward
name <string> E-Map name. 1 and onward
filename <string> Name of image file. 1 and onward
filesize <integer> Size of image file.
imageWidth <integer> Image width of the E-Map image. 1 and onward
imageHeight <integer> Image height of the E-Map image. 1 and onward
imageData <string> Image data in base64 format.
item Array of <E-Map Item
Object>
The list of items marked on the E-Map. 1 and onward
hideItemName <boolean> Does item name hide or not
<E-Map Item Object> definition:
Key Value Description Availability
id <Item_ID> Item ID. 1 and onward
name <string> Item name. 1 and onward
type 0 … 6 Type of the E-Map item.
0: Camera
1: E-Map
2: Door
3: IOModule
4: Transactions Device
5: IP Speaker
6: IP Speaker Group
1 and onward
dsId 0, <DS_ID> Unique DS ID which this E-Map item belongs to.
0: On local host.
<DS_ID>: ID of a DS.
1 and onward
uniqueId <integer> Unique ID of this item. When this item is a
camera, it means <CAMERA_ID>. When this item
is an E-Map, it means <EMAP_ID>. And so on.
1 and onward
itemName <string> Name of this item. When this item is a camera, it
describes camera name. When this item is an E-
1 and onward
Copyright © Synology Inc. All rights Reserved. 207
Synology Surveillance Station Web API
Map, it describes E-Map name.
x <integer> X-coordinate of the E-Map item assuming that
top-left of the E-Map is the origin.
1 and onward
y <integer> Y-coordinate of the E-Map item assuming that
top-left of the E-Map is the origin.
1 and onward
iconCenterX <integer> X-coordinate of the E-Map item icon certer
assuming that top-left of the E-Map is the origin.
1 and onward
iconCenterY <integer> Y-coordinate of the E-Map item icon certer
assuming that top-left of the E-Map is the origin.
1 and onward
direction 0 … 7 Direction of the camera. If the type of this item is
E-Map, direction will be always 0.
0: Westward
1: Northwestward
2: Northward
3: Northeastward
4: Eastward
5: Southeastward
6: Southward
7: Southwestward
1 and onward
blPlayback <boolean> This item can be played or not. 1 and onward
camIdOnRec 0, <CAMERA_ID> ID of the camera or the paired camera of item on
recording server.
0: On local host.
<CAMERA_ID>: Cam ID on recording server.
1 and onward
camVideoType 1 … 8 Video type of the camera or the paired camera of
item.
1: MJPEG
2: MPEG4
3: H264
4: EMAP
5: MXPEG
6: H265
7: H264+
8: H265+
1 and onward
deviceType 1, 2, 4, 8, 16, 32, 64,
128, 256, 512
Type of Camera or E-Map item.
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
1 and onward
portIdx <integer> Port index of Item.
Will be -1, If the item dont have any port.
status 1 ... 18
Indicating the Item status
1: Normal
2: Deleted
3: Disconnected
Copyright © Synology Inc. All rights Reserved. 208
Synology Surveillance Station Web API
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:
{
"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,
Copyright © Synology Inc. All rights Reserved. 209
Synology Surveillance Station Web API
"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
}
],
"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. 210
Synology Surveillance Station Web API
}
],
"success": true,
"total": 2
},
"success": true
}
2.3.22.3 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 211
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 Version Availability
SYNO.SurveillanceStation.Emap.Image 1 Surveillance Station 8.0
Method Name Section Availability
Load 2.3.23.1 1 and onward
2.3.23.1 Load method
Get the image of the selected E-Map in its original format.
Request
Parameter Value Description Availability
filename <string> Image file name.
Get from 2.3.22.1 or 2.3.22.2
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 Description
400 Execution failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 212
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 Version Availability
SYNO.SurveillanceStation.Notification 1 Surveillance Station 6.3
SYNO.SurveillanceStation.Notification 2 Surveillance Station 7.0
Method Name Section Availability
GetRegisterToken 2.3.24.1 1 and onward
SetCustomizedMessage 2.3.24.2 4 and onward
GetCustomizedMessage 2.3.24.3 4 and onward
SetVariables 2.3.24.4 4 and onward
GetVariables 2.3.24.5 4 and onward
SetAdvSetting 2.3.24.6 4 and onward
GetAdvSetting 2.3.24.5 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 Value Description Availability
oauth_id <integer> id 1 and onward
token <string> Authorized token 1 and onward
Example:
{
"token":
"MlFaYk9lK3RvSlU9fFBJaGVWLzhyVUhyRVZCMnRjelNvWUQrTm4rbU9malEwY0JlQ0tleHJHVFFGS2lheWR6Q
StOdGJjVGtYc0t4cms=",
"oauth_id": 836782578
}
Copyright © Synology Inc. All rights Reserved. 213
Synology Surveillance Station Web API
2.3.24.2 SetCustomizedMessage method
Set message and subject for specified event
Request
Parameter Value Description Availability
eventTypes <string> The specified event 4 and onward
subject <string> Subject of the message 4 and onward
content <string> Optional.
Content of the message
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 Value Description Availability
eventTypes <integer> An integer indicate the type of event 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 Value Description Availability
defaultMessage <CustomizedMsg
Object>
System default message 4 and onward
Message <CustomizedMsg
Object>
User defined message 4 and onward
<CustomizedMsg Object> definition:
Key Value Description Availability
Copyright © Synology Inc. All rights Reserved. 214
Synology Surveillance Station Web API
content <string> Content of the message 4 and onward
subject <string> Subject of the message 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 Value Description Availability
ss_pkg_name <string> The sender name of each notification 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. 215
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 Value Description Availability
ss_pkg_name <string> The sender name of each notification 4 and onward
Example:
{
"ss_pkg_name": "Synology Surveillance Station"
}
2.3.24.6 SetAdvSetting method
Set advanced notification settings
Request
Parameter Value Description Availability
blSyncDSMNotify <boolean> If the settings is the same as DSM. 4 and onward
blCompactMsg <boolean> If identical messages will be compressed 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 Value Description Availability
blCopyMail <boolean> If the mail settings successfully sync to DSM. 4 and onward
blCopyPush <boolean> If the push settings successfully sync to DSM. 4 and onward
blCopySms <boolean> If the SMS settings successfully sync to DSM. 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. 216
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 Description Availability
blCompactMsg <boolean> If identical messages will be compressed 4 and onward
blDSMJoinCMS <boolean> If DSM joined in CMS environment 4 and onward
blFirstOpen <boolean> If the api is called at the first open of the app 4 and onward
blSyncDSMNotify <boolean> If the settings is the same as DSM. 4 and onward
Example:
{
"blCompactMsg":false,"blDSMJoinCMS":false,"blFirstOpen":false,"blSyncDSMNotify":true
}
2.3.24.8 API Error Code
Code Description
400 Execution failed.
Copyright © Synology Inc. All rights Reserved. 217
Synology Surveillance Station Web API
2.3.25 SYNO.SurveillanceStation.Notification.SMS
Notification.SMS doc
Name Version Availability
SYNO.SurveillanceStation.Notification.SMS 1 Surveillance Station 6.3
Method Name Section Availability
SendTestMessage 2.3.25.1 4 and onward
GetSetting 2.3.25.2 4 and onward
SetSetting 2.3.25.3 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 Availability
smsEnable <boolean> Optional.
Is SMS enabled?
4 and onward
smsMethod 0,
1,
2
Optional.
The method of SMS service
0: NONE
1: The same as DSM
2: Customized setting below
4 and onward
smsProvider <string> Optional.
The provider of SMS service
4 and onward
userName <string> Optional.
User name of the SMS service
4 and onward
password <string> Optional.
User password of the SMS service
4 and onward
confirmPassword <string> Optional.
The confirming password
4 and onward
primaryPhoneCode <string> Optional.
Phone code of the primary phone
4 and onward
primaryPhonePrefix <string> Optional.
Prefix of the primary phone
4 and onward
primaryPhoneNumber <string> Optional.
Phone number of the primary phone
4 and onward
secondaryPhoneCode <string> Optional.
Phone code of the secondary phone
4 and onward
secondaryPhonePrefix <string> Optional.
Prefix of the secondary phone
4 and onward
secondaryPhoneNumber <string> Optional.
Phone number of the secondary phone
4 and onward
Copyright © Synology Inc. All rights Reserved. 218
Synology Surveillance Station Web API
setMinMessageInterval <boolean> Optional.
Is minimum message interval set
4 and onward
minMessageInterval <integer> Optional.
Minimum message interval
4 and onward
hasSysSms <boolean> Optional.
Is Syno-SMS enabled
4 and onward
apiId <string> Optional.
ID of API
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 Value Description Availability
smsEnable <boolean> Optional.
Is SMS enabled?
4 and onward
smsMethod 0,
1,
2
Optional.
The method of SMS service
0: NONE
1: The same as DSM
2: Customized setting below
4 and onward
Copyright © Synology Inc. All rights Reserved. 219
Synology Surveillance Station Web API
smsProvider <string> Optional.
The provider of SMS service
4 and onward
userName <string> Optional.
User name of the SMS service
4 and onward
password <string> Optional.
User password of the SMS service
4 and onward
confirmPassword <string> Optional.
The confirming password
4 and onward
primaryPhoneCode <string> Optional.
Phone code of the primary phone
4 and onward
primaryPhonePrefix <string> Optional.
Prefix of the primary phone
4 and onward
primaryPhoneNumber <string> Optional.
Phone number of the primary phone
4 and onward
secondaryPhoneCode <string> Optional.
Phone code of the secondary phone
4 and onward
secondaryPhonePrefix <string> Optional.
Prefix of the secondary phone
4 and onward
secondaryPhoneNumber <string> Optional.
Phone number of the secondary phone
4 and onward
setMinMessageInterval <boolean> Optional.
Is minimum message interval set
4 and onward
minMessageInterval <integer> Optional.
Minimum message interval
4 and onward
hasSysSms <boolean> Optional.
Is Syno-SMS enabled
4 and onward
Example:
{
"primaryPhoneCode": "",
"smsEnable": false,
"primaryPhonePrefix": "",
"smsMethod": 0,
"primaryPhoneNumber": "",
"minMessageInterval": 1,
"password": "",
"confirmPassword": "",
"userName": "",
"secondaryPhoneNumber": "",
"smsProvider": "clickatell",
"hasSysSms": false,
"setMinMessageInterval": false,
"secondaryPhonePrefix": "",
"secondaryPhoneCode": ""
}
2.3.25.3 SetSetting method
Copyright © Synology Inc. All rights Reserved. 220
Synology Surveillance Station Web API
Set SMS service settings
Request
Parameter Value Description Availability
smsEnable <boolean> Optional.
Is SMS enabled?
4 and onward
smsMethod 0,
1,
2
Optional.
The method of SMS service
0: NONE
1: The same as DSM
2: Customized setting below
4 and onward
smsProvider <string> Optional.
The provider of SMS service
4 and onward
userName <string> Optional.
User name of the SMS service
4 and onward
password <string> Optional.
User password of the SMS service
4 and onward
confirmPassword <string> Optional.
The confirming password
4 and onward
primaryPhoneCode <string> Optional.
Phone code of the primary phone
4 and onward
primaryPhonePrefix <string> Optional.
Prefix of the primary phone
4 and onward
primaryPhoneNumber <string> Optional.
Phone number of the primary phone
4 and onward
secondaryPhoneCode <string> Optional.
Phone code of the secondary phone
4 and onward
secondaryPhonePrefix <string> Optional.
Prefix of the secondary phone
4 and onward
secondaryPhoneNumber <string> Optional.
Phone number of the secondary phone
4 and onward
setMinMessageInterval <boolean> Optional.
Is minimum message interval set
4 and onward
minMessageInterval <integer> Optional.
Minimum message interval
4 and onward
hasSysSms <boolean> Optional.
Is Syno-SMS enabled
4 and onward
apiId <string> Optional.
ID of API
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. 221
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 Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
403 Insufficient license.
404 Codec acitvation failed
Copyright © Synology Inc. All rights Reserved. 222
Synology Surveillance Station Web API
2.3.26 SYNO.SurveillanceStation.Notification.PushService
This API provides basic operation for push service
Name Version Availability
SYNO.SurveillanceStation.Notification.SMS 1 Surveillance Station 6.3
Method Name Section Availability
SendTestMessage 2.3.26.1 4 and onward
GetSetting 2.3.26.2 4 and onward
SetSetting 2.3.26.3 4 and onward
SendVerificationMail 2.3.26.4 4 and onward
ListMobileDevice 2.3.26.5 4 and onward
UnpairMobileDevice 2.3.26.6 4 and onward
2.3.26.1 SendTestMessage method
Send test message to the primary and secondary(if exists) phone number
Request
Parameter Value Description Availability
attachSnapshot <boolean> Does the push service provide snapshot 4 and onward
enableInterval <boolean> Optional.
Is the the service of minimum interval between
messages enabled
4 and onward
mobileEnable <boolean> Optional.
Is mobile device the destination of the push service
4 and onward
msgInterval <integer> Optional.
The minimum interval of messages in minute
4 and onward
primaryEmail <string> Optional.
Primary email
4 and onward
secondaryEmail <string> Optional.
Secondary email
4 and onward
synoMailEnable <boolean> Optional.
Does the push service provides notification to Syno-
mails
4 and onward
mail_recipient <string> Optional.
In the format "primaryMail;secondaryMail"
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
attachSnapshot=true&primaryEmail="[email protected]"&enableInterval=false&mail_recipient="b9
[email protected]"&api="SYNO.SurveillanceStation.Notification.PushService"&msgInterval=1&synoMa
Copyright © Synology Inc. All rights Reserved. 223
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 Value Description Availability
attachSnapshot <boolean> Does the push service provide snapshot 4 and onward
enableInterval <boolean> Optional.
Is the the service of minimum interval between
messages enabled
4 and onward
mobileEnable <boolean> Optional.
Is mobile device the destination of the push service
4 and onward
msgInterval <integer> Optional.
The minimum interval of messages in minute
4 and onward
primaryEmail <string> Optional.
Primary email
4 and onward
secondaryEmail <string> Optional.
Secondary email
4 and onward
synoMailEnable <boolean> Optional.
Does the push service provides notification to Syno-
mails
4 and onward
unverifiedMails <string> Optional.
List of unverified emails
4 and onward
Example:
{
"attachSnapshot": true,
"primaryEmail": "[email protected]",
"synoMailEnable": true,
"enableInterval": false,
"secondaryEmail": "",
Copyright © Synology Inc. All rights Reserved. 224
Synology Surveillance Station Web API
"msgInterval": 1,
"unverifiedMails": "",
"mobileEnable": false
}
2.3.26.3 SetSetting method
Set customized settings
Request
Parameter Value Description Availability
attachSnapshot <boolean> Does the push service provide snapshot 4 and onward
enableInterval <boolean> Optional.
Is the the service of minimum interval between
messages enabled
4 and onward
mobileEnable <boolean> Optional.
Is mobile device the destination of the push service
4 and onward
msgInterval <integer> Optional.
The minimum interval of messages in minute
4 and onward
primaryEmail <string> Optional.
Primary email
4 and onward
secondaryEmail <string> Optional.
Secondary email
4 and onward
synoMailEnable <boolean> Optional.
Does the push service provides notification to Syno-
mails
4 and onward
mail_recipient <string> Optional.
In the format "primaryMail;secondaryMail"
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
attachSnapshot=true&primaryEmail="[email protected]"&enableInterval=false&mail_recipient="b9
[email protected]"&api="SYNO.SurveillanceStation.Notification.PushService"&msgInterval=1&synoMa
ilEnable=true&secondaryEmail=""&version="1"&mobileEnable=false&method="SetSetting"
Response
Key Value Description Availability
unverifiedMails <boolean> List of unverified emails 4 and onward
Example:
{
"unverifiedMails": ""
}
Copyright © Synology Inc. All rights Reserved. 225
Synology Surveillance Station Web API
2.3.26.4 SendVerificationMail method
Send verification mail to all recipient
Request
Parameter Value Description Availability
mailAccounts <string> The mail account that is to be verified 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 Value Description Availability
list Array of <Paired object> List of paired device 4 and onward
<Paired object> definition:
Key Value Description Availability
appVersion <string> Version of the application installed on the device 4 and onward
deviceName <string> Name of the device 4 and onward
firmwareVersion <string> Firmware version of the device 4 and onward
targetId <integer> The id of the target device 4 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 226
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 Value Description Availability
targetIds <string> 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="[email protected]"&enableInterval=false&mail_recipient="b9
[email protected]"&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 Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
403 Insufficient license.
404 Codec acitvation failed
Copyright © Synology Inc. All rights Reserved. 227
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 Version Availability
SYNO.SurveillanceStation.Notification.Schedule 1 Surveillance Station 6.3
Method Name Section Availability
GetAccessControlControllerSchedule 2.3.27.1 4 and onward
GetCameraAlarmSchedule 2.3.27.2 4 and onward
GetSystemDependentSchedule 2.3.27.3 4 and onward
SetBatchSchedule 2.3.27.4 4 and onward
GetAccessControlDoorSchedule 2.3.27.5 4 and onward
GetCameraSchedule 2.3.27.6 4 and onward
SetSystemDependentSchedule 2.3.27.7 4 and onward
SetAccessControlSchedule 2.3.27.8 4 and onward
SetCameraSchedule 2.3.27.9 4 and onward
2.3.27.1 GetAccessControlControllerSchedule method
Get schedule of access control controller
Request
Parameter Value Description Availability
doorId <integer> Id of the specified door 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 Value Description Availability
list Array of <EventSch
Object>
List of event scheduling 4 and onward
<EventSch Object> definition:
Key Value Description Availability
eventType 0 … 46 Type of event
0 : Testing email
1 : Camera added
2 : Camera deleted
3 : Camera connection lost
4 and onward
Copyright © Synology Inc. All rights Reserved. 228
Synology Surveillance Station Web API
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
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
schedule Array of <integer> Actually a 7*48 integer array to indicate on/off
on each half hour in a week
4 and onward
Example:
{
list:[{
Copyright © Synology Inc. All rights Reserved. 229
Synology Surveillance Station Web API
"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.2 GetCameraAlarmSchedule method
Get schedule of camera alarm
Request
Parameter Value Description Availability
cameraId <integer> Id of the selected camera 4 and onward
alarmIdx <integer> Index of the alarm 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 Value Description Availability
list Array of <EventSch
Object>
List of event scheduling 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. 230
Synology Surveillance Station Web API
}
2.3.27.3 GetSystemDEpendentSchedule method
Get schedule of system dependent events
Request
Parameter Value Description Availability
eventGroupTypes 0 … 6 Type of event group to show
0:NONE
1:SYSTEM
2:CAMERA
3:ACS_CTRL
4:VS
5:SERVER
6:EXT_DEVICE
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 Value Description Availability
list Array of <EventSchGrp
Object>
List of event group scheduling 4 and onward
<EventSchGrp Object> definition:
Key Value Description Availability
eventGroupType
1 … 6 Type of event group.
1: System
2: Camera
3: Access Control
4: VisualStation
5: Server
6: External Device
eventType 0 … 46 Type of event
0 : Testing email
1 : Camera added
2 : Camera deleted
3 : Camera connection lost
4 : Camera connection resumed
5 : Motion detected
4 and onward
Copyright © Synology Inc. All rights Reserved. 231
Synology Surveillance Station Web API
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
schedule Array of <integer> Actually a 7*48 integer array to indicate on/off
on each half hour in a week
4 and onward
Example:
{
list:[{
“eventGroupType”: 4,
Copyright © Synology Inc. All rights Reserved. 232
Synology Surveillance Station Web API
"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.4 SetBatchSchedule method
Batch set schedule. Group id, camera id are required if needed
Request
Parameter Value Description Availability
eventTypes <string> Type of events 4 and onward
schedule Array of <Sch
Object>
The specified schedule. Actually a 7 * 48 array of
"schedule" object
4 and onward
cameraIds <string> Id of specified cameras 4 and onward
cameraGroupIds <string> Id of specified camera groups 4 and onward
filter <integer> Number of filter 4 and onward
<Sch Object> definition:
Key Value Description Availability
schedule <string> An integer indicate the schedule type of each
half hour
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"},
Copyright © Synology Inc. All rights Reserved. 233
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": "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.
Copyright © Synology Inc. All rights Reserved. 234
Synology Surveillance Station Web API
2.3.27.5 GetAccessControlDoorSchedule method
Get schedule of access control door
Request
Parameter Value Description Availability
doorId <integer> Id of the specified door 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 Value Description Availability
list Array of <EventSch
Object>
List of event scheduling 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 Value Description Availability
CameraId <CAMERA_ID> Id of the specified camera 4 and onward
Copyright © Synology Inc. All rights Reserved. 235
Synology Surveillance Station Web API
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
api="SYNO.SurveillanceStation.Notification.Schedule"&version="1"&cameraId=97&method="GetCameraSc
hedule"
Response
Key Value Description Availability
list Array of <EventSch
Object>
List of event scheduling 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 Value Description Availability
eventType <integer> Type of event 4 and onward
schedule Array of <Sch
Object>
The specified schedule. Actually a 7 * 48 array of
"schedule" object
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"},
Copyright © Synology Inc. All rights Reserved. 236
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": "1"}, {"schedule": "1"},
Copyright © Synology Inc. All rights Reserved. 237
Synology Surveillance Station Web API
{"schedule": "1"}, {"schedule": "1"}]
Response
This method has no specific response data. It returns an empty success response if it completes without error.
2.3.27.8 SetAccessControlSchedule method
Set schedule of access control
Request
Parameter Value Description Availability
eventType <integer> Type of event 4 and onward
schedule Array of <Sch
Object>
The specified schedule. Actually a 7 * 48 array of
"schedule" object
4 and onward
doorId integer Id of the specified door 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"},
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": "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 Value Description Availability
eventType <integer> Type of event 4 and onward
schedule Array of <Sch
Object>
The specified schedule. Actually a 7 * 48 array of
"schedule" object
4 and onward
cameraId <CAMERA_ID> Id of specified camera 4 and onward
Copyright © Synology Inc. All rights Reserved. 239
Synology Surveillance Station Web API
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"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"}, {"schedule": "1"},
{"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. 240
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": "0"}, {"schedule": "1"},
{"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 Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
403 Insufficient license.
404 Codec acitvation failed
Copyright © Synology Inc. All rights Reserved. 241
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 Version Availability
SYNO.SurveillanceStation.Notification.Email 1 Surveillance Station 7.0
Method Name Section Availability
GetSetting
2.3.28.1 1 and onward
SendTestMail
2.3.28.2 1 and onward
SetSetting
2.3.28.3 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 Value Description Availability
attachSnapshot <boolean> Attach snapshot of event or not.
1 and onward
auth <boolean> Need authority or not.
1 and onward
authPassword <string> Password.
1 and onward
authUserName <string> User name.
1 and onward
enableInterval <boolean> Enable the limitation of email interval or not.
1 and onward
mailEnable <boolean> Enable the email notification service or not.
1 and onward
mailMethod <integer> Method of mail.
0: no notifications
1: Use system-wide notification setting
2: Use setting specific to SS
1 and onward
msgInterval <integer> Interval for sending email.
1 and onward
primaryEmail <string> Primary email.
1 and onward
Copyright © Synology Inc. All rights Reserved. 242
Synology Surveillance Station Web API
secondaryEmail <string> Secondary email.
1 and onward
senderMail <string> Sender of notification email.
1 and onward
senderName <string> Name of the sender in email.
1 and onward
smtpServer <string> SMTP server.
1 and onward
smtpServerPort <integer> Port of smtp server.
1 and onward
ssl <boolean> SSL connection or not.
1 and onward
subjectPrefix <string> Prefix of subject.
1 and onward
oauthApply <boolean> Use Google OAuth 2.0
1 and onward
Example:
{
"attachSnapshot": true,
"primaryEmail": "[email protected]",
"enableInterval": false,
"smtpServerPort": 587,
"subjectPrefix": "Hi",
"senderMail": "[email protected]",
"auth": true,
"msgInterval": 1,
"mailMethod": 2,
"ssl": true,
"authUserName": "[email protected]",
"secondaryEmail": "[email protected]",
"mailEnable": true,
"smtpServer": "smtp.live.com",
"senderName": "",
"authPassword": "********",
"oauthApply": false
}
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. 243
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 Value Description Availability
attachSnapshot <boolean>
Optional.
Attach snapshot of event or not.
If not specified, the default value will be true.
1 and onward
auth <boolean>
Optional.
Need authority or not.
If not specified, the default value will be false.
1 and onward
authPassword <string>
Optional (Needed when enable auth).
Password.
1 and onward
authUserName <string>
Optional (Needed when enable auth).
User name.
1 and onward
enableInterval <boolean>
Optional.
Enable the limitation of email interval or not.
If not specified, the default value will be false.
1 and onward
mailEnable <boolean>
Optional.
Enable the email notification service or not.
If not specified, the default value will be false.
1 and onward
mailMethod <integer>
Optional (Needed when email notification service
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.
1 and onward
msgInterval <integer>
Optional.
Interval for sending email.
If not specified, the default value will be 1.
1 and onward
primaryEmail <string>
Optional (Needed when use setting specific to SS). 1 and onward
Copyright © Synology Inc. All rights Reserved. 244
Synology Surveillance Station Web API
Primary email.
secondaryEmail <string>
Optional.
Secondary email.
1 and onward
senderMail <string>
Optional.
Sender of notification email.
1 and onward
senderName <string>
Optional.
Name of the sender in email.
1 and onward
smtpServer <string>
Optional (Needed when use setting specific to SS).
SMTP server.
1 and onward
smtpServerPort <integer>
Optional (Needed when use setting specific to SS).
Port of smtp server.
If not specified, the default value will be 0.
1 and onward
ssl <boolean>
Optional.
SSL connection or not.
If not specified, the default value will be false.
1 and onward
subjectPrefix <string>
Optional.
Prefix of subject.
1 and onward
Example:
GET /webapi/entry.cgi?
subjectPrefix="Hi"&version="1"&attachSnapshot=true&senderMail="[email protected]m"&auth=tru
e&mailMethod=2&ssl=true&authUserName="[email protected]"&senderName="1"&authPass
word="********"&mailEnable=true&primaryEmail="[email protected]"&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 Description
400 Execution failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 245
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 Version Availability
SYNO.SurveillanceStation.Notification.Filter 1 Surveillance Station 7.0
Method Name Section Availability
Set
2.3.29.1 1 and onward
Get
2.3.29.2 1 and onward
2.3.29.1 Set method
Set information of filter in advance tab.
Request
Parameter Value Description Availability
X <integer>
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.
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. 246
Synology Surveillance Station Web API
GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Notification.Filter"&version="1"&method="Get"
Response
Key Value Description Availability
list Array of
<filter_eleme
nt>
List of filter element.
1 and onward
<filter_element> definition:
Key Value Description Availability
eventGroupType <integer> Type of event group.
1: System
2: Camera
3: Access Control
4: VisualStation
5: Server
6: External Device
1 and onward
eventType <integer> 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
1 and onward
Copyright © Synology Inc. All rights Reserved. 247
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. 248
Synology Surveillance Station Web API
},
{
"filter": 1,
"eventType": 4,
"eventGroupType": 2
},
]
}
2.3.29.3 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 249
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 Version Availability
SYNO.SurveillanceStation.Notification.SMS.Servi
ceProvider
1 Surveillance Station 7.0
Method Name Section Availability
Create
2.3.30.1 1 and onward
Set
2.3.30.2 1 and onward
List
2.3.30.3 1 and onward
Delete
2.3.30.4 1 and onward
2.3.30.1 Create method
Create SMS service provider.
Request
Parameter Value Description Availability
providerName <string>
Optional.
Name of SMS provider.
1 and onward
providerPort <integer>
Optional.
Port of SMS provider.
If not specified, the default value will be 0.
1 and onward
providerUrl <string>
Optional.
URL of SMS provider.
1 and onward
providerTemplate <string>
Optional.
Template of SMS provider field.
1 and onward
providerSepChar <string>
Optional.
The substitution of blank space in URL.
1 and onward
providerNeedSSL <boolean>
Optional.
Is SMS provider need SSL or not.
If not specified, the default value will be false.
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. 250
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 Value Description Availability
providerName <string>
Optional.
Name of SMS provider.
1 and onward
providerPort <integer>
Optional.
Port of SMS provider.
If not specified, the default value will be 0.
1 and onward
providerUrl <string>
Optional.
URL of SMS provider.
1 and onward
providerTemplate <string>
Optional.
Template of SMS provider field.
1 and onward
providerSepChar <string>
Optional.
The substitution of blank space in URL.
1 and onward
providerNeedSSL <boolean>
Optional.
Is SMS provider need SSL or not.
If not specified, the default value will be false.
1 and onward
providerOldName <string>
Is SMS provider need SSL or not. 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. 251
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 Value Description Availability
list Array of
<provider_inf
o>
Information of provider. 1 and onward
<provider_info> definition:
Key Value Description Availability
fullUrl <string> Full URL of SMS provider.
1 and onward
id <integer> Id of SMS provider.
1 and onward
name <string> Name of SMS provider.
1 and onward
template <string> Template URL of SMS provider.
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 Value Description Availability
providerName <string>
Optional. 1 and onward
Copyright © Synology Inc. All rights Reserved. 252
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 Description
400 Execution failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 253
Synology Surveillance Station Web API
2.3.31 SYNO.SurveillanceStation.Addons
This API provides method to get Addons service information.
API Name Version Availability
SYNO.SurveillanceStation.Addons 1 DSM 5.1-1594
Method Name Section Availability
GetUpdateInfo 2.3.1.1 1 and onward
Enable 2.3.31.2 1 and onward
CheckUpdateInfo 2.3.31.3 1 and onward
GetInfo 2.3.31.4 1 and onward
List 2.3.31.5 1 and onward
Update 2.3.31.6 1 and onward
CheckEnableDone 2.3.31.7 1 and onward
Disable 2.3.31.8 1 and onward
SetAutoUpdate 2.3.31.9 1 and onward
2.3.31.1 GetUpdateInfo method
Get number of addon services which needs to update.
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 Description Availability
newUpdateCnt <integer> number of addon services which needs to update. 1 and onward
Example:
{
"data": {
"newUpdateCnt": 1
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 254
Synology Surveillance Station Web API
2.3.31.2 Enable method
Enable specific addon service.
Request
Parameter Value Description Availability
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
1 and onward
servicename <string> Optional.
Addon service Name.
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. 255
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 Value Description Availability
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
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 Value Description Availability
Status <integer> 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.
1 and onward
Example:
{
"data" : {
"status": 1
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 256
Synology Surveillance Station Web API
2.3.31.4 GetInfo method
Get specific Addon information by sending service id.
Request
Parameter Value Description Availability
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
1 and onward
Example:
Get Joystick service information.
http://192.168.1.1:5000/webapi/entry.cgi?
api="SYNO.SurveillanceStation.AddOns"&version="1"&service=3&method="GetInfo"
Response
Name Value Description Availability
Info <Info Object> Info Object to represent Information of requested
service.
1 and onward
blEnabled <boolean> Requested service is enabled or not. 1 and onward
modelName <string> Name of DS. 1 and onward
autoUpdate <boolean> This package can be auto updated or not. 1 and onward
<Info Object> definition
Name Value Description Availability
date <string> Release date of service. 1 and onward
maintainer <string> Maintainer of this service. 1 and onward
ssMinVersion <string> Minimum SurveillanceStation version is
supported.
1 and onward
Version <string> Version of service. 1 and onward
Copyright © Synology Inc. All rights Reserved. 257
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 Value Description Availability
list Array of
<packageInfo
Object>
Information of requested service.
1 and onward
Copyright © Synology Inc. All rights Reserved. 258
Synology Surveillance Station Web API
<package
Info Object> definition
Name Value Description Availability
info <serviceInfo Object> Information of this service. 1 and onward
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
1 and onward
<serviceInfo Object> definition
Name Value Description Availability
info <Info Object> Information of this service. 1 and onward
blEnabled <boolean> This service is enabled or not. 1 and onward
modelName <string> Name of DS. 1 and onward
autoUpdate <boolean> This service is support autoupdated or not. 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. 259
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. 260
Synology Surveillance Station Web API
2.3.31.6 Update method
Update package by service type of package file.
Request
Parameter Value Description Availability
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
1 and onward
filePath <string> Optional.
Path of package file. If the package is installed
manually, then the path is needed.
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. 261
Synology Surveillance Station Web API
2.3.31.7 CheckEnableDone method
Check specific addon service is successfully enabled or disabled.
Request
Parameter Value Description Availability
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
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 Value Description Availability
blDone <boolean> Service is successfully enabled or disabled. 1 and onward
Example:
Get total addOns package information List.
{
"data" : {
"blDone": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 262
Synology Surveillance Station Web API
2.3.31.8 Disable method
Disable specific addon service.
Request
Parameter Value Description Availability
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
1 and onward
serviceName <string> Optional.
Addon service Name.
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. 263
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 Value Description Availability
service <integer> Addon Service type of SurveillanceStation.
0: Undefined
1: SERVICE_DEVICE_PACK.
2: SERVICE_CMS
3: SERVICE_VS
4: SERVICE_JOYSTICK
5: SERVICE_ACSCTRL
1 and onward
BlEnabled <true> this service is enabled autoUpdate functionality
or not.
1 and onward
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 Description
400 Execution failed.
Copyright © Synology Inc. All rights Reserved. 264
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 Version Availability
SYNO.SurveillanceStation.Alert 1 DSM 4.0-2198
Method Name Section Availability
RecServerClear 2.3.2.1 1 and onward
EventCount 2.3.2.2 1 and onward
ClearSelected 2.3.32.3 1 and onward
Clear 2.3.32.4 1 and onward
Enum 2.3.32.5 1 and onward
RecServerEnum 2.3.32.6 1 and onward
Unlock 2.3.32.7 1 and onward
Trigger 2.3.32.8 1 and onward
EventFlushHeader 2.3.32.9 1 and onward
Lock 2.3.32.10 1 and onward
RecServerEventCount 2.3.32.11 1 and onward
2.3.32.1 RecServerClear method
Delete specific camera's all events in recording server.
Request
Parameter Value Description Availability
camIdList <string> The deleted camera ID list. 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. 265
Synology Surveillance Station Web API
2.3.32.2 EventCount method
Get cameras' analytics event count.
Request
Parameter Value Description Availability
camIdList <string> The deleted camera ID list. 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 Value Description Availability
eventCount Array of
<eventCount
Object>
Cameras' event count info. 1 and onward
<eventCount Object> definition
Name Value Description Availability
dsId <integer> Events' owner dsId. 1 and onward
id <integer> Unique analytics event id. 1 and onward
archived <boolean> Point out that this is archived or not. 1 and onward
Example:
{
"data": {
"eventCount": [
{
"eventCnt": 10,
"dsId": 0,
"cameraId": 3
},
{
"eventCnt": 0,
"dsId": 0,
"cameraId": 7
},
{
"eventCnt": 3,
"dsId": 6,
"cameraId": 2
}]
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 266
Synology Surveillance Station Web API
2.3.32.3 ClearSelected method
Delete selected events.
Request
Parameter Value Description Availability
dsIdList <string> Event ds id lists. 1 and onward
idList <string> 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 Value Description Availability
camIdList <string> The deleted camera ID list. 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. 267
Synology Surveillance Station Web API
2.3.32.5 Enum method
Enumerate analytics history event list by specific filter conditions.
Request
Parameter Value Description Availability
camIdList <string> The deleted camera ID list. 1 and onward
typeListstring
<string> Optional.
Archive status.
0: EL_UNKNOWN
1: EL_NONLOCK
2: EL_LOCK
1 and onward
typeListstring
<string> 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
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 Value Description Availability
history <history Object> The selected cameras' analytics events. 1 and onward
total <integer> Total count of selected events. 1 and onward
<history Object> definition
Name Value Description Availability
Id <integer> Unique analytics event id. 1 and onward
name <string> Path of event. 1 and onward
Reason <integer> Analytics type of event.
0: ANALYTICS_TYPE_NONE
1: ANALYTICS_TYPE_MOTION
2: ANALYTICS_TYPE_MISSING_OBJ
3: ANALYTICS_TYPE_FOREIGN_OBJ
1 and onward
Copyright © Synology Inc. All rights Reserved. 268
Synology Surveillance Station Web API
4: ANALYTICS_TYPE_CAM_OCCLUSION
5: ANALYTICS_TYPE_FOCUS_LOST
6: ANALYTICS_TYPE_LOITERING
7: ANALYTICS_TYPE_OBJ_COUNTING
8: ANALYTICS_TYPE_VIRTUAL_FENCE
startTime <integer> Start time of event. 1 and onward
stopTime <integer> Stop time of event. 1 and onward
archived <boolean> Point out that this is archived or not. 1 and onward
frameCount <integer> Frame count of event. 1 and onward
video_type <integer> Video type of Event. 1 and onward
recording <boolean> Point out that this is recording or not. 1 and onward
is_complete <boolean> Point out that this has finished recording or
not.
1 and onward
eventSize <float> Size of event in MB. 1 and onward
audio_format <string> Audio format of event. 1 and onward
closing <boolean> Point out that this is closing or not. 1 and onward
fisheye_type <integer> 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
1 and onward
fisheye_origin_vie
w
<boolean> Point out that this is fisheye origin view or not. 1 and onward
snapshot_medium <string> Snapshot of event. 1 and onward
mountId <integer> Mount id of event. (always be 0 in analytics
event)
1 and onward
dsId <integer> Event's owner dsId. 1 and onward
cameraId <integer> Unique camera id. (id on recording server) 1 and onward
camera_name <string> Camera name. 1 and onward
volume <integer> Camera volume. 1 and onward
mute <boolean> Point out that the camera is mute or not. 1 and onward
imageEnhanceme
nt
<imageEnhancement
Object>
Camera's image enhancement info. 1 and onward
<imageEnhancement Object> definition
Key Value Description Availability
brightness <integer> Camera's brightness parameter of image
enhancement.
1 and onward
contrast <integer> Camera's contrast parameter of image
enhancement.
1 and onward
saturation <integer> Camera's saturation parameter of image
enhancement.
1 and onward
sharpness <integer> Camera's sharpness parameter of image
enhancement.
1 and onward
Copyright © Synology Inc. All rights Reserved. 269
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. 270
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. 271
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 Value Description Availability
camIdList <string> The deleted camera ID list. 1 and onward
dsId <integer>
server's ds id.
1 and onward
lock <integer> Optional.
Archive status.
0: EL_UNKNOWN
1: EL_NONLOCK
2: EL_LOCK
1 and onward
typeList <string> 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
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 Value Description Availability
history <history Object> The selected cameras' analytics events. 1 and onward
Example:
{
"data": {
"history": {
"mute": false,
"fisheye_type": 0,
"id": 313,
"frameCount": 175,
"archived": true,
"cameraId": 5,
"mountId": 0,
"stopTime": 1421985306,
"audio_format": "MPEG4-GENERIC",
Copyright © Synology Inc. All rights Reserved. 272
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. 273
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 Value Description Availability
dsId <integer> Events' ds id. 1 and onward
idList <string> Event id list 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 Value Description Availability
events Array of <events
Object>
selected events' lock info. 1 and onward
<events Object> definition
Key Value Description Availability
dsId <integer> Events' owner dsId. 1 and onward
id <integer> Unique analytics event id. 1 and onward
archived <boolean> Point out that this is archived or not. 1 and onward
Example:
{
"data": {
"events": [
Copyright © Synology Inc. All rights Reserved. 274
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. 275
Synology Surveillance Station Web API
2.3.32.8 Trigger method
Set cameras' analytics triggered
Request
Parameter Value Description Availability
trigCamIdList <string> The triggered camera ID list. 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 Value Description Availability
eventId <integer> Event ID. 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. 276
Synology Surveillance Station Web API
2.3.32.10 Lock method
Lock the selected events.
Request
Parameter Value Description Availability
dsId <integer> Events' ds id. 1 and onward
idList <string> Event id list 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 Value Description Availability
events Array of <events
Object>
selected events' lock info. 1 and onward
Example:
{
"data": {
"events": [
{
"archived": true,
"dsId": 6,
"id": 13
},
{
"archived": true,
"dsId": 6,
"id": 25
}
]
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 277
Synology Surveillance Station Web API
2.3.32.11 RecServerEventCount method
Get cameras' analytics event count in recording server.
Request
Parameter Value Description Availability
camIdList <string> Camera ID list. 1 and onward
idList <integer> Camera's owner ds ID. 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 Value Description Availability
eventCount Array of
<eventCount
Object>
selected events' lock info. 1 and onward
<eventCount Object> definition
Key Value Description Availability
dsId <integer> Events' owner dsId. 1 and onward
cameraId <integer> Unique camera id. (id on recording server) 1 and onward
eventCnt <integer> Total analytics event count of the specific camera. 1 and onward
Example:
{
"data": {
"eventCount": [
{
"eventCnt": 2,
"dsId": 6,
"cameraId": 10
},
{
"eventCnt": 0,
"dsId": 6,
"cameraId": 13
}
]
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 278
Synology Surveillance Station Web API
2.3.32.12 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
407 CMS closed.
Copyright © Synology Inc. All rights Reserved. 279
Synology Surveillance Station Web API
2.3.33 SYNO.SurveillanceStation.Alert.Setting
This API provides method to get analytics settings
API Name Version Availability
SYNO.SurveillanceStation.Alert.Setting 1 Surveillance Station 6.0-2337
Method Name Section Availability
Save 2.3.3.1 1 and onward
2.3.33.1 Save method
Save analytics settings
Request
Parameter Value Description Availability
camId <integer> The selected camera id. 1 and onward
type <integer> 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
1 and onward
showFrame <boolean> Point out that show frame or not. 1 and onward
showLine <boolean> Point out that show line or not. 1 and onward
showVirtualFence <boolean> Point out that show virtual fence or not. 1 and onward
beep <boolean> Point out that beep or not. 1 and onward
sens <integer> Analytics sensitivity.
0: ANALYTICS_SENS_LOW
1: ANALYTICS_SENS_MEDIUM
2: ANALYTICS_SENS_HIGH
1 and onward
dwellTime <integer> Analytics dwellTime for
ANALYTICS_TYPE_LOITERING.
1 and onward
direction <integer> Analytics direction (no longer relevent). 1 and onward
objSize <integer> Analytics objSize for
ANALYTICS_TYPE_FOREIGN_OBJ.
1 and onward
region <string> Analytics region. 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. 280
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 Value Description Availability
success <boolean> Success or not. 1 and onward
Example:
{
"data": {
"success": boolean
},
"success": true
}
2.3.33.2 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
407 CMS closed.
Copyright © Synology Inc. All rights Reserved. 281
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 Version Availability
SYNO.SurveillanceStation.SnapShot 1 Surveillance Station 6.0-2337
Method Name Section Availability
ChkFileExist 2.3.4.1 1 and onward
Edit 2.3.4.3 1 and onward
CountByCategory 2.3.34.3 1 and onward
ChkContainLocked 2.3.4.4 1 and onward
UnlockFiltered 2.3.4.5 1 and onward
List 2.3.34.6 1 and onward
Unlock 2.3.34.7 1 and onward
TakeSnapshot 2.3.34.8 1 and onward
GetSetting 2.3.34.9 1 and onward
DeleteFiltered 2.3.34.10 1 and onward
LoadSnapshot 2.3.34.11 1 and onward
Lock 2.3.34.12 1 and onward
Download 2.3.34.13 1 and onward
LockFiltered 2.3.34.14 1 and onward
SaveSetting 2.3.34.15 1 and onward
Save 2.3.34.16 1 and onward
ChkSnapshotValid 2.3.34.17 1 and onward
GetCapabilityByCamIdDelete 2.3.34.18 1 and onward
2.3.34.1 ChkFileExist method
Check if the snapshot file is exist.
Request
Parameter Value Description Availability
id <integer> Id of the snapshot file to check if exist. 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. 282
Synology Surveillance Station Web API
2.3.34.2 Edit method
Save the modification of snapshot.
Request
Parameter Value Description Availability
id <integer> Id of the snapshot. 1 and onward
createCopy <boolean> Optional.
Set true to create another snapshot and save modification
to it.
1 and onward
width <integer> Width of snapshot. 1 and onward
height <integer> Height of snapshot. 1 and onward
byteSize <integer> File size of snapshot in byte. 1 and onward
imageData <string> Image data of snapshot in base64 format. 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. 283
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 Value Description Availability
recordData <Details Object> Information and image about the snapshot. 1 and onward
snapshotId <integer> Id of the saevd snapshot. 1 and onward
success <boolean> Success or not. 1 and onward
<Details Object> definition
Key Value Description Availability
id <integer> Id of snapshot. 1 and onward
height <integer> Height of snapshot. 1 and onward
width <integer> Width of snapshot. 1 and onward
recordId <string> Identification in cms "{server_id}_{id_on_server}". 1 and onward
camName <string> Camera name of the snapshot. 1 and onward
fileName <string> File path where the snapshot is saved. 1 and onward
imageData <string> Image data in base64 format. 1 and onward
modifiedCnt <integer> Modified count. 1 and onward
markAsDel <boolean> True if the snapshot is mark as deleted. 1 and onward
locked <boolean> True if the snapshot is locked. 1 and onward
byteSize <integer> File size of snapshot in byte. 1 and onward
createdTm <integer> Timestamp of the last modification of snapshot
image.
1 and onward
lastModifiedTm <integer> Timestamp of the last modification of snapshot
image.
1 and onward
update_time <integer> Timestamp of the last modification of snapshot
database.
1 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 284
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. 285
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 Value Description Availability
keyword <string> Optional.
Name of the camera vendor.
1 and onward
from <integer> Optional.
UTC unix timestamp, used to select all snapshots
later than this timestamp from database, 0 means
no filter.
1 and onward
to <integer> Optional.
UTC unix timestamp, used to select all snapshots
earlier than this timestamp from database, 0
means no filter.
1 and onward
timezoneOffset <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
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. 286
Synology Surveillance Station Web API
Response
Key Value Description Availability
date <CountByDate Object> Count of snapshot. 1 and onward
total <integer> Total number of snapshots. 1 and onward
<CountByDate Object> definition:
Key Value Description Availability
-1 <integer> Total number count. 1 and onward
yyyy/mm/dd <TimeCnt Object> Number count of log of yyyy/mm/dd.
(Ex:1990/05/09)
1 and onward
<TimeCnt Object> definition:
Key Value Description Availability
-1 <integer> Total number count in this day. 1 and onward
am <integer> Number count of snapshot in am. 1 and onward
pm <integer> Number count of snapshot in pm. 1 and onward
Example:
{
"data": {
"date": {
"2015/01/03": {
"am": 0,
"-1": 2,
"pm": 2
},
"-1": 2
},
"total": 2
}
}
Copyright © Synology Inc. All rights Reserved. 287
Synology Surveillance Station Web API
2.3.34.4 ChkContainLocked method
Check if there is any snapshot locked.
Request
Parameter Value Description Availability
id <string> Optional.
The specified snapshot id selected from database.
If not specified, the id list will be empty string and have no
effect.
1 and onward
from <integer> Optional.
UTC unix timestamp, used to select all snapshots later than
this timestamp from database, 0 means no filter.
1 and onward
to <integer> Optional.
UTC unix timestamp, used to select all snapshots earlier
than this timestamp from database, 0 means no filter.
1 and onward
keyword <string> Optional.
Query keyword.
1 and onward
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 Value Description Availability
containLocked <integer> True if there is any snapshot locked. 1 and onward
total <integer> The number of snapshots selected by
the given filter condition.
1 and onward
Example:
{
"data": {
"total": 3,
"containLocked": false
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 288
Synology Surveillance Station Web API
2.3.34.5 UnlockFiltered method
Unlock snapshots selected by filter condition.
Request
Parameter Value Description Availability
from <integer> Optional.
UTC unix timestamp, used to select all
snapshots later than this timestamp from
database, 0 means no filter.
1 and onward
to <integer> Optional.
UTC unix timestamp, used to select all
snapshots earlier than this timestamp from
database, 0 means no filter.
1 and onward
keyword <string> Optional.
Query keyword.
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. 289
Synology Surveillance Station Web API
2.3.34.6 List method
List snapshots information.
Request
Parameter Value Description Availability
idList <string> Optional.
The specified snapshot id selected from database.
If not specified, the id list will be empty string and have
no effect.
1 and onward
start <integer > Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
1 and onward
limit <integer > Optional.
The number of the snapshots to be selected in database.
If not specified, the limit will be 0.
1 and onward
from <integer > Optional.
UTC unix timestamp, used to select all snapshots later
than this timestamp from database, 0 means no filter.
1 and onward
to <integer > Optional.
UTC unix timestamp, used to select all snapshots earlier
than this timestamp from database, 0 means no filter.
1 and onward
keyword <string> Optional.
Query keyword.
1 and onward
imgSize <integer > Optional.
Set image size that will append in the return data.
0: Do not append image
1: Icon size
2: Full size
1 and onward
blIncludeAuInfo <boolean> Optional.
Set true to append snapshot auto-update information in
the return data.
1 and onward
blIncludeRecCnt <boolean> Optional.
Set true to append snapshot category count in the
return data.
1 and onward
camId <integer > Optional.
The sanpshots of the specified camera id selected from
database.
1 and onward
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. 290
Synology Surveillance Station Web API
Name Value Description Availability
auInfo
<string>
Information for auto update
4
data Array of <Details
Object>
Details of snapshot. 4
timestamp <boolean> Time stamp 4 and onward
total <integer> Total number of snapshots. 4 and onward
<Details Object> definition
Key Value Description Availability
byteSize <integer> The snapshot size. 1 and onward
camId <integer> The camera Id of snapshot. 1 and onward
camName <string> The camera name of snapshot. 1 and onward
createdTm <integer> The timestamp of snapshot created. 1 and onward
DisplayTm <integer> The timestamp of snapshot displayed. 1 and onward
fileName <string> The file name of snapshot. 1 and onward
height <integer> The image height of snapshot. 1 and onward
id <integer> The Id of snapshot. 1 and onward
total <integer> Total number of snapshots. 1 and onward
width <integer> Width of snapshot. 1 and onward
recordId <string> Identification in cms "{server_id}_{id_on_server}". 1 and onward
imageData <string> Image data in base64 format. 1 and onward
modifiedCnt <integer> Modified count. 1 and onward
markAsDel <boolean> True if the snapshot is mark as deleted. 1 and onward
locked <boolean> True if the snapshot is locked. 1 and onward
lastModifiedTm <integer> Timestamp of the last modification of snapshot
image.
1 and onward
update_time <integer> Timestamp of the last modification of snapshot
database.
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. 291
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. 292
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. 293
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. 294
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 Value Description Availability
objList Array of <ObjItem
Object>
List of snapshots going to be locked. 1 and onward
<ObjItem Object> definition
Key Value Description Availability
id <string> 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. 295
Synology Surveillance Station Web API
2.3.34.8 TakeSnapshot method
Take a snapshot of the specified camera on the specified server.
Request
Parameter Value Description Availability
dsId <integer> DS Id that user want to take snapshot. 1 and onward
camId <integer> Camera Id that user want to take snapshot. 1 and onward
blSave <boolean> Optional.
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.
1 and onward
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 Value Description Availability
id <integer>
Id of snapshot.
1 and onward
Example:
{
"data": {
"id": 1
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 296
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 Value Description Availability
setting <Setting Object> Current setting of snapshot functions. 1 and onward
<Setting Object> definition
Key Value Description Availability
dispSnapshot <boolean> Display the taken snapshot or not. 1 and onward
dispDuration <integer> 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
1 and onward
limitTotalSize <boolean> True if the total file size of snapshots is limited. 1 and onward
limitSizeInGb <integer> Limited size of snapshots in giga-byte. 1 and onward
storageMode <integer> Count of snapshot.0: On the top 1: On the bottom 1 and onward
addTimestamp <boolean> Append timestamp or not on the downloaded
snapshot.
1 and onward
timestampPositio
n
<integer> Position of the appended timestamp. 0: On the top
1: On the bottom
1 and onward
Example:
{
"data": {
"setting": {
"timestampPosition": 0,
"limitSizeInGb": 1,
"storageMode": 0,
"dispDuration": 5,
Copyright © Synology Inc. All rights Reserved. 297
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 Description Availability
deleteAllComman
d
<boolean> Optional.
Specify to delete all snapshots or filtered snapshots.
1 and onward
from <integer> Optional.
UTC unix timestamp, used to select all snapshots later
than this timestamp from database, 0 means no filter.
1 and onward
to <integer> Optional.
UTC unix timestamp, used to select all snapshots
earlier than this timestamp from database, 0 means
no filter.
1 and onward
keyword <string> Optional.
Query keyword.
1 and onward
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. 298
Synology Surveillance Station Web API
2.3.34.11 LoadSnapshot method
Get snapshot image.
Request
Parameter Value Description Availability
Id <integer> Id of the snapshot file to download. 1 and onward
imgSize <integer> Optional.
Set image size that will append in the return data.
0: Do not append image
1: Icon size
2: Full size
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 Value Description Availability
objList Array of <ObjItem
Object>
List of snapshots going to be locked. 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. 299
Synology Surveillance Station Web API
2.3.34.13 Download method
Download single snapshot image.
Request
Parameter Value Description Availability
id <integer> Id of the snapshot file to download. 1 and onward
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.
2.3.34.14 LockFiltered method
Lock snapshots selected by filter condition.
Request
Parameter Value Description Availability
from <integer> Optional.
UTC unix timestamp, used to select all snapshots
later than this timestamp from database, 0 means no
filter.
1 and onward
to <integer> Optional.
UTC unix timestamp, used to select all snapshots
earlier than this timestamp from database, 0 means
no filter.
1 and onward
keyword <string> Optional.
Query keyword.
1 and onward
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. 300
Synology Surveillance Station Web API
2.3.34.15 SaveSetting method
Save and apply new setting to snapshot functions.
Request
Parameter Value Description Availability
dispSnapshot <boolean> Display the taken snapshot or not. 1 and onward
dispDuration <integer> 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
1 and onward
limitTotalSize <boolean> True if the total file size of snapshots is limited. 1 and onward
limitSizeInGb <integer> Limited size of snapshots in giga-byte. 1 and onward
addTimestamp <boolean> Append timestamp or not on the downloaded
snapshot.
1 and onward
timestampPositio
n
<integer> Position of the appended timestamp.
0: On the top
1: On the bottom
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 Value Description Availability
setting <Setting Object> Current setting of snapshot functions. 1 and onward
Example:
{
"data": {
"setting": {
"timestampPosition": 0,
"limitSizeInGb": 1,
"storageMode": 0,
"dispDuration": 5,
"dispSnapshot": true,
"addTimestamp": true,
"limitTotalSize": true
}
Copyright © Synology Inc. All rights Reserved. 301
Synology Surveillance Station Web API
},
"success": true
}
2.3.34.16 Save method
Save snapshot.
Request
Parameter Value Description Availability
camName <string> Camera name of the snapshot. 1 and onward
createdTm <integer> Created time of the snapshot. 1 and onward
width <integer> Width of snapshot. 1 and onward
height <integer> Height of snapshot. 1 and onward
byteSize <integer> File size of snapshot in byte. 1 and onward
imageData <string> Image data of the snapshot in base64 format. 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. 302
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 Value Description Availability
createdTm <integer> Created time of the snapshot. 1 and onward
snapshotId <integer> Id of the saevd snapshot. 1 and onward
success <boolean> Success or not. 1 and onward
Example:
{
"data": {
"createdTm": 1423539583,
"snapshotId": 156744,
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 303
Synology Surveillance Station Web API
2.3.34.17 ChkSnapshotValid method
Check status of the snapshot.
Request
Parameter Value Description Availability
dispSnapshot <boolean> Id of snapshot checked. 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 Value Description Availability
itemStatus <integer> Current setting of snapshot functions. 1 and onward
Example:
{
"data": {
"itemStatus": integer
},
"success": boolean
}
Copyright © Synology Inc. All rights Reserved. 304
Synology Surveillance Station Web API
2.3.34.18 Delete method
Delete the selected snapshots.
Request
Parameter Value Description Availability
objList Array of <ObjItem
Object>
List of snapshots going to be locked. 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 Description
105 No permission.
400 Execution failed.
418 Object is not exist.
Copyright © Synology Inc. All rights Reserved. 305
Synology Surveillance Station Web API
2.3.35 SYNO.SurveillanceStation.VisualStation
This API provides method to get information of VisualStation.
API Name Version Availability
SYNO.SurveillanceStation.VisualStation 1 Surveillance Station 6.0-2337
Method Name Section Availability
Enable 2.3.9.1 1 and onward
ReqNetConfig 2.3.9.2 1 and onward
Edit 2.3.35.3 1 and onward
Lock 2.3.35.4 1 and onward
Enum 2.3.35.5 1 and onward
Unlock 2.3.9.3 1 and onward
Disable 2.3.9.4 1 and onward
Delete 2.3.9.5 1 and onward
2.3.35.1 Enable method
Enable specific VisualStations by VS IDs.
Request
Parameter Value Description Availability
vslists <string> The enabled VisualStation list. 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 Value Description Availability
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 306
Synology Surveillance Station Web API
2.3.35.2 ReqNetConfig method
Update network configuration of the VisualStation.
Request
Parameter Value Description Availability
vsMac <string> Optional.
MAC address of this VisualStation.
1 and onward
ip <string> Optional.
IP address of this VisualStation.
1 and onward
mask <string> Optional.
Subnet mask of this VisualStation.
1 and onward
gateway <string> Optional.
Gateway address of this VisualStation.
1 and onward
blDhcp <boolean> Optional.
The IP address is set by DHCP or not.
1 and onward
name <string> Optional.
The name of this VisualStation.
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 Value Description Availability
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 307
Synology Surveillance Station Web API
2.3.35.3 Edit method
Save the setting of VisualStation.
Request
Parameter Value Description Availability
data <EditParam Object> Optional.
Updated setting of VisualStation.
1 and onward
<EditParam Object> definition
Key Value Description Availability
vsId <integer> ID of VisualStation. 1 and onward
name <string> Name of VisualStation. 1 and onward
ip <string> IP address of this VisualStation. 1 and onward
mac <string> Mac address of this VisualStation. 1 and onward
platform <string> Platform of this VisualStation. 1 and onward
version <string> Version of this VisualStation. 1 and onward
maxch <string> Maximum channel number of this VisualStation. 1 and onward
capflags <string> VisualStation capability.
0: FLAG_VS_CAP_NONE
1: FLAG_VS_CAP_TIMEZONE
1 and onward
dhcp <string> Point out that IP address of this VisualStation is
assigned by dhcp or manual.
1 and onward
newIP <string> New IP address of this VisualStation by manual
setting.
1 and onward
subnet <string> Subnet mask of this VisualStation. 1 and onward
gateway <string> gateway address of this VisualStation. 1 and onward
timezone <string> Timezone of this VisualStation. 1 and onward
language <string> Language of this VisualStation. 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 Value Description Availability
success <boolean> Successful or not. 1 and onward
Example:
{
Copyright © Synology Inc. All rights Reserved. 308
Synology Surveillance Station Web API
"data": {
"success": true
},
"success": true
}
2.3.35.4 Lock method
Lock specific VisualStations by VS IDs.
Request
Parameter Value Description Availability
vslists <string> The locked VisualStation list. 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 Value Description Availability
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 309
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 Value Description Availability
VS Array of <VS Object> Saved Layout ID. 1 and onward
total <integer> Number of VisualStation. 1 and onward
<VS Object> definition
Key Value Description Availability
capFlags
<integer> VisualStation capability.
0: FLAG_VS_CAP_NONE
1: FLAG_VS_CAP_TIMEZONE
1 and onward
defLayout
Array of <integer> Point out that IP address of this VisualStation is
assigned by dhcp or not.
1 and onward
dhcp <boolean> Point out that IP address of this VisualStation is
assigned by dhcp or not.
1 and onward
dsStatus <integer> DS status of the camera. 1 and onward
enable <boolean> This VisualStation is enabled or not. 1 and onward
gateway <string> gateway address of this VisualStation. 1 and onward
id <integer> ID of VisualStation. 1 and onward
idOnRecServer <integer> ID of this VisualStation on recording server. 1 and onward
ip <string> IP address of this VisualStation. 1 and onward
language <string> Language of this VisualStation. 1 and onward
Lock <integer> VisualStation is locked or not. 1 and onward
macaddr <string> MAC address of this VisualStation. 1 and onward
mask <string> Netmask of this VisualStation. 1 and onward
maxch <integer> Maximum channel number of this VisualStation. 1 and onward
name <string> Name of this VisualStation. 1 and onward
ownerDsId <integer> Owner DS ID of this VisualStation. 1 and onward
platform <string> Platform of this VisualStation. 1 and onward
status <integer> Status of this VisualStation. 1 and onward
timezone <string> Timezone of this VisualStation. 1 and onward
version <string> Package version of VisualStation. 1 and onward
Copyright © Synology Inc. All rights Reserved. 310
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. 311
Synology Surveillance Station Web API
2.3.35.6 Unlock method
Unlock specific VisualStations by VS IDs.
Request
Parameter Value Description Availability
vslists <string> The unlocked VisualStation list. 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 Value Description Availability
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 312
Synology Surveillance Station Web API
2.3.35.7 Disable method
Disable specific VisualStations by VS Ids.
Request
Parameter Value Description Availability
vslists <string> The unlocked VisualStation list. 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 Value Description Availability
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 313
Synology Surveillance Station Web API
2.3.35.8 Delete method
Delete specific VisualStations from SurveillanceStation.
Request
Parameter Value Description Availability
vslists <string> The unlocked VisualStation list. 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 Value Description Availability
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
2.3.35.9 API Error Code
Code Description
100 Unknown error.
400 Execution failed.
419 Visualstation name repetition.
Copyright © Synology Inc. All rights Reserved. 314
Synology Surveillance Station Web API
2.3.36 SYNO.SurveillanceStation.VisualStation.Layout
This API provides method to get layout information of VisualStation.
API Name Version Availability
SYNO.SurveillanceStation.VisualStation.Layout 1 Surveillance Station 6.0-2337
Method Name Section Availability
Enum 2.3.10.1 1 and onward
Save 2.3.36.2 1 and onward
Delete 2.3.36.3 1 and onward
2.3.36.1 Enum method
Enumerate Layout Inforamtion of VisualStation.
Request
Parameter Value Description Availability
vsId <Integer> ID of VisualStation. 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 Value Description Availability
data Array of <layoutList Object> Layout List of VisualStation. 1 and onward
success <boolean> Successful or not. 1 and onward
<layoutList Object> definition
Key Value Description Availability
camGrpName <string> camera Group Name. 1 and onward
camGrpId <integer> camera Group ID.
-1: normal camera.
other than -1, camera group ID.
1 and onward
channelList Array of
<cameraList
Object>
Camera list of the layout. 1 and onward
layoutType <integer> 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.
1 and onward
Copyright © Synology Inc. All rights Reserved. 315
Synology Surveillance Station Web API
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
isFixAspectRatio <string> The layout is FixAspectRatio or not. 1 and onward
customPosList Array of
<customPosList
Object>
Customized Channel location list of this layout. 1 and onward
id <integer> The layout ID. 1 and onward
isDefault <boolean> The layout is default or not. 1 and onward
name <string> The name of layout. 1 and onward
<cameraList Object> definition
Key Value Description Availability
name <string> The camera name. 1 and onward
dsId <integer> The DS ID of the camera. 1 and onward
dsName <string> The DS name of the camera. 1 and onward
location <integer> The location of the camera in specific layout. 1 and onward
type <integer> The type of camera. 1 and onward
id <integer> The ID of the camera. 1 and onward
<customPosList Object> definition
Key Value Description Availability
customPosList Array of <posList
Object>
Customized channel display information of layout. 1 and onward
<posList Object> definition
Key Value Description Availability
posList 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.
1 and onward
Example:
{
"data": {
"data": [
Copyright © Synology Inc. All rights Reserved. 316
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. 317
Synology Surveillance Station Web API
2.3.36.2 Save method
Save layout inforamtion into VisualStation
Request
Parameter Value Description Availability
id <Integer> The DS ID of the VisualStation. 1 and onward
vsId <Integer> ID of VisualStation. 1 and onward
name <string> Optional.
Name of VisualStation.
1 and onward
canGrpId <Integer> Optional.
camera Group Id.
-1: normal camera.
otherwise, camera group.
1 and onward
isDefault <Integer> This layout is default or not.
0: false
1: true
1 and onward
isFixAspectRatio <Integer> Optional.
This layout is FixAspectRatio or not.
0: false
1: true
1 and onward
layoutType <Integer> 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
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
1 and onward
channelList Array of <channelList
Object>
Channel information list of this layout. 1 and onward
customPosList <string> Optional.
Customized channel display information of
layout.
1 and onward
<channelList Object> definition
Key Value Description Availability
location <integer> Camera location in layout. 1 and onward
itemType <Integer> Item type in layout.
0: ITEM_TYPE_CAM
1 and onward
Copyright © Synology Inc. All rights Reserved. 318
Synology Surveillance Station Web API
1: ITEM_TYPE_EMAP
2: ITEM_TYPE_DOOR
3: ITEM_TYPE_CAMGRP
camId <Integer> Camera ID. 1 and onward
camName <string> Name of the camera. 1 and onward
regionId <Integer> Region ID of the fisheye camera.0: for other kinds of
camera.other than 0, The region ID of the fisheye
camera.
1 and onward
dsId <Integer> The DS ID of the camera. 1 and onward
dsName <string> The DS name of the camera. 1 and onward
mountId <Integer> Mounted ID of the camera.0: Not mounted
cameraother than, mounted ID.
1 and onward
regionName <string> Region name of the fisheye camera. 1 and onward
fisheyeType <Integer> Type of fisheye.
0: no fisheye
other than 0: one of vendor
1 and onward
regionType <Integer> Type of fisheye region.
-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
1 and onward
resolution <string> The resolution of the camera. 1 and onward
id <Integer> The ID of the camera. 1 and onward
name <string> The name of the camera. 1 and onward
type <Integer> The type of the camera.
0: VS_LCT_UNKNOWN
1: VS_LCT_CAMERA
2: VS_LCT_EMAP
1 and onward
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 Value Description Availability
id <Integer> The saved layout ID. 1 and onward
Copyright © Synology Inc. All rights Reserved. 319
Synology Surveillance Station Web API
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"id": 12,
"success": true
},
"success": true
}
2.3.36.3 Delete method
Delete specific Layout of VisualStation.
Request
Parameter Value Description Availability
id <string> The deleted ID list of layout. 1 and onward
vsId <integer> The VisualStation ID of the layout. 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 Value Description Availability
newDefLayoutId <integer> New default layout ID. 1 and onward
success <boolean> Successful or not. 1 and onward
Example:
{
"data": {
"newDefLayoutId": 0,
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 320
Synology Surveillance Station Web API
2.3.36.4 API Error Code
Code Description
100 Unknown error.
418 The VisualStation ID does not exist.
Copyright © Synology Inc. All rights Reserved. 321
Synology Surveillance Station Web API
2.3.37 SYNO.SurveillanceStation.VisualStation.Search
This API provides method to query visual station information.
API Name Version Availability
SYNO.SurveillanceStation.VisualStation.Search 1 Surveillance Station 6.0-2337
Method Name Section Availability
Start 2.3.11.1 1 and onward
SearchIP 2.3.37.2 1 and onward
Stop 2.3.37.3 1 and onward
InfoGet 2.3.37.4 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 Value Description Availability
success <boolean> Success or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 322
Synology Surveillance Station Web API
2.3.37.2 SearchIP method
Get specific VisualStation Information by IP address.
Request
Parameter Value Description Availability
ip <string> IP address of the VisualStation. 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 Value Description Availability
vsInfo Array of <vsList
Object>
Information of this VisualStation. 1 and onward
success <boolean> If the action of delete succuess. 1 and onward
<vsList Object> definition:
Key Value Description Availability
capFlags <integer> VisualStation capability.
0: FLAG_VS_CAP_NONE
1: FLAG_VS_CAP_TIMEZONE
1 and onward
dhcp <boolean> Point out that IP address of this VisualStation is assigned by
dhcp or not.
1 and onward
gateway <string> Gateway address of this VisualStation. 1 and onward
ip <string> IP address of this VisualStation. 1 and onward
lock <boolean> VisualStation is locked or not. 1 and onward
macAddr <string> MAC address of this VisualStation. 1 and onward
mask <string> Netmask of this VisualStation. 1 and onward
maxch <integer> Maximum channel number of this VisualStation. 1 and onward
name <string> Name of this VisualStation. 1 and onward
platform <string> Platform of this VisualStation. 1 and onward
version <string> 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. 323
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 Value Description Availability
success <boolean> Success or not. 1 and onward
Example:
{
"data": {
"success": true
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 324
Synology Surveillance Station Web API
2.3.37.4 InfoGet method
Get VisualStation information List and indexed by offset.
Request
Parameter Value Description Availability
offset <integer> Optional.
The offset of visualstation list.
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 Value Description Availability
vsList Array of
<vsList
Object>
The offset of visualstation list. 1 and onward
success <boolean> Success or not. 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. 325
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. 326
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. 327
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 Description
100 Unknown error.
417 Test Connection Error.
Copyright © Synology Inc. All rights Reserved. 328
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 Version Availability
SYNO.SurveillanceStation.AxisAcsCtrler 1 Surveillance Station 7.0
Method Name Section Availability
GetUpdateInfo 2.3.38.1 4 and onward
CountByCategoryCardHolder 2.3.38.2 4 and onward
EnumLogConfig 2.3.38.3 4 and onward
GetCardholderPhoto 2.3.38.4 4 and onward
CountByCategoryLog 2.3.38.5 4 and onward
EnumCardHolder 2.3.38.6 4 and onward
RetrieveLastCard 2.3.38.7 4 and onward
EnableCtrler 2.3.38.8 4 and onward
AckAlarm 2.3.38.9 4 and onward
SaveLogConfig 2.3.38.10 4 and onward
Save 2.3.38.11 4 and onward
DownloadLog 2.3.38.12 4 and onward
GetDoorNames 2.3.38.13 4 and onward
TestConnect 2.3.38.14 4 and onward
Enum 2.3.38.15 4 and onward
SaveCardHolder 2.3.38.16 4 and onward
ListDoor 2.3.38.17 4 and onward
ClearLog 2.3.38.18 4 and onward
DoorControl 2.3.38.19 4 and onward
SavePrivilege 2.3.38.20 4 and onward
ListPrivilege 2.3.38.21 4 and onward
ListLog 2.3.38.22 4 and onward
Delete 2.3.38.23 4 and onward
Retrieve 2.3.38.24 4 and onward
BlockCardHolder 2.3.38.25 4 and onward
CountByCategory 2.3.38.26 4 and onward
2.3.38.1 GetUpdateInfo method
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. 329
Synology Surveillance Station Web API
Response
Key Value Description Availability
data <NeedToRetriveCnt
Object>
Controller need to retrieve count data. 4 and onward
<NeedToRetriveCnt Object> definition:
Key Value Description Availability
newUpdateCnt <integer>
Number of controller need to retrieve.
1 and onward
Example:
{
"data": {
"newUpdateCnt": 0
}
}
2.3.38.2 CountByCategoryCardHolder method
Get cardholder count of all categories.
Request
Parameter Value Description Availability
filterKeyword <string> Optional.
Cardholders information keyword filter string.
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 Value Description Availability
data <CardholderCategCnt
Object>
Cardholder count of all categories. 4 and onward
<CardholderCategCnt Object> definition:
Key Value Description Availability
ctrler_id <CntByCtrlerId Object>
Cardholer count of controller category.
4 and onward
status <CardholderCntByStat
us Object>
Cardholer count of status category.
4 and onward
total
<integer>
Id of source DS.
4 and onward
Copyright © Synology Inc. All rights Reserved. 330
Synology Surveillance Station Web API
<CntByCtrlerId Object> definition:
Key Value Description Availability
-1 <integer> Element count of all controllers. 4 and onward
X <integer> Element count of specific controller, X is
controller ID.
4 and onward
<CardholderCategCnt Object> definition:
Key Value Description Availability
-1 <integer>
Cardholder count of all status.
4 and onward
0 <integer>
Cardholder count of normal status.
4 and onward
1 <integer>
Cardholder count of expired status.
4 and onward
2 <integer> Cardholder count of blocked status. 4 and onward
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
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 Value Description Availability
data <LogConfigEnum
Object>
All controller logger settings. 4 and onward
Copyright © Synology Inc. All rights Reserved. 331
Synology Surveillance Station Web API
<LogConfigEnum> definition:
Key Value Description Availability
data Array of <LogConfigData
Object>
Logger configuration of each controller.
4 and onward
total <integer>
Total count of controller's logger
configurations in this data.
4 and onward
timestamp
<integer>
UTC timestamp for current system time.
4 and onward
<LogConfigData Object> definition:
Key Value Description Availability
id <integer>
Logger configuration of each controller.
4 and onward
log_alarm <string>
Total count of controller's logger
configurations in this data.
4 and onward
log_evt
<string>
UTC timestamp for current system time.
4 and onward
Example:
{
"data": {
"total": 1,
"data": [
{
"log_evt": "11111111111111111111111111111111111111",
"id": 97,
"log_alarm": "11111111111111111111111111111111111111"
}
]
}
}
2.3.38.4 GetCardholderPhoto method
Get cardholder photo, the response of this request is image binary data.
Request
Parameter Value Description Availability
photo_name <string> Cardholder photo name. 4 and onward
isRedirectCgi <boolean> 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.
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. 332
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 Value Description Availability
start <integer> Optional.
Offset of logs for database selection, used for log list
partial enumeration.
4 and onward
limit <integer> Optional.
Limitation of log number for database selection,
used for log list partial enumeration.
4 and onward
filterType 0,
1,
2
Optional.
Filter type of log level.
0: All types
1: Event level
2: Alarm level
4 and onward
filterEventSource -1,
0,
1
Optional.
Filter type of event source.
-1: All event source
0: Controller events
1: Door events
4 and onward
filterSource <integer> Optional.
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
4 and onward
filterEventSourceI
tem
<string> Optional.
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
4 and onward
filterTimeFrom <integer> Optional.
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
4 and onward
filterTimeTo <integer> Optional.
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
4 and onward
filterKeyword <string> Optional.
Logs information keyword filter string.
4 and onward
timezoneOffset <integer> Optional.
Minutes of timezone offset from UTC.
4 and onward
Copyright © Synology Inc. All rights Reserved. 333
Synology Surveillance Station Web API
doorIds <string> Optional.
List of door ID separated by commas, used to filter
all logs from these doors.
4 and onward
eventTypes <string> Optional.
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
4 and onward
update <integer> Optional.
UTC unix timestamp, used to find out all updated
logs after this timestamp.
4 and onward
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 Value Description Availability
data <LogCategCnt Object> Total number of export task. 4 and onward
<LogCategCnt Object> definition:
Key Value Description Availability
ctrler_id <CntByCtrlerId Object>
Id of export task.
4 and onward
date <LogCntByData
Object>
Name of export task.
4 and onward
log_level
<LogCntByLevel
Object>
Id of source DS.
4 and onward
total
<integer>
Id of destination DS.
4 and onward
<LogCntByData Object> definition:
Key Value Description Availability
-1 integer
Log count of all dates.
4 and onward
YYYY/MM/DD <CntByHalfDate
Object>
Log count in specific date.
YYYY: 4 digit of years
MM: 2 digit of month
DD: 2 digit of day
4 and onward
<LogCntByLevel Object> definition:
Key Value Description Availability
-1 <integer> Log count of all log level. 4 and onward
1 <integer> Log count of event level. 4 and onward
2 <integer> Log count of alarm level. 4 and onward
<CntByHalfDate Object> definition:
Key Value Description Availability
Copyright © Synology Inc. All rights Reserved. 334
Synology Surveillance Station Web API
-1 <integer> Log count of specific day. 4 and onward
am <integer> Log count of specific day before midday. 4 and onward
pm <integer> Log count of specific day post midday. 4 and onward
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
}
}
}
2.3.38.6 EnumCardHolder method
Enumerate cardholder list information.
Request
Parameter Value Description Availability
start <integer> Optional.
Offset of cardholder for database selection, used for
cardholder list partial enumeration.
4 and onward
limit <integer> Optional.
Limitation of cardholder number for database
selection, used for cardholder list partial
enumeration.
4 and onward
filterKeyword <string> Optional.
Cardholders information keyword filter string.
4 and onward
filterStatus <integer> Optional.
Cardholders status filter.
0: Normal
4 and onward
Copyright © Synology Inc. All rights Reserved. 335
Synology Surveillance Station Web API
1: Expired
2: Blocked
filterCtrlerId <integer> 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 Value Description Availability
data <CardholderEnum
Object>
Cardholder list information data. 4 and onward
<CardholderEnum Onject> definition:
Key Value Description Availability
data Array of <CardholderData
Object>
Cardholder data, include name, blocked or
not, valid time, etc.
4 and onward
total <integer >
Total count of cardholders in this data.
4 and onward
timestamp <integer> UTC timestamp for current system time. 4 and onward
<CardholderData Onject> definition:
Key Value Description Availability
blocked <boolean> If this cardholder is blocked. 4 and onward
card_num <string> Cardholder's credential numbers. 4 and onward
card_raw <string> Cardholder's original credential hex numbers. 4 and onward
card_token <string> Cardholder's serial numbers in controller. 4 and onward
ctrler_id <integer> Controller ID. 4 and onward
enable_valid_fro
m
<boolean> If this cardholder has valid from time bound. 4 and onward
enable_valid_until <boolean> If this cardholder has valid until time bound. 4 and onward
first_name <string> First name of this cardholder. 4 and onward
grp_id <integer> Peer connection group, controllers with the
same grp_id are peer connected, except 0
means no peered controller.
4 and onward
id <integer> Cardholder ID. 4 and onward
last_access <integer> UTC timestamp of last access time. 4 and onward
last_name <string> Last name of this cardholder. 4 and onward
name <string> Full name of this cardholder. 4 and onward
photo_height <integer> Cardholder photo height. 4 and onward
photo_name <string> Cardholder photo name. 4 and onward
photo_tmstmp <integer> UTC timestamp of photo update time. 4 and onward
photo_width <integer> Cardholder photo width. 4 and onward
pin <string> Cardholder's personal identification number. 4 and onward
status <integer> Credential status of cardholder. 4 and onward
Copyright © Synology Inc. All rights Reserved. 336
Synology Surveillance Station Web API
0: Normal
1: Expired
2: Blocked
valid_from <integer >
Local unix timestamp of controller current
timezone for credential start time.
4 and onward
valid_until <integer> Local unix timestamp of controller current
timezone for credential end time.
4 and onward
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
}
]
}
}
2.3.38.7 RetrieveLastCard method
Retrieve last access credential data from controller.
Request
Parameter Value Description Availability
ctrlerId <integer> Controller ID. 4 and onward
Copyright © Synology Inc. All rights Reserved. 337
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 Value Description Availability
data <CardData Object> Last request for access credential data of the
specific IdPoint.
4 and onward
<CardData Object> definition:
Key Value Description Availability
card_num <string> Cardholder's credential numbers. 4 and onward
card_raw <string> Cardholder's original credential hex numbers. 4 and onward
Example:
{
"data": {
"card_raw": "12a456exf456f",
"card_num": "123456879"
}
}
2.3.38.8 EnableCtrler method
Enable/disable controllers.
Request
Parameter Value Description Availability
blEnable <boolean> Decide enable or disable controller.
true: Enable
false: Disable
4 and onward
arrayJson <string> String array of enable/disable cardholder ID. 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. 338
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 Value Description Availability
start <integer> Optional.
Offset of logs for database selection, used for log list
partial enumeration.
4 and onward
limit <integer> Optional.
Limitation of log number for database selection,
used for log list partial enumeration.
4 and onward
filterEventSource -1,
0,
1
Optional.
Filter type of event source.
-1: All event source
0: Controller events
1: Door events
4 and onward
filterSource <integer> Optional.
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
4 and onward
filterEventSourceI
tem
<string> Optional.
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
4 and onward
filterTimeFrom <integer> Optional.
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
4 and onward
filterTimeTo <integer> Optional.
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
4 and onward
filterKeyword <string> Optional.
Logs information keyword filter string.
4 and onward
doorIds <string> Optional.
List of door ID separated by commas, used to filter
all logs from these doors.
4 and onward
eventTypes <string> Optional.
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
4 and onward
update <integer> Optional. 4 and onward
Copyright © Synology Inc. All rights Reserved. 339
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 Value Description Availability
data <LogConfigData
Object>
Logger configuration of controller. 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 Value Description Availability
arrayJson <string> Controller settings Json format string, this string is a
Json object array contain all settings below.
enable: Boolean, true to enable controller
id: Int, controller ID, 0 for new controller
4and onward
Copyright © Synology Inc. All rights Reserved. 340
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 Value Description Availability
start <integer> Optional.
Offset of logs for database selection, used for log list
partial enumeration.
4 and onward
limit <integer> Optional.
Limitation of log number for database selection,
used for log list partial enumeration.
4 and onward
filterType 0,
1,
2
Optional.
Filter type of log level.
0: All types
1: Event level
2: Alarm level
4 and onward
filterEventSource -1,
0,
1
Optional.
Filter type of event source.
-1: All event source
4 and onward
Copyright © Synology Inc. All rights Reserved. 341
Synology Surveillance Station Web API
0: Controller events
1: Door events
filterSource <integer> Optional.
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
4 and onward
filterEventSourceI
tem
<string> Optional.
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
4 and onward
filterTimeFrom <integer> Optional.
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
4 and onward
filterTimeTo <integer> Optional.
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
4 and onward
filterKeyword <string> Optional.
Logs information keyword filter string.
4 and onward
doorIds <string> Optional.
List of door ID separated by commas, used to filter
all logs from these doors.
4 and onward
eventTypes <string> Optional.
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
4 and onward
update <integer> Optional.
UTC unix timestamp, used to find out all updated
logs after this timestamp.
4 and onward
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 Value Description Availability
ctrlerId <integer> Controller ID, set 0 for new controller. 4 and onward
Copyright © Synology Inc. All rights Reserved. 342
Synology Surveillance Station Web API
ip <string> IP address . 4 and onward
port <integer> Port bumber. 4 and onward
userName <string> Controller user-name for authentication. 4 and onward
password <string> Controller password for authentication. 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 Value Description Availability
Data <DoorNames Object> Door name list from controller. 1 and onward
<DoorNames Object> definition:
Key Value Description Availability
count <integer> Number of door in controller. 1 and onward
doors Array of <string> Array of door name from controller. 1 and onward
Example:
{
"data": {
"count": 2,
"doors": [
"Door1",
"Door2"
]
}
}
2.3.38.14 TestConnect method
Test connection and authentication of controller.
Request
Parameter Value Description Availability
ctrlerId <integer> Controller ID, set 0 for new controller. 4 and onward
ip <string> IP address . 4 and onward
port <integer> Port bumber. 4 and onward
userName <string> Controller user-name for authentication. 4 and onward
password <string> Controller password for authentication. 4 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 343
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 Value Description Availability
start <integer> Optional.
Offset of controllers for database selection, used for
controller list partial enumeration.
4 and onward
limit <integer> Optional.
Limitation of controller number for database
selection, used for controller list partial
enumeration.
4 and onward
update <integer> Optional.
UTC unix timestamp, used to find out all updated
controller after this timestamp.
4 and onward
blIncludeRecCnt <boolean> Optional.
Set true to append controller category count in the
return data.
4 and onward
blIncludeAuInfo <boolean> Optional.
Set true to append deleted controller ID after
update timestamp in the return data.
4 and onward
Example:
http://192.168.1.1:5000/webapi/entry.cgi?
start=0&api="SYNO.SurveillanceStation.AxisAcsCtrler"&limit=100&version="1"&method="Enum"
Response
Key Value Description Availability
data <CtrlerEnum Object> Controller list information data. 4 and onward
<CtrlerEnum Object> definition:
Key Value Description Availability
data Array of <CtrlerData
Object>
Controller data, include host, name, port, etc. 4 and onward
total <integer> Total count of controllers in this data. 4 and onward
Copyright © Synology Inc. All rights Reserved. 344
Synology Surveillance Station Web API
auInfo <AutoUpdateInfo
Object>
Auto update information include deleted
controllers.
4 and onward
recCntData <AutoUpdateRecordCn
t Object>
Controller count of all category. 4 and onward
timestamp <integer> UTC timestamp for current system time. 4 and onward
<CtrlerData Object> definition:
Key Value Description Availability
door Array of <DoorData
Object>
Door data, include name, pair cam info, id, etc. 4 and onward
enable <boolean> Show if controller enabled. 4 and onward
grp_id <integer> Peer connection group, controllers with the
same grp_id are peer connected, except 0
means no peered controller.
4 and onward
host <string> Controller ip address. 4 and onward
id <integer> Controller ID. 4 and onward
idpoint Array of <idPointData
Object>
Identification point data, include in/out,
reader/rex, door name, etc.
4 and onward
mac_addr <string> Controller MAC address. 4 and onward
model <string> Controller model. 4 and onward
name <string> Controller name. 4 and onward
need_to_retrieve <integer> Controller retrieve status.
0: No need to retrieve
1: Need to retrieve
2: Retrieving
4 and onward
notifyschedule <string> List of half-hour notification schedule for a week
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
4 and onward
password <string> Controller dummy password. 4 and onward
port <integer> Controller port number. 4 and onward
retrieve_progress <integer> Retrieve progress percentage, used when
controller is retrieving.
4 and onward
status <integer> Controller status.
0: Normal
1: Disconnected
2: Disabled
3: Deleted
4: Unknown
5: Incompatible
4 and onward
time_server <string> Network time server. 4 and onward
time_zone <string> City of the timezone. 4 and onward
username <string> Controller user-name for authentication. 4 and onward
update_time <integer> UTC timestamp for last controller update time. 4 and onward
<DoorData Object> definition:
Key Value Description Availability
Copyright © Synology Inc. All rights Reserved. 345
Synology Surveillance Station Web API
cam_ds_id <integer> Paired camera server ID, 0 means local ds ID. 4 and onward
cam_id <integer> Paired camera ID in local ds. 4 and onward
cam_id_on_serve
r
<integer> Paired camera ID in recording server, used only
when camera is on recording server.
4 and onward
ctrler_id <integer> Controller ID of this door. 4 and onward
enable_cam <boolean> True if this door has paired camera. 4 and onward
id <integer> Door ID. 4 and onward
name <string> Door name. 4 and onward
notifyschedule <string> List of half-hour notification schedule for a week
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
4 and onward
status <integer> Door status construct by bitwise door, lock, and
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
4 and onward
<idPointData Object> definition:
Key Value Description Availability
ctrler_id <integer> Controller ID. 4 and onward
direction <integer> Direction.
0: In
1: Out
4 and onward
door_id <integer> Door ID. 4 and onward
door_name <string> Door name.
id <integer> ID of this identification point. 4 and onward
type <integer> Device type. 4 and onward
Copyright © Synology Inc. All rights Reserved. 346
Synology Surveillance Station Web API
0: Reader
1: Rex (Request to Exit)
<AutoUpdataInfo Object> definition:
Key Value Description Availability
deleteByRecordId <AutoUpdataDeleteDa
te Object>
Deleted element data. 4 and onward
timestamp <integer> UTC timestamp of current ds time. 4 and onward
<AutoUpdataDeleteDate Object> definition:
Key Value Description Availability
data Array of
<DeletedElement
Object>
Deleted element data. 4 and onward
< DeletedElement Object> definition:
Key Value Description Availability
id string Deleted element ID string. 4 and onward
<AutoUpdateRecordCnt Object> definition:
Key Value Description Availability
recCnt <AutoUpdateRecordCn
tData Object>
Element count of category. 4 and onward
total <integer> Number of element in recCnt. 4 and onward
<AutoUpdateRecordCntData Object> definition:
Key Value Description Availability
status <CtrlerCntByStatus
Object>
Controller count of status category, used for
controller auto update.
4 and onward
ctrler_id <CntByCtrlerId Object> Log count of controller category, used for log
auto update.
4 and onward
date <LogCntByData
Object>
Log count of date category, used for log auto
update.
4 and onward
log_level <LogCntByLevel
Object>
Log count of log level category, used for log
auto update.
4 and onward
<CtrlerCntByStatus Object> definition:
Key Value Description Availability
-1 <integer> Controller count of all status. 4 and onward
0 <integer> Controller count of normal status. 4 and onward
1 <integer> Controller count of disconnected status. 4 and onward
2 <integer> Controller count of disable status. 4 and onward
4 <integer> Controller count of others status. 4 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 347
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. 348
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 Value Description Availability
arrayJson <string > Cardholder settings Json format string, this string is
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
4 and onward
Copyright © Synology Inc. All rights Reserved. 349
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 Value Description Availability
DoorIds <string> Optional.
List of door ID separated by commas.
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. 350
Synology Surveillance Station Web API
data Array of <DoorData
Object>
Door data, include name, pair cam info, id, etc. 1 and onward
<exporttask_info> definition:
Key Value Description Availability
id <integer>
Id of export task.
1 and onward
name <string>
Name of export task.
1 and onward
srcDsId
<integer>
Id of source DS.
1 and onward
dstDsId
<integer>
Id of destination DS.
1 and onward
dstdir
<string>
Directory of destination.
1 and onward
start_time
<integer>
Start time of event.
1 and onward
stop_time
<integer>
Stop time of event.
1 and onward
status
<integer>
Status of export task.
1 and onward
total_count
<integer>
Total count number of events.
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 Description Availability
filterType 0,
1,
2
Optional.
Filter type of log level.
0: All types
1: Event level
2: Alarm level
4 and onward
Copyright © Synology Inc. All rights Reserved. 351
Synology Surveillance Station Web API
filterEventSource -1,
0,
1
Optional.
Filter type of event source.
-1: All event source
0: Controller events
1: Door events
4 and onward
filterSource <integer> Optional.
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
4 and onward
filterEventSourceI
tem
<string> Optional.
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
4 and onward
filterTimeFrom <integer> Optional.
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
4 and onward
filterTimeTo <integer> Optional.
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
4 and onward
filterKeyword <string> Optional.
Logs information keyword filter string.
4 and onward
doorIds <string> Optional.
List of door ID separated by commas, used to filter
all logs from these doors.
4 and onward
eventTypes <string> Optional.
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
4 and onward
update <integer> Optional.
UTC unix timestamp, used to find out all updated
logs after this timestamp.
4 and onward
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. 352
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 Value Description Availability
data <DoorPrivEnum
Object>
List all user privilege of door authentication and
manual lock ability.
4 and onward
<DoorPrivEnum Object> definition:
Key Value Description Availability
data Array of
<DoorPrivEnumData
Object>
Array of door privilege data. 4 and onward
total <integer> Total count of door privilege in this data. 4 and onward
timestamp <integer> UTC timestamp for current system time. 4 and onward
<DoorPrivEnumData Object> definition:
Key Value Description Availability
authorized <boolean> Authorized or not, include ability to realize the
door and view logs.
4 and onward
door_id <integer> Door ID. 4 and onward
id <string> Data ID, construct by uid and door_iD. 4 and onward
manual_lock <boolean> Has manual lock ability of authorized user. 4 and onward
uid <integer> User ID. 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. 353
Synology Surveillance Station Web API
2.3.38.20 DoorControl method
Manual lock operation for specific door.
Request
Parameter Value Description Availability
doorId <integer> Door ID. 4 and onward
operation <integer> Door lock operation.
0: Lock door
1: Unlock door
2: Access door
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 Value Description Availability
arrayJson <string> Door privilege settings Json format string, this string
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
1 and onward
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. 354
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 Value Description Availability
start <integer> Optional.
Offset of logs for database selection, used for log list
partial enumeration.
4 and onward
limit <integer> Optional.
Limitation of log number for database selection,
used for log list partial enumeration.
4 and onward
filterType 0,
1,
2
Optional.
Filter type of log level.
0: All types
1: Event level
2: Alarm level
4 and onward
filterEventSource -1,
0,
1
Optional.
Filter type of event source.
-1: All event source
0: Controller events
1: Door events
4 and onward
filterSource <integer> Optional.
Controller ID of log source, used to select all logs of
specific controller, 0 means all controllers.
4 and onward
filterEventSourceI
tem
<string> Optional.
List of door/controller ID separated by commas,
combined with filterEventSource to select all logs of
specific door/controller.
4 and onward
filterTimeFrom <integer> Optional.
UTC unix timestamp, used to select all logs later
than this timestamp from database, 0 means no
filter.
4 and onward
filterTimeTo <integer> Optional.
UTC unix timestamp, used to select all logs earlier
than this timestamp from database, 0 means no
filter.
4 and onward
filterKeyword <string> Optional.
Logs information keyword filter string.
4 and onward
timezoneOffset <integer> Optional.
Minutes of timezone offset from UTC.
4 and onward
doorIds <string> Optional.
List of door ID separated by commas, used to filter
all logs from these doors.
4 and onward
eventTypes <string> Optional. 4 and onward
Copyright © Synology Inc. All rights Reserved. 355
Synology Surveillance Station Web API
List of event type separated by commas, used to
filter all logs from these types, see LogEnumData
for all event type enumeration.
update <integer> Optional.
UTC unix timestamp, used to find out all updated
logs after this timestamp.
4 and onward
blIncludeRecCnt <boolean> Optional.
Set true to append log category count in the return
data.
4 and onward
blIncludeAuInfo <boolean> Optional.
Set true to append log category count in the return
data.
4 and onward
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 Value Description Availability
data <LogEnum Object> Log list information. 4 and onward
<LogEnum Object> definition:
Key Value Description Availability
data Array of
<LogEnumData
Object>
Array of log information. 4 and onward
total <integer> Total count of logs in this data. 4 and onward
auInfo Array of
<AutoUpdateInfo
Object>
Auto update information include deleted logs. 4 and onward
recCntData Array of
<AutoUpdateRecordCn
t Object>
log count of all category. 4 and onward
timestamp <integer> UTC timestamp for current system time. 4 and onward
<LogEnumData Object> definition:
Key Value Description Availability
cam_ds_id <integer> Paired camera server ID, 0 means local ds ID,
used only when event has playback ability
(event source from Door/IdPoint/AccessPoint).
4 and onward
cam_id <integer> Camera ID, used only when event has playback
ability (event source from
Door/IdPoint/AccessPoint).
4 and onward
cam_id_on_serve <integer> Camera ID on recording server, used only when 4 and onward
Copyright © Synology Inc. All rights Reserved. 356
Synology Surveillance Station Web API
r event has playback ability (event source from
Door/IdPoint/AccessPoint) and camera is from
recording server.
ctrler_id <integer> Controller ID. 4 and onward
evt_grp <integer> 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
4 and onward
evt_type <integer> 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
Copyright © Synology Inc. All rights Reserved. 357
Synology Surveillance Station Web API
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
id <integer> Log ID. 4 and onward
log_level <integer> Emergency level of this log.
1: Event
2: Alarm
4 and onward
owner_direct <integer> Direction of element that caused this event,
used only when owner_type is IdPoint or
AccessPoint.
0: In
1: Out
4 and onward
owner_id <integer> ID of element that caused this event, combined
with owner_type to specify element.
4 and onward
owner_idpt_type <integer> Device type of element that caused this event,
used only when owner_type is IdPoint.
0: Reader
1: Rex (Request to Exit)
4 and onward
owner_info <OwnerInfo Object> External owner information. 4 and onward
owner_name <string> Name of the element that caused this event. 4 and onward
owner_type <integer> Element type that caused this event.
0: Unknown
1: SurveillanceStation User
2: Cardholder
3: Access Schedule
4: Event Schedule (Used Defined Schedule)
4 and onward
Copyright © Synology Inc. All rights Reserved. 358
Synology Surveillance Station Web API
5: Controller
6: Door
7: AccessPoint
8: IdPoint
photo_height <integer> Photo height. 4 and onward
photo_name <string> Photo name of event owner. 4 and onward
photo_tmstmp <integer> Photo update UTC timestamp. 4 and onward
photo_width <integer> Photo width. 4 and onward
playback <boolean> If this event is possible to have camera video
playback (have pair camera info).
4 and onward
src_direct <integer> Direction of source place of this event, used
only when src_type is IdPoint or AccessPoint.
0: In
1: Out
4 and onward
src_id <integer> ID of source place of this event, combined with
src_type to specify element.
4 and onward
src_idpt_type <integer> Device type of source place of this event, used
only when src_type is IdPoint.
0: Reader
1: Rex (Request to Exit)
4 and onward
src_name <string> Name of source place of this event. 4 and onward
src_type <integer> Element type of source place of this event.
0: Unknown
5: Controller
6: Door
7: AccessPoint
8: IdPoint
4 and onward
tmstmp <integer> UTC unix timestamp of when this event happen. 4 and onward
update_time <integer> UTC unix timestamp of when this event
retrieved by SurveillanceStation.
4 and onward
<OwnerInfo Object> definition:
Key Value Description Availability
port <integer> Port number of IO, external information of
device io event.
4 and onward
interface <string> Network interface, external information of
device network event.
4 and onward
mac_addr <string> Controller MAC address, external information of
device peer connection event.
4 and onward
description <string> Description of event, external information of
device action failed event.
4 and onward
status <integer> Door status, external information of door event,
see DoorData for more information.
4 and onward
Category <string> Event group name, external information of
logger alarm event.
4 and onward
log_num <integer> Log number, external information of logger
drop event/alarm.
4 and onward
Reason <string> Reason of event, external information of IdPoint
tamper/active/timeout event.
4 and onward
Action <string> Action of authentication request, external 4 and onward
Copyright © Synology Inc. All rights Reserved. 359
Synology Surveillance Station Web API
information of IdPoint Card/PIN/REX request
event.
PIN <string> Personal identification number, external
information of IdPoint PIN request event.
4 and onward
REX <string> Active or not, external information of IdPoint
REX request event.
4 and onward
Card <string> Card number, external information of IdPoint
Card request event.
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. 360
Synology Surveillance Station Web API
Parameter Value Description Availability
ids <string> Array string of select controller IDs. 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 Value Description Availability
ctrlerId <integer> Controller ID for retrieve action. 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 Value Description Availability
arrayJson <string> String array of block/unblock cardholder ID. 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. 361
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 Value Description Availability
data <CtrlerCategCnt
Object>
Controller count of all categories. 4 and onward
<CtrlerCategCnt Object> definition:
Key Value Description Availability
status <CtrlerCntByStatus
Object>
Controller count of status category. 4 and onward
total <integer> Total count of all controllers. 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. 362
Synology Surveillance Station Web API
Code Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
403 Insufficient license.
404 Codec acitvation failed
Copyright © Synology Inc. All rights Reserved. 363
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 Version Availability
SYNO.SurveillanceStation.AxisAcsCtrler.Search 1 Surveillance Station 7.0
Method Name Section Availability
Start 2.3.40.1 1 and onward
InfoGet 2.3.39.2 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 Value Description Availability
pid
<integer>
Controller search process ID, used as a
parameter to get search result by InfoGet action.
1 and onward
Example:
{
"pid": 10017
}
2.3.39.2 InfoGet method
Get controller search result, pid is from Start request.
Request
Parameter Value Description Availability
pid <integer> Required.
The selected camera id.
1 and onward
offset
<integer> Optional.
Search result data offset, used to skip old result.
If parameter is not specified, the default value will be 0.
1 and onward
Copyright © Synology Inc. All rights Reserved. 364
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 Value Description Availability
alive
<boolean>
Controller search process ID, used as a
parameter to get search result by InfoGet action.
1 and onward
ctrlers
Array of
<CtrlerDeviceInfo>
Controller device information, include IP, port,
MAC address, model, and vendor.
1 and onward
<SearchPid> definition:
Key Value Description Availability
ip
<string>
Controller IP address.
1 and onward
mac
<string>
Controller MAC address.
1 and onward
model
<string>
Controller model name.
1 and onward
port
<integer>
Controller port number.
1 and onward
vendor
<string>
Controller vendor name.
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 Description
400 Execution failed.
Copyright © Synology Inc. All rights Reserved. 365
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 Version Availability
SYNO.SurveillanceStation.DigitalOutput 1 Surveillance Station 7.0
Method Name Section Availability
Enum 2.3.40.1 1 and onward
Save 2.3.40.2 1 and onward
PollState 2.3.40.3 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 Value Description Availability
camId <integer> Required.
The selected camera id.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.DigitalOutput"&camId=280&version="1"&method="Enum"
Response
Key Value Description Availability
list Array of <list> The digital output parameters in array list. 1 and onward
<list> definition:
Key Value Description Availability
idx
<integer>
The digital output index.
1 and onward
keep_setting
<boolean>
Define the keep the camera original setting.
1 and onward
normal_state
<integer>
Define the camera normal state.
1 and onward
current_state
<integer>
Define the camera current state.
1 and onward
trigger_state
<boolean>
Define the trigger button toggle state.
1 and onward
Example:
{
Copyright © Synology Inc. All rights Reserved. 366
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 Value Description Availability
camId
<integer> Required.
The selected camera id.
1 and onward
idx
<integer> Required.
The selected digital output index.
1 and onward
keep_setting
<boolean> Required.
Define the keep the camera original setting.
1 and onward
normal_state
<integer> Required.
Define the camera normal state.
1 and onward
trigger_state
<boolean> Required.
Define the trigger button toggle state.
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 Value Description Availability
camId <integer> The selected camera id . 1 and onward
Example:
{
"camId": 280
}
Copyright © Synology Inc. All rights Reserved. 367
Synology Surveillance Station Web API
2.3.40.3 PollState method
Long polling digital output status. e.g. current state.
Request
Parameter Value Description Availability
camId
<integer>
The selected camera id.
1 and onward
idx
<integer>
The selected digital output index.
1 and onward
keep
<boolean>
Define the keep the camera original setting.
1 and onward
setNormalCap
<boolean>
Define the setting camera normal state capability.
1 and onward
normal
<integer>
Define the camera normal state.
1 and onward
trigger
<boolean>
Define the trigger button toggle state.
1 and onward
timeOut
<integer>
Define the max waiting time.
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 Description Availability
current_state <integer> The camera current state. 1 and onward
Example:
{
"current_state": 0
}
2.3.40.4 API Error Code
Code Description
400 Execution failed.
401 Parameter invalid.
402 Camera disabled.
Copyright © Synology Inc. All rights Reserved. 368
Synology Surveillance Station Web API
2.3.41 SYNO.SurveillanceStation.ExternalEvent
External event related WebAPI. The method “Trigger” is implemented.
Name Version Availability
SYNO.SurveillanceStation.ExternalEvent 1 Surveillance Station 7.0
Method Name Section Availability
Trigger 2.3.41.1 1 and onward
2.3.41.1 Trigger method
Trigger the external event specified by eventId with event name specified by eventName.
Request
Parameter Value Description Availability
eventId <integer> Required.
ID of the to-be-triggered external event.
1 and onward
eventName <string> Optional.
Name of the to-be-triggered external event.
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 Description
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 369
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 Version Availability
SYNO.SurveillanceStation.IOModule 1 Surveillance Station 7.1
Method Name Section Availability
Enum 2.3.42.1 1 and onward
EnumPort 2.3.42.2 1 and onward
EnumVendorModel 2.3.42.3 1 and onward
Save 2.3.42.4 1 and onward
Enable 2.3.42.5 1 and onward
Disable 2.3.42.6 1 and onward
Delete 2.3.42.7 1 and onward
TestConn 2.3.42.8 1 and onward
GetCap 2.3.42.9 1 and onward
PortSetting 2.3.42.10 1 and onward
PollingDI 2.3.42.11 1 and onward
PollingDO 2.3.42.12 1 and onward
GetDevNumOfDs 2.3.42.13 1 and onward
CountByCategory 2.3.42.14 1 and onward
2.3.42.1 Enum method
Get the list of all IO modules.
Request
Parameter Value Description Availability
start <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
1 and onward
limit <integer> Optional.
Number of IO modules to be returned.
If not specified, return IO modules to the end of IO
module list.
1 and onward
blFromList <boolean> Optional
Indicating if the caller is from IO module list
Set to be false if not specified.
1 and onward
ownerDsId <integer> Optional.
The owner DS ID of I/O port.
1 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 370
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 Value Description Availability
keyUsedCnt <integer> The number of total installed devices. 1 and onward
localTotalCnt <integer> The number of local total installed IO
modules.
1 and onward
modules Array of <IO module List
Object>
The list of queried IO modules. 1 and onward
<IO module List Object> definition:
Key Value Description Availability
DONum <integer> Digital output number 1 and onward
DINum <integer> Digital input number 1 and onward
IONum <integer> Digital changeable IO port number 1 and onward
id <integer> IO module ID 1 and onward
enabled <boolean> Whether the IO module is enabled 1 and onward
name <string> Name of IO module 1 and onward
vendor <string> Vendor name of IO module 1 and onward
model <string> Model name of IO module 1 and onward
hostname <string> Hostname of IO module 1 and onward
port <integer> Connection port of IO module 1 and onward
username <string> User name of IO module 1 and onward
update_time <integer> The last update time in timestamp 1 and onward
owner_ds_id <integer> The ID of the owner of this IO module 1 and onward
id_on_rec_server <integer> The ID of IO module on the owner DS 1 and onward
status_flags <integer> Flags of the IO module status 1 and onward
status_on_rec_server <integer> IO module status on the owner DS 1 and onward
status <integer> IO module status 1 and onward
io_list Array of <IO list
Object>
The digital I/O parameters in array list. 1 and onward
multiDI <boolean> Whether the IO module supports multiple
input detection
1 and onward
setDICap <boolean> Whether the IO module supports digital
input normal state setting
1 and onward
setDOCap <boolean> Whether the IO module supports digital
output normal state setting
1 and onward
enable_ntp <boolean> Whether the IO module enables NTP 1 and onward
time_server <string> NTP time server of the IO module 1 and onward
<IO list Object> definition:
Key Value Description Availability
idx
<integer>
The digital I/O index.
1 and onward
keep_setting
<boolean>
Define the keep the original setting.
1 and onward
normal_state
<integer>
Define the I/O normal state.
1 and onward
Copyright © Synology Inc. All rights Reserved. 371
Synology Surveillance Station Web API
current_state
<integer>
Define the current I/O state.
1 and onward
trigger_state
<boolean>
Define the trigger button toggle state.
1 and onward
io_type
0,1,2,3 I/O type
0: Unknown
1: Digital ouput
2: Audio
3: Digital input
1 and onward
name
<string>
The I/O port name
1 and onward
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",
Copyright © Synology Inc. All rights Reserved. 372
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. 373
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. 374
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. 375
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 Value Description Availability
Id <integer> IO module ID 1 and onward
Port <integer> The connection port of IO module 1 and onward
IP <string> The hostname of IO module 1 and onward
User <string> The user name of IO module 1 and onward
Copyright © Synology Inc. All rights Reserved. 376
Synology Surveillance Station Web API
Pass <string> The user password of IO module 1 and onward
Vendor <string> The vendor name of IO module 1 and onward
Model <string> The model name of IO module 1 and onward
Example:
GET /webapi/entry.cgi?Id=11&IP="10.13.12.185"&Port=1025&Vendor="Advantech"&Model="ADAM-
6250"&api=SYNO.SurveillanceStation.IOModule&method=EnumPort&version=1
Response
Key Value Description Availability
data Array of < IO list Object> The digital I/O parameters in array list. 1 and onward
<IO list Object> definition:
Key Value Description Availability
idx
<integer>
The digital I/O index.
1 and onward
keep_setting
<boolean>
Define the keep the original setting.
1 and onward
normal_state
<integer>
Define the I/O normal state.
1 and onward
current_state
<integer>
Define the current I/O state.
1 and onward
trigger_state
<boolean>
Define the trigger button toggle state.
1 and onward
io_type
0,1,2,3 I/O type
0: Unknown
1: Digital ouput
2: Audio
3: Digital input
1 and onward
name
<string>
The I/O port name
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. 377
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. 378
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. 379
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. 380
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 Value Description Availability
IOModel Array of <supported list
Object>
The supported list of IO module. 1 and onward
<supported list Object> definition:
Key Value Description Availability
vendor
<string> The vendor name of IO module 1 and onward
model_no
<string> The model name of IO module 1 and onward
Example:
{
"data": {
"IOModel": [{
"model_no": "P8221",
"vendor": "AXIS"
},
{
"model_no": "ADAM-6050",
Copyright © Synology Inc. All rights Reserved. 381
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 Value Description Availability
name <string> The name of IO module 1 and onward
id <integer> IO module ID, 0 means inserting a IO module 1 and onward
ownerDsId <integer> The ID of the owner of this IO module 1 and onward
vendor <string> The vendor name of IO module 1 and onward
model <string> The model name of IO module 1 and onward
ip <string> The hostname of IO module 1 and onward
port <integer> The connection port of IO module 1 and onward
userName <string> The user name of IO module 1 and onward
enabled <boolean> Whether the IO module is enabled 1 and onward
status <integer> IO module status 1 and onward
timeServer <string> NTP time server of IO module 1 and onward
passWord <string> The user password of IO module 1 and onward
ntpEnable <boolean> Whether the IO module enables NTP 1 and onward
DIOdata Array of <IO
list Object>
The digital I/O parameters in array list. 1 and onward
Copyright © Synology Inc. All rights Reserved. 382
Synology Surveillance Station Web API
<IO list Object> definition:
Key Value Description Availability
idx
<integer>
The digital I/O index.
1 and onward
keep
<boolean>
Define the keep the original setting.
1 and onward
normal
<integer>
Define the I/O normal state.
1 and onward
trigger_state
<boolean>
Define the trigger button toggle state.
1 and onward
type
0,1,2,3 I/O type
0: Unknown
1: Digital ouput
2: Audio
3: Digital input
1 and onward
name
<string>
The I/O port name
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 Value Description Availability
id <integer> IO module ID 1 and onward
editTime <integer> The time of this edit operation 1 and onward
Example:
{
Copyright © Synology Inc. All rights Reserved. 383
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 Value Description Availability
iomlist <string> ID list of IO module 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 Value Description Availability
iomlist <string> ID list of IO module 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. 384
Synology Surveillance Station Web API
Parameter Value Description Availability
iomlist <string> ID list of IO module 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 Value Description Availability
id <integer> IO module ID 1 and onward
port <integer> The connection port of IO module 1 and onward
ip <string> The hostname of IO module 1 and onward
userName <string> The user name of IO module 1 and onward
passWord <string> The user password of IO module 1 and onward
model <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 ADAM-
6250"&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 Value Description Availability
vendor <string> The vendor name of IO module 1 and onward
model <string> The model name of IO module 1 and onward
Copyright © Synology Inc. All rights Reserved. 385
Synology Surveillance Station Web API
Example:
GET /webapi/entry.cgi?
vendor="AXIS"&model="P8221"&api=SYNO.SurveillanceStation.IOModule&method=GetCap&version=1
Response
Key Value Description Availability
iomoduleCap Array of <cap list Object> The capability of IO module in array list. 1 and onward
<cap list Object> definition:
Key Value Description Availability
DONum <integer> Digital output number 1 and onward
DINum <integer> Digital input number 1 and onward
IONum <integer> Digital changeable IO port number 1 and onward
ADCap <integer> Audio detection capability 1 and onward
AudioList <integer> Audio capability 1 and onward
audioCap <boolean> Whether IO module has audio capability 1 and onward
defAudio <integer> Default audio codec setting 1 and onward
ChanlList Array of <channel
Object>
The channel name in array list. 1 and onward
cntChanl <integer> The channel count 1 and onward
defChanl <string> Default channel name 1 and onward
defUser <string> Default username of IO module 1 and onward
defPass <integer> Default password of IO module 1 and onward
rtspProtocolCap <integer> Indicating the supported protocol of RTSP
which is bitwise OR of following values
0: NONE
1: UDP
2: TCP
3: HTTP
4: Auto
1 and onward
defRtspProtocol 0 … 4 Default RTSP protocol 1 and onward
id <string> The compounded vendor and model name of
IO module
1 and onward
multiDI <boolean> Whether the IO module supports multiple
input detection
1 and onward
setDICap <boolean> Whether the IO module supports digital
input normal state setting
1 and onward
setDOCap <boolean> Whether the IO module supports digital
output normal state setting
1 and onward
ntpCap <boolean> Whether the IO module enables NTP 1 and onward
ntpServerList Array of <time server
Object>
The NTP time server in array list. 1 and onward
<channel Object> definition:
Key Value Description Availability
channel <string> The channel number 1 and onward
Copyright © Synology Inc. All rights Reserved. 386
Synology Surveillance Station Web API
< time server Object> definition:
Key Value Description Availability
ntpServer <string> The NTP time server 1 and onward
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
}
Copyright © Synology Inc. All rights Reserved. 387
Synology Surveillance Station Web API
2.3.42.10 PortSetting method
Configure I/O port setting of IO module.
Request
Parameter Value Description Availability
id <integer> IO module ID, 0 means inserting a IO module 1 and onward
DIOdata Array of <IO
list Object>
The digital I/O parameters in array list. 1 and onward
<IO list Object> definition:
Key Value Description Availability
idx
<integer>
The digital I/O index.
1 and onward
keep
<boolean>
Define the keep the original setting.
1 and onward
normal
<integer>
Define the I/O normal state.
1 and onward
trigger_state
<boolean>
Define the trigger button toggle state.
1 and onward
type
0,1,2,3 I/O type
0: Unknown
1: Digital ouput
2: Audio
3: Digital input
1 and onward
name
<string>
The I/O port name
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. 388
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 Value Description Availability
Id <integer> Required.
The selected I/O module id.
1 and onward
list
Array of <IOModule
DIStatus Object>
Required.
Define the I/O module original state.
1 and onward
timeOut <integer> Required.
Define the maximum waiting time for polling
I/O module trigger state if no changed.
1 and onward
<IOModuleDIStatus Object> Definition:
Key Value Description Availability
idx <integer> The index of I/O port. 1 and onward
trigger <integer> The trigger state of this I/O port. e.g.
0:untrigger, 1:triggered.
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 Value Description Availability
list Array of <IOModuleDIStatus
Object>
The updated I/O module DI trigger state
list.
1 and onward
success <boolean> Webapi success or not.
1 and onward
Example:
{
"data":{
"list":[
{
"idx":0,
"trigger":1
},
{
"idx":1,
"trigger":1
}
]
},
Copyright © Synology Inc. All rights Reserved. 389
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 Value Description Availability
Id <integer> Required.
The selected I/O module id.
1 and onward
idx <integer> Required.
The index of I/O port.
1 and onward
normal <integer> Required.
The normal state of I/O port.
1 and onward
trigger <boolean> Required.
The updated state of I/O port.
1 and onward
timeOut <integer> Required.
Define the maximum waiting time for polling
I/O module DI trigger state if no changed.
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 Value Description Availability
data <IOModuleDOStatus Object> The updated I/O module DO trigger state. 1 and onward
success <boolean> Webapi success or not.
1 and onward
<IOModuleDOStatus Object>
Key Value Description Availability
current_state <integer> The trigger state of this I/O port. e.g.
0:untrigger, 1:triggered.
1 and onward
Example:
{
"data":{
"current_state":1
},
"success":true
}
Copyright © Synology Inc. All rights Reserved. 390
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 Value Description Availability
data <DeviceNumber Map> The map of device number. 1 and onward
success <boolean> Webapi success or not.
1 and onward
<DeviceNumber Map> definition:
Key Value Description Availability
dsId
<DeviceNumb
er Object>
Device number of mapped server.
The key of this map is a string of dsId. eg. “0”, “15”.
1 and onward
<DeviceNumber Object> definition:
Key Value Description Availability
devNum <integer>
Device number from server.
1 and onward
dsId <integer>
Server's ds id.
1 and onward
Example:
{
"data":{
"devNumMap":{
"0":{
"devNum":0,
"dsId":0
},
"1":{
"devNum":1,
"dsId":1
}
}
},
"success":true
}
Copyright © Synology Inc. All rights Reserved. 391
Synology Surveillance Station Web API
2.3.42.14 CountByCategory method
Get category count of IO module.
Request
Parameter Value Description Availability
start <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
1 and onward
limit <integer> Optional.
Number of cameras to be returned.
If not specified, return count to the end of IO module list.
1 and onward
ownerDsId <integer> Optional.
The owner DS ID of I/O port.
1 and onward
blFromList <boolean> Optional.
Indicating if the caller is from IO module list
Set to be false if not specified.
1 and onward
Example:
GET /webapi/entry.cgi?
api=”SYNO.SurveillanceStation.IOModule”&method=”CountByCategory”&version=”1”
Response
Key Value Description Availability
data Array of <iomodule_status> The list of iomodule status. 1 and onward
total <integer> Total count of I/O modules. 1 and onward
success <boolean> Webapi success or not.
1 and onward
<iomodule_status> definition:
Key Value Description Availability
1 <integer> Count of normal status.
1 and onward
3 <integer> Count of disconnected status.
1 and onward
7 <integer> Count of disabled status.
1 and onward
12 <integer> Count of others status.
1 and onward
-1 <integer> Total count of I/O modules.
1 and onward
Example:
{
"data":{
"iomodule_status":{
"-1":1,
"1":1,
"12":0,
"3":0,
"7":0
Copyright © Synology Inc. All rights Reserved. 392
Synology Surveillance Station Web API
},
"total":1
},
"success":true
}
2.3.42.15 API Error Code
Code Description
100 Unknown error.
400 Execution failed.
401 Parameter invalid.
402 IO module disabled.
403 Insufficient license.
Copyright © Synology Inc. All rights Reserved. 393
Synology Surveillance Station Web API
2.3.43 SYNO.SurveillanceStation.IOModuleSearch
Searching I/O modules via UPnP and get searching status.
Name Version Availability
SYNO.SurveillanceStation.IOModule.Search 1 Surveillance Station 7.0
Method Name Section Availability
Start 2.3.43.1 1 and onward
InfoGet 2.3.43.2 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 Value Description Availability
pid <integer> The pid of the searching process. 1 and onward
2.3.43.2 InfoGet method
Get the searching info.
Request
Key Value Description Availability
pid <integer> Required.
The pid of the searching process.
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. 394
Synology Surveillance Station Web API
Key Value Description Availability
moduleList <IOModule> Array List of I/O module found. 1 and onward
searchStatus <boolean> Is the searching process alive. 1 and onward
<IOModule Object> definition:
Key Value Description Availability
ip <string> IP of the I/O module. 1 and onward
mac <string> I/O module MAC address. 1 and onward
model <string> Model of the I/O module. 1 and onward
port <integer> Port of the I/O module. 1 and onward
vendor <string> Vendor of the I/O module. 1 and onward
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 Description
400 Operation Failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 395
Synology Surveillance Station Web API
2.3.44 SYNO.SurveillanceStation.Camera.Status
Get current camera status infomation.
Name Version Availability
SYNO.SurveillanceStation.Camera.Status 1 Surveillance Station 7.2.2
Method Name Section Availability
OneTime 2.3.44.1 1 and onward
2.3.44.1 OneTime method
Get current camera status.
Request
Key Value Description Availability
id_list <string> Required.
List of camera IDs.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Camera.Status"&version=1&method="OneTime"&id_list="1,2"
Response
Key Value Description Availability
CamStatus <string> Array of camera infomation.
[ID,
Status,
VideoType,
Has audio (bool),
Volume of sound,
Mute (bool),
Alert trigger level]
1 and onward
Definition:
Key Value Description Availability
Status <integer> 0: Unknown
1: Starting
2: Running
3: Stopping
4: Stopped
5: Retrying
1 and onward
VideoType <integer> 1: Mjpeg
2: Mpeg4
1 and onward
Copyright © Synology Inc. All rights Reserved. 396
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 Description
400 Operation Failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 397
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 Version Availability
SYNO.SurveillanceStation.PTZ.Preset 1 Surveillance Station 7.2.2
Method Name Section Availability
Enum 2.3.45.1 1 and onward
GetInfo 2.3.45.2 1 and onward
SetPreset 2.3.45.3 1 and onward
DelPreset 2.3.45.4 1 and onward
Execute 2.3.45.5 1 and onward
SetHome 2.3.45.6 1 and onward
2.3.45.1 Enum method
Enum preset list from camera.
Request
Key Value Description Availability
cameraId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="Enum"&cameraId=4
Response
Key Value Description Availability
camId <CAMERA_ID> Unique camera ID. 1 and onward
preset <Preset> Array List of preset information. 1 and onward
<Preset> Definition:
Key Value Description Availability
name <string> Name of the preset. 1 and onward
position <integer> ID of preset in camera. 1 and onward
speed <integer> Speed of preset. 1 and onward
Type <integer> 0: Normal
1: Home
1 and onward
Copyright © Synology Inc. All rights Reserved. 398
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 Value Description Availability
cameraId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.PTZ.Preset"&version="1"&method="GetInfo"&cameraId=4
Response
Key Value Description Availability
id <CAMERA_ID> Unique camera ID. 1 and onward
presetNum <integer> Max preset number. 1 and onward
pt_speed <integer> Speed of pan and tilt. 1 and onward
ptz <integer> 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
1 and onward
ptzAutoPanType <integer> Autopan implement type.
0: No autopan
1: By Surveillance Station simulation
2: Keep autopan until stop command.
1 and onward
Copyright © Synology Inc. All rights Reserved. 399
Synology Surveillance Station Web API
3: Autopan one cycle for each command.
ptzContinuous <integer> 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
1 and onward
ptzDirection <integer> 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
1 and onward
ptzHasObjTracking <boolean> If camera has object tracking capability. 1 and onward
ptz_speed_keep_origin <boolean> If camera ptz speed modifiable. 1 and onward
zoom_speed <integer> Speed of zoom. 1 and onward
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
}
Copyright © Synology Inc. All rights Reserved. 400
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 Value Description Availability
cameraId <CAMERA_ID> Unique camera ID. 1 and onward
position <integer> Required.
ID of preset in camera.
1 and onward
speed <integer> Optional.
Speed of ptz, default to 3.
1 and onward
name <string> Required.
Name of the preset.
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 Value Description Availability
cameraId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
position <string> Required.
List of preset position.
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. 401
Synology Surveillance Station Web API
2.3.45.5 Execute method
Go to specific preset by given speed.
Request
Key Value Description Availability
cameraId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
position <integer> Required.
ID of preset in camera.
Should be -1 when type is 1(Home).
1 and onward
speed <integer> Optional.
Speed to go to preset.
1 and onward
type <integer> Is this preset home or not.
0: Normal
1: Home
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 Value Description Availability
cameraId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
bindPosition <integer> Optional.
Set Home position to specific ID of preset in
camera.
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. 402
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 Description
400 Operation Failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 403
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 Version Availability
SYNO.SurveillanceStation.PTZ.Patrol 1 Surveillance Station 7.2.2
Method Name Section Availability
Enum 2.3.46.1 1 and onward
EnumPartial 2.3.46.2 1 and onward
Load 2.3.46.3 1 and onward
Save 2.3.46.4 1 and onward
Delete 2.3.46.5 1 and onward
Excute 2.3.46.6 1 and onward
Stop 2.3.46.7 1 and onward
2.3.46.1 Enum method
Enum patrol list and contain its preset members in Surveillance Station database.
Request
Key Value Description Availability
camId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Enum"&camId=4
Response
Key Value Description Availability
patrol <Patrol> Array List of patrol information. 1 and onward
<Patrol> Definition:
Key Value Description Availability
id <integer> ID of patrol in Surveillance Station database. 1 and onward
name <string> Patrol name. 1 and onward
speed <integer> Speed of patrol to run preset. 1 and onward
stayTime <integer> Delay time in seconds from one preset to
another.
1 and onward
presetList <Preset> Array List of preset information. 1 and onward
Copyright © Synology Inc. All rights Reserved. 404
Synology Surveillance Station Web API
<Preset> Definition:
Key Value Description Availability
name <string> Name of the preset. 1 and onward
position <integer> ID of preset in camera. 1 and onward
Type <integer> 0: Normal
1: Home
1 and onward
Example:
{
"patrol":[{
"id":1,
"name":"p1",
"presetList":[{
"name":"home",
"position":0,
"type":1
}, {
"name":"syno1",
"position":1,
"type":0
}],
"speed":3,
"stayTime":5
}]
}
2.3.46.2 EnumPartial method
Enum patrol name list in Surveillance Station database.
Request
Key Value Description Availability
camId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="EnumPartial"&camId=4
Response
Key Value Description Availability
camId <CAMERA_ID> Unique camera ID. 1 and onward
patrol <Patrol> Array List of patrol information. 1 and onward
Copyright © Synology Inc. All rights Reserved. 405
Synology Surveillance Station Web API
<Patrol> Definition:
Key Value Description Availability
id <integer> ID of patrol in Surveillance Station database. 1 and onward
name <string> Patrol name. 1 and onward
Example:
{
"camId":4,
"patrol":[{
"id":1,
"name":"p1"
}]
}
2.3.46.3 Load method
Load patrol detail include preset members information.
Request
Key Value Description Availability
id <integer> Required.
ID of patrol.
1 and onward
Example:
GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.PTZ.Patrol"&version="1"&method="Load"&id=1
Response
Key Value Description Availability
patrol <Patrol> Array List of patrol information. 1 and onward
<Patrol> Definition:
Key Value Description Availability
camId <CAMERA_ID> Unique camera ID. 1 and onward
id <integer> ID of patrol in Surveillance Station database. 1 and onward
name <string> Patrol name. 1 and onward
speed <integer> Speed of patrol to run preset. 1 and onward
stayTime <integer> Delay time in seconds from one preset to
another.
1 and onward
presetList <Preset> Array List of preset information. 1 and onward
Copyright © Synology Inc. All rights Reserved. 406
Synology Surveillance Station Web API
<Preset> Definition:
Key Value Description Availability
name <string> Name of the preset. 1 and onward
position <integer> ID of preset in camera. 1 and onward
Type <integer> 0: Normal
1: Home
1 and onward
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
}
}
2.3.46.4 Save method
Add or modify a patrol.
Request
Key Value Description Availability
camId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
id <integer> Optional.
ID of patrol to be modified, add a new one if
no specific ID.
1 and onward
stayTime <integer> Optional.
Delay time in seconds from one preset to
another, default to 5.
1 and onward
speed <integer> Optional.
Speed of patrol to run preset, default to 3.
1 and onward
name <string> Required.
Name of the patrol.
1 and onward
presetList <Preset> Array Optional. 1 and onward
Copyright © Synology Inc. All rights Reserved. 407
Synology Surveillance Station Web API
List of preset information, delete all preset if
empty.
<Preset> Definition:
Key Value Description Availability
name <string> Name of the preset. 1 and onward
position <integer> ID of preset in camera. 1 and onward
Type <integer> 0: Normal
1: Home
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 Value Description Availability
patrol <Patrol> Array List of patrol information. 1 and onward
<Patrol> Definition:
Key Value Description Availability
camId <CAMERA_ID> Unique camera ID. 1 and onward
id <integer> ID of patrol in Surveillance Station database. 1 and onward
name <string> Patrol name. 1 and onward
speed <integer> Speed of patrol to run preset. 1 and onward
stayTime <integer> Delay time in seconds from one preset to
another.
1 and onward
presetList <Preset> Array List of preset information. 1 and onward
<Preset> Definition:
Key Value Description Availability
name <string> Name of the preset. 1 and onward
position <integer> ID of preset in camera. 1 and onward
Type <integer> 0: Normal
1: Home
1 and onward
Example:
{
"patrol":{
"camId":4,
"id":1,
"name":"p1",
"presetList":[{
"name":"home",
"position":0,
Copyright © Synology Inc. All rights Reserved. 408
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 Value Description Availability
camId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
patrolId <string> Required.
Array of patrol IDs.
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 Value Description Availability
camId <CAMERA_ID> Required.
Unique camera ID.
1 and onward
id <integer> Required.
ID of patrol in Surveillance Station database.
1 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 409
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 Value Description Availability
camId <CAMERA_ID> Required.
Unique camera ID.
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 Description
400 Operation Failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 410
Synology Surveillance Station Web API
2.3.47 SYNO.SurveillanceStation.Camera.Search
Searching cameras and get searching resrult.
Name Version Availability
SYNO.SurveillanceStation.Camera.Search 1 Surveillance Station 7.2.2
Method Name Section Availability
Start 2.3.47.1 1 and onward
GetInfo 2.3.47.2 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 Value Description Availability
pid
<integer>
Camera search process ID, used as a parameter
to get search result by InfoGet action.
1 and onward
Example:
{
"pid":1024
}
2.3.47.2 GetInfo method
Get the searching infomation.
Request
Key Value Description Availability
pid <integer> Required.
The pid of the searching process.
1 and onward
offset <integer> Optional.
Next camera data start index, default to 0.
1 and onward
Copyright © Synology Inc. All rights Reserved. 411
Synology Surveillance Station Web API
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Camera.Search"&version="1"&method="GetInfo"&pid=1024
Response
Key Value Description Availability
camList <Camera> Array List of camera infomation. 1 and onward
searchStatus <boolean> Is the searching process alive. 1 and onward
camCount <integer> Last camera data index, used as next offset. 1 and onward
<Camera> definition:
Key Value Description Availability
ip <string> IP of the camera. 1 and onward
mac <string> Camera MAC address. 1 and onward
model <string> Model of the camera. 1 and onward
port <integer> Port of the camera. 1 and onward
vendor <string> Vendor of the camera. 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 Description
400 Operation Failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 412
Synology Surveillance Station Web API
2.3.48 SYNO.SurveillanceStation.HomeMode
Switch home mode or get home mode related setting and information.
Name Version Availability
SYNO.SurveillanceStation.HomeMode 1 Surveillance Station 8.1.0
Method Name Section Availability
Switch 2.3.48.1 1 and onward
GetInfo 2.3.48.2 1 and onward
2.3.48.1 Switch method
Switch home mode on/off.
Request
Key Value Description Availability
on <boolean> Required.
True to turn on home mode, while false to
turn it off.
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 Description Availability
need_mobiles <boolean> Optional.
Home mode info will conclude which mobile
devices is binding to the server, default to
false.
1 and onward
Copyright © Synology Inc. All rights Reserved. 413
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
enabled.
1 and onward
mode_schedule <schedule string> Home mode switching schedule. 1 and onward
mode_schedule_next_
time
<timestamp> Next time to switch home mode by schedule.
-1 if invalid.
1 and onward
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
in home mode.
1 and onward
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. 414
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 Description
400 Operation Failed.
401 Parameter invalid.
Copyright © Synology Inc. All rights Reserved. 415
Synology Surveillance Station Web API
2.3.49 SYNO.SurveillanceStation.Transactions.Device
This API provides methods to acquire information of transaction devices.
Name Version Availability
SYNO.SurveillanceStation.Transactions.Device 1 Surveillance Station 8.1.0
Method Name Section Availability
Enum 2.3.49.1 1 and onward
2.3.49.1 Enum
Get the list of all transaction devices.
Request
Key Value Description Availability
filterIds <string> Optional.
List of transaction device id. Should write in
square brackets.
1 and onward
filterDsIds <string> Optional.
List of id of ds. Should write in square
brackets.
1 and onward
filterEnable <boolean> Optional.
Filter the enable/disable devices.
1 and onward
filterStatus <integer> Optional.
Filter the specified status.
The status codes are list below:
0 : Normal,
1 : Disconnected,
2 : Disabled,
3 : Deleted
1 and onward
start <integer> Optional.
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.
1 and onward
limit <integer> Optional.
Number of transaction devices to be returned.
If not specified, return devices to the end of
device list.
1 and onward
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. 416
Synology Surveillance Station Web API
Response
Key Value Description Availability
alert_event <integer> The settings in live view alert setting. 1 and onward
baudrate <integer> Baud rate. 1 and onward
connector <integer> The connection type.
The types are list below:
0 : TCP,
1 : Serial Port,
2 : Surveillance Station WebAPI
1 and onward
databits <integer> Data bits. 1 and onward
ds_id <integer> The id of DS. 1 and onward
enable <boolean> Is the device enabled. 1 and onward
encoding <string> The encoding type of the device. 1 and onward
flowcontrol <integer> The setting of flow control.
0 : None,
1 : XON / XOFF,
2 : RTS / CTS
1 and onward
host <string> The address of the device. 1 and onward
id <integer> The id of the device. 1 and onward
id_on_rec_server <integer> The id on the recording server. 1 and onward
name <string> The name of the device. 1 and onward
notifyschedule <string> The schedule in the Notification app. 1 and onward
osd_bg_color <string> The background color code of the OSD. 1 and onward
osd_bg_trans <integer> The transparency of the background color. 1 and onward
osd_fontcolor <string> The color code of the OSD text. 1 and onward
osd_fontsize <integer> The font size of the OSD text. 1 and onward
osd_fontstyle <integer> The style of the OSD text.
0 : Normal,
1 : Bold
1 and onward
osd_position <integer> The position of the OSD.
0 : Left side,
1 : Right side
1 and onward
osd_textalign <integer> The alignment of the OSD text.
0 : Left,
1 : Center,
2 : Right
1 and onward
pairedcam_enable <boolean> If the device have a camera paired. 1 and onward
pairedcam_id <integer> The id of the paired camera. 1 and onward
pairedcam_stream <integer> The stream profile of the paired camera. 1 and onward
paritycheck <integer> The setting of parity check.
0 : None,
1 : Odd,
2 : Even,
3 : Mark,
4 : Space
1 and onward
port <integer> The address port of the device. 1 and onward
pos_parsing_rule <json> Describe the setting of the parsing rule. 1 and onward
status <integer> The current status of the transaction device. 1 and onward
Copyright © Synology Inc. All rights Reserved. 417
Synology Surveillance Station Web API
0 : Normal,
1 : Disconnected,
2 : Disabled,
3 : Deleted
stopbits <integer> Stop bits of the device. 1 and onward
keyUsedCnt <integer> The number of total used license in system. 1 and onward
localTotalCnt <integer> The number of installed transaction devices. 1 and onward
timestamp <timestamp> UTC unix timestamp.
The time when the system respond this
request.
1 and onward
total <integer> The total device number listed in the
response.
1 and onward
success <boolean> Whether the request is success or not. 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. 418
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 Description
400 Operation Failed.
Copyright © Synology Inc. All rights Reserved. 419
Synology Surveillance Station Web API
2.3.50 SYNO.SurveillanceStation.Transactions.Transaction
This API provides methods to acquire information of transaction histories.
Name Version Availability
SYNO.SurveillanceStation.Transactions.Transact
ion
1 Surveillance Station 8.1.0
Method Name Section Availability
Enum 2.3.50.1 1 and onward
Lock 2.3.50.2 1 and onward
Unlock 2.3.50.3 1 and onward
Delete 2.3.50.4 1 and onward
Begin 2.3.50.5 1 and onward
Complete 2.3.50.6 1 and onward
Cancel 2.3.50.7 1 and onward
AppendData 2.3.50.8 1 and onward
2.3.50.1 Enum
Get the list of all transactions.
Request
Key Value Description Availability
filterIds <json> Optional.
List of specified ids.
Should write in a format like :
"[{\"pos_id\":2,\"transaction_id\":2}]"
The entry "transaction_id" can be empty.
1 and onward
dsId <integer> Optional.
Ds id. Specified as local ds id by default.
1 and onward
filterStatus <integer> Optional.
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
1 and onward
filterLock <boolean> Optional.
Filter transactions by the lock status.
1 and onward
filterTimeFrom <timestamp> Optional.
UTC unix timestamp. Filter transactions after
the specified time.
1 and onward
filterTimeTo <timestamp> Optional.
UTC unix timestamp. Filter transactions before
the specified time.
1 and onward
filterTimeRang <boolean> Optional. 1 and onward
Copyright © Synology Inc. All rights Reserved. 420
Synology Surveillance Station Web API
eIntersect To determine whether the “filterTimeFrom”
parameter would cover the duration of the
first transaction or not.
filterKeyword <string> Optional.
To filter transactions containing the specified
string.
1 and onward
start <integer> Optional.
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.
1 and onward
limit <integer> Optional.
Number of transactions to be returned.
If not specified, return transactions to the end
of transaction list.
1 and onward
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 Value Description Availability
audio_format <string> Audio format of recording file. 1 and onward
begin_tmstmp <timestamp> UTC unix timestamp. The start time of this
history.
1 and onward
camera_id <integer> The id of camera that generate the recording
file.
1 and onward
camera_name <string> The name of camera that generate the
recording file.
1 and onward
closing <boolean> Point out the recording file is closing or not. 1 and onward
content <json> The parsed content of this transaction. 1 and onward
dsId <integer> The dsId of the device that generate this
transaction.
1 and onward
end_tmstmp <timestamp> UTC unix timestamp. The end time of this
transaction.
1 and onward
eventId <integer> The id of the recording file. 1 and onward
filesize <integer> The file size of the recording file. 1 and onward
folder <string> The folder path of the recording file. 1 and onward
framecount <integer> Frame count of the recording file. 1 and onward
id <string> The id combined with the device id and the
transaction id.
1 and onward
lock <boolean> Whether the transaction is locked or not. 1 and onward
name <string> Path of the recording file. 1 and onward
pos_id <integer> The id of the device that generate this
transaction.
1 and onward
posevent_ids <string> The id list of the recording files. Not in use 1 and onward
Copyright © Synology Inc. All rights Reserved. 421
Synology Surveillance Station Web API
currently.
recording <boolean> Whether the recording file is recording or not. 1 and onward
snapshot_medium <integer> Snapshot of the recording file. 1 and onward
startOffset <integer> The time offset when this transaction
happened in the recording file.
1 and onward
startTime <timestamp> UTC unix timestamp. The start time of the
recording file.
1 and onward
status <integer> The status of the transaction.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
4 : Completed without begin
5 : Canceled without begin
1 and onward
stopTime <timestamp> UTC unix timestamp. The start time of the
recording file.
1 and onward
transaction_id <integer> The id of the transaction. 1 and onward
videoType <integer> The video encoding type of the recording file.
0 : Unknown
1 : mjpeg
2 : mpeg4
3 : h264
5 : mxpeg
6 : h265
7 : h264+
8 : h265+
1 and onward
video_type <integer> The video encoding type of the recording file.
(Same as above.)
1 and onward
video_height <integer> The height of the recording file. 1 and onward
video_width <integer> The width of the recording file. 1 and onward
volume <integer> The volume of the recording file. 1 and onward
success <boolean> If the request is success. 1 and onward
timestamp <timestamp> UTC unix timestamp.
The time when the system respond this
request.
1 and onward
total <integer> The total transaction number listed in the
response.
1 and onward
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. 422
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. 423
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 Value Description Availability
filterIds <json> Optional.
List of specified ids.
Should write in a format like :
"[{\"pos_id\":2,\"transaction_id\":2}]"
The entry "transaction_id" can be empty.
1 and onward
dsId <integer> Optional.
Ds id. Specified as local ds id by default.
1 and onward
Copyright © Synology Inc. All rights Reserved. 424
Synology Surveillance Station Web API
filterStatus <integer> Optional.
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
1 and onward
filterLock <boolean> Optional.
Filter transactions by the lock status.
1 and onward
filterTimeFrom <timestamp> Optional.
UTC unix timestamp. Filter transactions after
the specified time.
1 and onward
filterTimeTo <timestamp> Optional.
UTC unix timestamp. Filter transactions before
the specified time.
1 and onward
filterTimeRang
eIntersect
<boolean> Optional.
To determine whether the “filterTimeFrom”
parameter would cover the duration of the
first transaction or not.
1 and onward
filterKeyword <string> Optional.
To filter transactions containing the specified
string.
1 and onward
start <integer> Optional.
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.
1 and onward
limit <integer> Optional.
Number of transactions to be locked.
If not specified, lock transactions to the end of
transaction list.
1 and onward
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. 425
Synology Surveillance Station Web API
Key Value Description Availability
filterIds <json> Optional.
List of specified ids.
Should write in a format like :
"[{\"pos_id\":2,\"transaction_id\":2}]"
The entry "transaction_id" can be empty.
1 and onward
dsId <integer> Optional.
Ds id. Specified as local ds id by default.
1 and onward
filterStatus <integer> Optional.
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
1 and onward
filterLock <boolean> Optional.
Filter transactions by the lock status.
1 and onward
filterTimeFrom <timestamp> Optional.
UTC unix timestamp. Filter transactions after
the specified time.
1 and onward
filterTimeTo <timestamp> Optional.
UTC unix timestamp. Filter transactions before
the specified time.
1 and onward
filterTimeRang
eIntersect
<boolean> Optional.
To determine whether the “filterTimeFrom”
parameter would cover the duration of the
first record or not.
1 and onward
filterKeyword <string> Optional.
To filter transactions containing the specified
string.
1 and onward
start <integer> Optional.
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.
1 and onward
limit <integer> Optional.
Number of transactions to be unlocked.
If not specified, unlock transactions to the end
of transaction list.
1 and onward
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. 426
Synology Surveillance Station Web API
2.3.50.4 Delete
Delete history records matching given filter rule.
Request
Key Value Description Availability
filterIds <json> Optional.
List of specified ids.
Should write in a format like :
"[{\"pos_id\":2,\"transaction_id\":2}]"
The entry "transaction_id" can be empty.
1 and onward
dsId <integer> Optional.
Ds id. Specified as local ds id by default.
1 and onward
filterStatus <integer> Optional.
Filter transactions by status.
0 : None
1 : Completed
2 : Canceled
3 : Incomplete
1 and onward
filterLock <boolean> Optional.
Filter transactions by the lock status.
1 and onward
filterTimeFrom <timestamp> Optional.
UTC unix timestamp. Filter transactions after
the specified time.
1 and onward
filterTimeTo <timestamp> Optional.
UTC unix timestamp. Filter transactions before
the specified time.
1 and onward
filterTimeRang
eIntersect
<boolean> Optional.
To determine whether the “filterTimeFrom”
parameter would cover the duration of the
first transaction or not.
1 and onward
filterKeyword <string> Optional.
To filter transactions containing the specified
string.
1 and onward
start <integer> Optional.
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.
1 and onward
limit <integer> Optional.
Number of transactions to be deleted.
If not specified, delete transactions to the end
of transaction list.
1 and onward
Example:
GET /webapi/entry.cgi?
Copyright © Synology Inc. All rights Reserved. 427
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 Description Availability
device_name <string> Required.
The name of the transaction device
established in Surveillance Station.
1 and onward
session_id <string> Required.
Id of a session.
1 and onward
timeout <integer> Required.
The max duration of a transaction.
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. 428
Synology Surveillance Station Web API
Key Value Description Availability
device_name <string> Required.
The name of the transaction device
established in Surveillance Station.
1 and onward
session_id <string> Required.
Id of a session.
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 Description Availability
device_name <string> Required.
The name of the transaction device
established in Surveillance Station.
1 and onward
session_id <string> Required.
Id of a session.
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. 429
Synology Surveillance Station Web API
2.3.50.8 AppendData
Carry data into the session with id specified in session_id.
Request
Key Value Description Availability
device_name <string> Required.
The name of the transaction device
established in Surveillance Station.
1 and onward
session_id <string> Required.
Id of a session.
1 and onward
content <string> Required.
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.
1 and onward
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 Description
400 Operation Failed.
401 Illegal parameters.
Copyright © Synology Inc. All rights Reserved. 430
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 Version Availability
SYNO.SurveillanceStation.Archiving.Pull 1 Surveillance Station 8.0
Method Name Section Availability
SaveTask 2.3.51.1 1 and onward
LoginSourceDS 2.3.51.2 1 and onward
DeleteTask 2.3.51.3 1 and onward
ListTask 2.3.51.4 1 and onward
EnableTask 2.3.51.5 1 and onward
DisableTask 2.3.51.6 1 and onward
BatchEditTask 2.3.51.7 1 and onward
GetBatchEditProgress 2.3.51.8 1 and onward
BatchEdiProgressDone 2.3.51.9 1 and onward
Copyright © Synology Inc. All rights Reserved. 431
Synology Surveillance Station Web API
2.3.51.1 SaveTask
Add or edit an Archive Vault task.
Request
Key Value Description Availability
blCustomFolde
r
<boolean> To determine whether using custom folder
name to save or not.
1 and onward
blLimitBySize <boolean> To determine whether the task has file size
limit or not.
1 and onward
blRotateFile <boolean> To determine whether the files in the task will
be rotated or not.
1 and onward
blSrcRecNoOve
rlap
<boolean> To determine whether the files in the task will
has the same time duration as the files in
server or not.
1 and onward
blUseRecDet <boolean> 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.
1 and onward
camIds <CAMERA_ID>
List of desired cameras to perform
archiving tasks.
1 and onward
camInfo Array of <Camera
Information Object>
Info of camera in camIds.(See 2.3.4.3)
1 and onward
dayLimit <integer> Specify a period of time (in days) to retain the
recordings. Any recordings that were saved
earlier than the specified time range will be
deleted automatically.
1 and onward
didCode <string>
Device Id
1 and onward
dsSerial <string>
Serial of ds which has source file.
1 and onward
execTime <timestamp>
Specify one-time task execution time.
1 and onward
hostname <string>
Host name(ip) of archiving source server.
1 and onward
id <integer>
Task Id.
1 and onward
name <string>
Task name.
1 and onward
passwd <string>
Login user password of archiving source
server.
1 and onward
port <string>
Login port of archiving source server.
1 and onward
recEndTm <timestamp>
End time to archive the recording files.
1 and onward
recMode <string>
Select recording modes to archive.
1 and onward
recSchedule <schedule string>
Schedule to archive recording files.
1 and onward
recStartTm <timestamp>
Start time to archive the recording files.
1 and onward
schedule <schedule string>
Schedule to execute the task.
1 and onward
storagePath <string>
Storage path.
1 and onward
type <integer>
Archiving Task Type.
UnKnown = 0
Onetime_Immediate = 1
1 and onward
Copyright © Synology Inc. All rights Reserved. 432
Synology Surveillance Station Web API
Onetime_Schedule = 2
Schedule = 3
Tiering = 4
username <string>
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 Value Description Availability
name <string> Task name 1 and onward
id <integer> Task Id 1 and onward
success <boolean> Execution success or not 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 Value Description Availability
port <string> Port of the ds server. 1 and onward
Copyright © Synology Inc. All rights Reserved. 433
Synology Surveillance Station Web API
hostname <string> Hostname of the ds server. 1 and onward
protocol <boolean> Use HTTPS Protocol or not. 1 and onward
username <string> User name of the ds server. 1 and onward
passwd <string> Password of the ds server. 1 and onward
archId <integer> Archive task id. 1 and onward
didCode <string> Device Id. 1 and onward
srcDsId <integer> Id of the ds server. 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 Value Description Availability
cameras Array of <Camera
Information Object>
Info of camera in the archive task.(See 2.3.4.3) 1 and onward
dsSerial <string> Serial of source ds. 1 and onward
success <boolean> Execution success or not 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. 434
Synology Surveillance Station Web API
"feRegionList": [],
"firmware": "",
"fisheyeDispMode": "",
"fisheyeParam": {},
"folder": "/volume2/surveillance/Vivotek - PT81335",
"fov": "",
"hasCamParam": true,
"hasEdgeStg": false,
"id": 2,
"idOnRecServer": 0,
"ip": "10.13.22.184",
"isAudioDisableRec": false,
"isDisableRec": false,
"isEnableExtDI": false,
"isUnrecognized": false,
"ledCap": false,
"liveViewSource": 0,
"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",
"resolution": "640x400"
},
"stream3": {
Copyright © Synology Inc. All rights Reserved. 435
Synology Surveillance Station Web API
"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,
"id": 10,
"idOnRecServer": 0,
"ip": "10.13.22.52",
"isAudioDisableRec": false,
"isDisableRec": false,
"isEnableExtDI": false,
"isUnrecognized": false,
"ledCap": false,
Copyright © Synology Inc. All rights Reserved. 436
Synology Surveillance Station Web API
"liveViewSource": 0,
"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,
"quality": "5",
"resolution": "640x400"
},
"tvStandard": 0,
"uiStmNoList": "1,1,1",
"updateTime": 12464,
Copyright © Synology Inc. All rights Reserved. 437
Synology Surveillance Station Web API
"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
}
],
"strSubRegionInfo": "[]",
"type": 0,
"zoom": 25
},
Copyright © Synology Inc. All rights Reserved. 438
Synology Surveillance Station Web API
{
"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,
"id": 0,
"location": 0,
"name": "",
"posX": 500,
"posY": 750,
"strSubRegionInfo": "",
Copyright © Synology Inc. All rights Reserved. 439
Synology Surveillance Station Web API
"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,
"location": 0,
"name": "",
"posX": 500,
"posY":
750,
"strSubRegionInfo": "",
Copyright © Synology Inc. All rights Reserved. 440
Synology Surveillance Station Web API
"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
},
{
"camId": 0,
"id": 0,
"location": 0,
"name": "",
"posX": 250,
"posY": 750,
Copyright © Synology Inc. All rights Reserved. 441
Synology Surveillance Station Web API
"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",
"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",
Copyright © Synology Inc. All rights Reserved. 442
Synology Surveillance Station Web API
"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,
"id": 11,
"idOnRecServer": 0,
"ip": "10.13.22.96",
"isAudioDisableRec": false,
"isDisableRec": false,
"isEnableExtDI": false,
"isUnrecognized": false,
"ledCap": false,
"liveViewSource": 0,
"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,
"status": 15,
"statusFlags": 0,
"stmFisheyeType": 50,
"stream1": {
"bitrateCtrl": 1,
"constantBitrate": "1000",
"fps": 5,
"quality": "5",
"resolution": "1472x1384"
Copyright © Synology Inc. All rights Reserved. 443
Synology Surveillance Station Web API
},
"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
Key Value Description Availability
id <integer> Task Id. 1 and onward
keepRec <boolean> Keep the recording files or not. 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="DeleteTask"&id=2&keepRec=false
Copyright © Synology Inc. All rights Reserved. 444
Synology Surveillance Station Web API
Response
Key Value Description Availability
success <boolean> Execution success or not 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 Description Availability
BandwidthLimi
t1
<integer> First limit value of bandwidth control limit. 1 and onward
BandwidthLimi
t2
<integer> Second limit value of bandwidth control limit. 1 and onward
blCustomFolde
r
<boolean> To determine whether using custom folder
name to save or not.
1 and onward
blLimitBySize <boolean> To determine whether the task has file size
limit or not.
1 and onward
blLimitByDate <boolean> To determine whether the task has date limit
or not.
1 and onward
blRotateFile <boolean> To determine whether the files in the task will
be rotated or not.
1 and onward
blAllCam <boolean>
To determine archive task includes all
camera or not.
1 and onward
blSrcRecNoOve
rlap
<boolean> To determine whether the files in the task will
has the same time duration as the files in
server or not.
1 and onward
blUseRecDet <boolean> 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
1 and onward
Copyright © Synology Inc. All rights Reserved. 445
Synology Surveillance Station Web API
Detection.
bwSchedule <schedule string>
Schedule for bandwidth control.
1 and onward
configuring <boolean>
The task is configuring or not.
1 and onward
currentSpeedLi
mit
<integer>
Current speed limit.
1 and onward
customFolder <string> The path of custom folder if blCustomFolder is
true.
1 and onward
camIds <CAMERA_ID>
List of desired cameras to perform
archiving tasks.
1 and onward
cameras Array of <Camera
Information Object>
Info of camera in camIds.(See 2.3.4.3)
1 and onward
dayLimit <integer> Specify a period of time (in days) to retain the
recordings. Any recordings that were saved
earlier than the specified time range will be
deleted automatically.
1 and onward
deleted <boolean>
The task is deleted or not.
1 and onward
didCode <string>
Device Id.
1 and onward
diffSerial <string>
Different ds serial if ds serial is modified.
1 and onward
dsSerial <string>
login source ds serial.
1 and onward
enabled <boolean>
Task is enabled or not.
1 and onward
execTime <timestamp>
Specify one-time task execution time.
1 and onward
fromId <integer>
ds id.
1 and onward
hostname <string>
Host name(ip) of archiving source server.
1 and onward
id <integer>
Task Id.
1 and onward
lastConnectTi
me
<timestamp>
Last connect time.
1 and onward
lastEventId <integer>
Last event Id.
1 and onward
lastEventIdByC
am
<Json object>
The json object which key is camera id and
value is lastEventId.
1 and onward
migrating <boolean>
The task is currently migrating(changing
folder path) or not.
1 and onward
name <string>
Task name.
1 and onward
occupiedSize <long long>
The file size that task total used.
1 and onward
passwd <string>
Login user password of archiving source
server.
1 and onward
progressPerce
nt
<integer>
The percentage of the task if the task is
executing.
1 and onward
protocol <integer>
Protocal that connect to Archiving server.
Http: 0, Https: 1
1 and onward
port <string>
Port of archiving source server.
1 and onward
recEndTm <timestamp>
End time to archive the recording files.
1 and onward
recMode <string>
Select recording modes to archive.
1 and onward
recSchedule <schedule string>
Schedule for archive recording files.
1 and onward
recStartTm <timestamp>
Start time to archive the recording files.
1 and onward
schedule <schedule string>
Schedule for execute the task.
1 and onward
shareUpdating <boolean>
Whether share files are updating.
1 and onward
sizeLimitGB <integer>
Size limit in GB
1 and onward
Copyright © Synology Inc. All rights Reserved. 446
Synology Surveillance Station Web API
srcDsId <integer>
NAS device Id of source device.
1 and onward
status <integer>
Status value of current task.
normal: 0
disabled: 1
completed: 2
deleted: 3
abnormal: 4
1 and onward
storageAvailabl
e
<boolean>
Whether storage is available or not.
1 and onward
storagePath <string>
Storage Path.
1 and onward
tierTaskId <integer>
Tier Task Id.
transmissionSp
eed
<float>
Transmission speed if task is executing.
1 and onward
type <integer>
Task Type.
UnKnown = 0
Onetime_Immediate = 1
Onetime_Schedule = 2
Schedule = 3
Tiering = 4
1 and onward
username <string>
Login user name of archiving source
server.
1 and onward
writingRecPath <string>
The path of the last event updated.
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 - PT-
31E","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
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
Copyright © Synology Inc. All rights Reserved. 447
Synology Surveillance Station Web API
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 Value Description Availability
id <integer> Task Id. 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="EnableTask"&id=
"2"
Response
Key Value Description Availability
success <boolean> Execution success or not 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 Value Description Availability
id <integer> Task Id. 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="DisableTask"&id=
"2"
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Copyright © Synology Inc. All rights Reserved. 448
Synology Surveillance Station Web API
Example:
{"success":true}
2.3.51.7 BatchEditTask
Disable Archive Vault task. Completed one time task cannot be enabled or disabled.
Request
Key Value Description Availability
taskIds <string> Task Ids that wants to apply the settings,
seperated by ",".
1 and onward
attrs <Object> 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.
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 Value Description Availability
success <boolean> Execution success or not 1 and onward
pid <integer> Batch edit process id 1 and onward
Example:
{"data":{"pid":26631},"success":true}
2.3.51.8 GetBatchEditProgress
Get the progress of batch edit.
Request
Key Value Description Availability
Copyright © Synology Inc. All rights Reserved. 449
Synology Surveillance Station Web API
pid <integer> Batch Edit process id 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="GetBatchEditProgress”&pid=31929
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
progress 0 .. 100 The complete percentage of batch edit
progress.
1 and onward
Example:
{"data":{"progress":100},"success":true}
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 Value Description Availability
pid <integer> Batch Edit process id 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Archiving.Pull"&version="1"&method="BatchEditProgressDone"&pid=31929
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{"success":true}
2.3.51.10 API Error Code
Code Description
Copyright © Synology Inc. All rights Reserved. 450
Synology Surveillance Station Web API
400 Execution Failed.
401 Guest or disabled account.
446
Task Path already exist.
534
Exceed name length limitation.
522
Original Task is Migrating.
Copyright © Synology Inc. All rights Reserved. 451
Synology Surveillance Station Web API
2.3.52 SYNO.SurveillanceStation.YoutubeLive
This API provides methods to get information of youtube liveview.
Name Version Availability
SYNO.SurveillanceStation.YoutubeLive 1 Surveillance Station 8.2
Method Name Section Availability
Load 2.3.52.1 1 and onward
Save 2.3.52.2 1 and onward
CloseLive 2.3.52.3 1 and onward
Copyright © Synology Inc. All rights Reserved. 452
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 Value Description Availability
data <YoubtubeLive Object> Information of youtube live 1 and onward
success <boolean> Execution success or not 1 and onward
<YoubtubeLive Object>
Definitions:
Key Value Description Availability
cam_id <integer> Id of camera. 1 and onward
connect <boolean> Rmtp connect or not 1 and onward
key <string> Youtube serial key 1 and onward
live_on <boolean> Broadcast live or not 1 and onward
rtmp_path <string> Broadcast rtmp path 1 and onward
stream_profile <integer> Camera stream profile 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. 453
Synology Surveillance Station Web API
2.3.52.2 Save
Set youtube live broadcast information.
Request
Key Value Description Availability
rtmp_path <string> Camera rtmp path 1 and onward
key <string> Youtube serial key 1 and onward
cam_id <integer> Camera Id 1 and onward
stream_profile <integer> Camera stream profile 1 and onward
live_on <bollean> Youtube live broadcast start or not 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-b7ja-
e0rb"&cam_id="2"&stream_profile="1"&live_on="true"
Response
Key Value Description Availability
success <boolean> Execution success or not 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 Value Description Availability
success <boolean> Execution success or not 1 and onward
Copyright © Synology Inc. All rights Reserved. 454
Synology Surveillance Station Web API
Example:
{
"success" : true
}
Copyright © Synology Inc. All rights Reserved. 455
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 Version Availability
SYNO.SurveillanceStation.IVA 1 Surveillance Station 8.2.9
Method Name Section Availability
ListTask 2.3.53.1 1 and onward
SaveTask 2.3.53.2 1 and onward
DeleteTask 2.3.53.3 1 and onward
EnableTask 2.3.53.4 1 and onward
DisableTask 2.3.53.5 1 and onward
ResetPplCntCounter 2.3.53.6 1 and onward
2.3.53.1 ListTask
Get
deep video analytics task list.
Request
No parameter is required.
Example:
GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.IVA"&version="1"&method="ListTask"
Response
Key Value Description Availability
data <Task List Object> Information of task list. 1 and onward
success <boolean> Execution success or not 1 and onward
<Task List Object>
Definitions:
Key Value Description Availability
task Array of <Task> List of task info. 1 and onward
total <integer> The total number of tasks. 1 and onward
<Task>
Definitions:
Key Value Description Availability
analyze_type <string> Paired camea name 1 and onward
area_grid <boolean> The deleted status of this task 1 and onward
area_line <boolean> The enabled status of this task 1 and onward
area_region <integer> The id of this task 1 and onward
camera_id <string> The name of this task 1 and onward
camera_name <integer> The event count of this task today 1 and onward
deleted <boolean> the status of this task to be deleted or not 1 and onward
det_fg_obj <integer> the bitmap of status of detected object for 1 and onward
Copyright © Synology Inc. All rights Reserved. 456
Synology Surveillance Station Web API
detecting specific object.
1 - detect people
2 - detect vehicle
det_region <string> the vertexes of detected region of detection
task, concatenated by ","
1 and onward
det_region_cnt <integer> the number of detected region 1 and onward
enable <boolean> the status of this task to start processing 1 and onward
enable_min_d
uration
<boolean> the status of the shortest limitation of object
staying in the detected region.
1 and onward
enable_recordi
ng
<boolean> the status to record the video of detected
result
1 and onward
enable_schedu
le
<boolean> the status to enable the schedule of this task 1 and onward
event_integrati
on
<boolean> the status to integrate motion detected event
with surveillance station
1 and onward
fence_dir_flag <integer> 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
1 and onward
fence_line <string> the vertexes of virtual fence of intrusion
detection task, concatenated by ","
1 and onward
id <integer> the id of this DVA task 1 and onward
id_on_rec_serv
er
<integer> the id of this DVA task on recording server. it is
only work on cms host.
1 and onward
min_duration <integer> the seconds of the shortest limitation of
object staying in the detected region.
1 and onward
min_obj_size <double> the minimum limitation of object size of
detection.
1 and onward
min_obj_size_
option
<integer> the status to limit the object size of detection.
0 - disable limitation
1 - enable limitation
1 and onward
name <string> the name of this DVA task 1 and onward
owner_ds_id <integer> The DS id of which DS the recording belongs
0: Local Host
> 0: The id of recording server
1 and onward
people_display
_info
<integer> 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
1 and onward
people_display
_pos
<integer> the status of position of people counting
displayed result on task preview.
0 - top right
1 - bottom right
1 and onward
Copyright © Synology Inc. All rights Reserved. 457
Synology Surveillance Station Web API
2 - top left
3 - bottom left
people_enable
_stay_max
<boolean> the status of to limit the stay count or not 1 and onward
people_enter <integer> the array index of people entering
it could be changed with people_exit to swap
counting result.
1 and onward
people_exit <integer> the array index of people exiting
it could be changed with people_enter to
swap counting result.
1 and onward
people_hint_p
os
<string> the vertexes of people direction of people
counting task, concatenated by ","
1 and onward
people_mode <integer> 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
1 and onward
det_region <string> the vertexes of detected region of detection
task, concatenated by ","
1 and onward
people_stay_m
ax
<integer> the limit number of people stayed.
Only work when people_enable_stay_max is
true.
1 and onward
post_rec_time <integer> the seconds to clip the record after detection 1 and onward
pre_rec_time <integer> the seconds to clip the record before
detection
1 and onward
region_type <integer> the status of region type
0 - Include region
1 - Exclude region
1 and onward
reset_cnt_freq
uency
<integer> 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> the weekday to reset count 1 and onward
reset_date <integer> the date of the month to reset count 1 and onward
reset_time_mi
nute
<integer> the minutes of the hour in the day to reset
count
1 and onward
reset_time_ho
ur
<integer> the hours of the day to reset count 1 and onward
schedule <string> the bitmap of hours in a week to process task. 1 and onward
scheduleOn <boolean> the status to enable the schedule of this task 1 and onward
status_flags <integer> the bitmap of task status.
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
1 and onward
Copyright © Synology Inc. All rights Reserved. 458
Synology Surveillance Station Web API
64
-DEV_STATUS_FLAG_HW_RESTARTING
128 -DEV_STATUS_FLAG_UNSTABLE
stream_profile <integer> the status of camera stream level
0 - level high
1 - level medium
2 - level low
1 and onward
sync_to_host <boolean> the status of this task to sync people counting
result to cms host
1 and onward
trans_flags <integer> the bitmap of transient status of this task
0 -DVA_TRANS_FLAG_NORMAL
1 -DVA_TRANS_FLAG_CAM_FPS
2 - DVA_TRANS_FLAG_FETCH_FPS
4 -DVA_TRANS_FLAG_SIMULATING
1 and onward
trigger_alert <boolean> 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. 459
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. 460
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. 461
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 Description Availability
analyze_type <integer> the type of this DVA task
2 - DVA_NON_IDLE_ZONE
6 -
DVA_PEOPLE_COUNTING_CEILING_MOU
NT
8 - DVA_VIRTUAL_FENCE
1 and onward
actFromHost <boolean> the relayed flag of cms webapi. It should be
true when calling by cms recording server,
1 and onward
name <string> name of this DVA task 1 and onward
camera_id <integer> the camera id of this DVA task 1 and onward
enable <boolean> the status of this task to start processing 1 and onward
enable_recordi
ng
<boolean> the status to record the video of detected
result
1 and onward
pre_rec_time <integer> the seconds to clip the record before
detection
1 and onward
post_rec_time <integer> the seconds to clip the record after detection 1 and onward
event_integrati
on
<boolean> the status to integrate motion detected event
with surveillance station
1 and onward
region_type <integer> the status of region type
0 - Include region
1 - Exclude region
1 and onward
det_region_cnt <integer> the number of detected region 1 and onward
det_region <string> the vertexes of detected region of detection
task, concatenated by ","
1 and onward
people_mode <integer> the status of counting mode for people
counting task
0 - counting for both enter and leave
people
1 and onward
Copyright © Synology Inc. All rights Reserved. 462
Synology Surveillance Station Web API
1 - counting for only enter people
2 - counting for only leave people
reset_cnt_freq
uency
<integer> 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> the weekday to reset count 1 and onward
reset_date <integer> the date of the month to reset count 1 and onward
reset_time_mi
nute
<integer> the minutes of the hour in the day to reset
count
1 and onward
reset_time_ho
ur
<integer> the hours of the day to reset count 1 and onward
fence_dir_flag <integer> 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
1 and onward
people_display
_pos
<integer> the status of position of people counting
displayed result on task preview.
0 - top right
1 - bottom right
2 - top left
3 - bottom left
1 and onward
stream_profile <integer> the status of camera stream level
0 - level high
1 - level medium
2 - level low
1 and onward
people_enable
_stay_max
<boolean> the status of to limit the stay count or not 1 and onward
intrusion_dete
ct_target
<integer> the status of the detected type of intrusion
detection.
1 - detect all object
2 - detect specific object
1 and onward
det_fg_obj <integer> the bitmap of status of detected object for
detecting specific object.
1 - detect people
2 - detect vehicle
1 and onward
min_obj_size <double> the minimum limitation of object size of
detection.
1 and onward
min_obj_size_
option
<integer> the status to limit the object size of detection.
0 - disable limitation
1 - enable limitation
1 and onward
enable_min_d
uration
<boolean> the status of the shortest limitation of object
staying in the detected region.
1 and onward
min_duration <integer> the seconds of the shortest limitation of
object staying in the detected region.
1 and onward
people_display
_info
<integer> The bitmap of the display info.
1 - DISPLAY_ANNOTATION
2 - DISPLAY_HINT_WHEN_PASS
1 and onward
Copyright © Synology Inc. All rights Reserved. 463
Synology Surveillance Station Web API
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
people_enter <integer> the array index of people entering
it could be changed with people_exit to swap
counting result.
1 and onward
people_stay_m
ax
<integer> the limit number of people stayed.
Only work when people_enable_stay_max is
true.
1 and onward
people_exit <integer> the array index of people exiting
it could be changed with people_enter to
swap counting result.
1 and onward
people_region <string> the vertexes of detected region of people
counting task, concatenated by ","
1 and onward
people_hint_p
os
<string> the vertexes of people direction of people
counting task, concatenated by ","
1 and onward
blEditMode <boolean> the status of task to be edited or not 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"&region_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. 464
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 Value Description Availability
data <Task> information of DVA task 1 and onward
success <boolean> Execution success or not 1 and onward
<Task>
Definitions:
Key Value Description Availability
analyze_type <string> Paired camea name 1 and onward
area_grid <boolean> The deleted status of this task 1 and onward
area_line <boolean> The enabled status of this task 1 and onward
area_region <integer> The id of this task 1 and onward
camera_id <string> The name of this task 1 and onward
camera_name <integer> The event count of this task today 1 and onward
deleted <boolean> the status of this task to be deleted or not 1 and onward
det_fg_obj <integer> the bitmap of status of detected object for
detecting specific object.
1 - detect people
2 - detect vehicle
1 and onward
det_region <string> the vertexes of detected region of detection
task, concatenated by ","
1 and onward
det_region_cnt <integer> the number of detected region 1 and onward
enable <boolean> the status of this task to start processing 1 and onward
enable_min_d
uration
<boolean> the status of the shortest limitation of object
staying in the detected region.
1 and onward
enable_recordi
ng
<boolean> the status to record the video of detected
result
1 and onward
enable_schedu
le
<boolean> the status to enable the schedule of this task 1 and onward
event_integrati
on
<boolean> the status to integrate motion detected event
with surveillance station
1 and onward
fence_dir_flag <integer> the status of detection direction of virtual
fence task.
1 - detect one direction of the fence
2 - the other direction of the fence
1 and onward
Copyright © Synology Inc. All rights Reserved. 465
Synology Surveillance Station Web API
3 - the both 2 directions of the fence
fence_line <string> the vertexes of virtual fence of intrusion
detection task, concatenated by ","
1 and onward
id <integer> the id of this DVA task 1 and onward
id_on_rec_serv
er
<integer> the id of this DVA task on recording server. it is
only work on cms host.
1 and onward
min_duration <integer> the seconds of the shortest limitation of
object staying in the detected region.
1 and onward
min_obj_size <double> the minimum limitation of object size of
detection.
1 and onward
min_obj_size_
option
<integer> the status to limit the object size of detection.
0 - disable limitation
1 - enable limitation
1 and onward
name <string> the name of this DVA task 1 and onward
owner_ds_id <integer> The DS id of which DS the recording belongs
0: Local Host
> 0: The id of recording server
1 and onward
people_display
_info
<integer> 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
1 and onward
people_display
_pos
<integer> the status of position of people counting
displayed result on task preview.
0 - top right
1 - bottom right
2 - top left
3 - bottom left
1 and onward
people_enable
_stay_max
<boolean> the status of to limit the stay count or not 1 and onward
people_enter <integer> the array index of people entering
it could be changed with people_exit to swap
counting result.
1 and onward
people_exit <integer> the array index of people exiting
it could be changed with people_enter to
swap counting result.
1 and onward
people_hint_p
os
<string> the vertexes of people direction of people
counting task, concatenated by ","
1 and onward
people_mode <integer> 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
1 and onward
det_region <string> the vertexes of detected region of detection 1 and onward
Copyright © Synology Inc. All rights Reserved. 466
Synology Surveillance Station Web API
task, concatenated by ","
people_stay_m
ax
<integer> the limit number of people stayed.
Only work when people_enable_stay_max is
true.
1 and onward
post_rec_time <integer> the seconds to clip the record after detection 1 and onward
pre_rec_time <integer> the seconds to clip the record before
detection
1 and onward
region_type <integer> the status of region type
0 - Include region
1 - Exclude region
1 and onward
reset_cnt_freq
uency
<integer> 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> the weekday to reset count 1 and onward
reset_date <integer> the date of the month to reset count 1 and onward
reset_time_mi
nute
<integer> the minutes of the hour in the day to reset
count
1 and onward
reset_time_ho
ur
<integer> the hours of the day to reset count 1 and onward
schedule <string> the bitmap of hours in a week to process task. 1 and onward
scheduleOn <boolean> the status to enable the schedule of this task 1 and onward
status_flags <integer> the bitmap of task status.
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
1 and onward
stream_profile <integer> the status of camera stream level
0 - level high
1 - level medium
2 - level low
1 and onward
sync_to_host <boolean> the status of this task to sync people counting
result to cms host
1 and onward
trans_flags <integer> the bitmap of transient status of this task
0 -DVA_TRANS_FLAG_NORMAL
1 -DVA_TRANS_FLAG_CAM_FPS
2 - DVA_TRANS_FLAG_FETCH_FPS
4 -DVA_TRANS_FLAG_SIMULATING
1 and onward
trigger_alert <boolean> the status of this task to trigger alert event 1 and onward
Example:
{
Copyright © Synology Inc. All rights Reserved. 467
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. 468
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. 469
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 Value Description Availability
ids <string> The list of <TASK_ID> to be deleted, 1 and onward
Copyright © Synology Inc. All rights Reserved. 470
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 Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
2.3.53.4 EnableTask
Enable DVA tasks
Request
Key Value Description Availability
ids <string> The list of <TASK_ID> to be enabled,
concatenated by “,”.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.IVA"&version="1"&method="EnableTask"&&ids="1,2,3"
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
Copyright © Synology Inc. All rights Reserved. 471
Synology Surveillance Station Web API
2.3.53.5 DisableTask
Disable DVA tasks
Request
Key Value Description Availability
ids <string> The list of <TASK_ID> to be disabled,
concatenated by “,”.
1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.IVA"&version="1"&method="DisableTask"&&ids="1,2,3"
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
2.3.53.6 ResetPplCntCounter
Reset the counter of people counting task
Request
Key Value Description Availability
taskId <int> The id of the task to be reseted. 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.IVA"&version="1"&method="ResetPplCntCounter"&&taskId=1
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Copyright © Synology Inc. All rights Reserved. 472
Synology Surveillance Station Web API
Example:
{
success: true
}
2.3.53.7 API Error Code
Code Description
400 Operation Failed.
401 Illegal parameters.
543 The number of DVA tasks and face tasks exceed the limitation
548 The input video type of the DVA task is invalid
Copyright © Synology Inc. All rights Reserved. 473
Synology Surveillance Station Web API
2.3.54 SYNO.SurveillanceStation.IVA.Report
This API provides methods to query people counting result.
Name Version Availability
SYNO.SurveillanceStation.IVA.Report 1 Surveillance Station 8.2.6
Method Name Section Availability
GetCount 2.3.54.1 1 and onward
GetReport 2.3.54.2 1 and onward
2.3.54.1 GetCount
Get people counting enter and leave count.
Request
Key Value Description Availability
ids <string> Task ids 1 and onward
timeStart <string> Start time in the format “YYYY-MM-DD:HH” 1 and onward
timeEnd <string> End time in the format “YYYY-MM-DD:HH” 1 and onward
timezone <integer> Offset of the time zone 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 Value Description Availability
data <report> Information of youtube live 1 and onward
success <boolean> Execution success or not 1 and onward
<report>
Definitions:
Key Value Description Availability
enter <integer> People enter count 1 and onward
exit <integer> People exit count 1 and onward
Example:
{
"data":{
"report":{
Copyright © Synology Inc. All rights Reserved. 474
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 Value Description Availability
ids <string>
Task ids, concatenated by “,”.
1 and onward
interval <int> The time interval of the report to get
1 - one day
2 - 1 week
3 - 1 month
4 - 1 year
1 and onward
intervalUnit <int> 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
1 and onward
timezone <integer> Offset of the time zone 1 and onward
timestamp <integer> Offset of the time stamp to get the report 1 and onward
blOccupancy <boolean> The status of this webapi to count stayed
people
1 and onward
Example:
GET /webapi/entry.cgi?
ids="2,3,4"&interval=1&intervalUnit=0&timestamp=1622505600&blOccupancy=true&timezone=480&api=
SYNO.SurveillanceStation.IVA.Report&method=GetReport&version=1
Response
Key Value Description Availability
data <Report List Object> Information of report list 1 and onward
success <boolean> Execution success or not 1 and onward
Copyright © Synology Inc. All rights Reserved. 475
Synology Surveillance Station Web API
<Report List Object>
Definitions:
Key Value Description Availability
report array of <report> The list of report information 1 and onward
total <integer> The total number of report 1 and onward
<Report List Object>
Definitions:
Key Value Description Availability
count0 <integer> The number of people counting array at index
0
1 and onward
count1 <integer> The number of people counting array at index
1
1 and onward
count2 <integer> The number of people counting array at index
2
1 and onward
id <integer> The index of this report 1 and onward
time <string> The time of this report in thestring format 1 and onward
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
Copyright © Synology Inc. All rights Reserved. 476
Synology Surveillance Station Web API
}
Copyright © Synology Inc. All rights Reserved. 477
Synology Surveillance Station Web API
2.3.55 SYNO.SurveillanceStation.IVA.Recording
Get the information of the recording file of detection results
Name Version Availability
SYNO.SurveillanceStation.IVA.Recording 1 Surveillance Station 8.2.6
Method Name Section Availability
List 2.3.55.1 1 and onward
Delete 2.3.55.2 1 and onward
GetAnalyticsResult 2.3.55.3 1 and onward
Lock 2.3.55.4 1 and onward
Unlock 2.3.55.5 1 and onward
2.3.55.1 List
Reset the counter of people counting task
Request
Key Value Description Availability
taskIdList <string>
Task ids, concatenated by “,”.
1 and onward
limit <integer> Max amount of recording list returned 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 Value Description Availability
data <DVA Event> Information of Deep Video Analytics recording 1 and onward
success <boolean> Execution success or not 1 and onward
<DVA Event> Definitions:
Key Value Description Availability
data <DVA Event> Information of Deep Video Analytics recording 1 and onward
analyze_type <integer> The analyze type of DVA Task 1 and onward
id <integer> The id of the recording 1 and onward
video_type <integer> The video codec of the recording.
0 - Unknown
1 - MJPEG
2 - MPEG4
3 - H264
5 - MXPEG
6 - H265
1 and onward
Copyright © Synology Inc. All rights Reserved. 478
Synology Surveillance Station Web API
7 - H264+
audio_format <integer> 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)
1 and onward
imgHeight <integer> The image height of the recording. 1 and onward
imgWidth <integer> The image width of the recording. 1 and onward
cameraId <integer> The belonged camera id of the recording. 1 and onward
camIdOnRecSe
rver
<integer> The belonged camera id of the recording on
recording server.
0 if it’s not CMS host server.
1 and onward
event_size_byt
es
<integer> The size of the recording. 1 and onward
path <string> The file path of the recording. 1 and onward
deleted <boolean> The recording is deleted or not. 1 and onward
dsId <integer> The DS id of which DS the recording belongs
0: Local Host
> 0: The id of recording server
1 and onward
folder <string> The path of the folder contains this recording 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. 479
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. 480
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 Value Description Availability
slaveDsParam <json> 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].
1 and onward
deleteMethod <integer> Method to delete recording
0 - delete recording with filter
1 - delete all recording
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 Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
Copyright © Synology Inc. All rights Reserved. 481
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 Value Description Availability
eventId <integer> The id of the recording 1 and onward
taskId <integer> The task id of the recording 1 and onward
blAlertEvt <boolean> The event type of the recording
true - alert event
false - iva event
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 Value Description Availability
data <Analytic Result> the analytic result of the recording 1 and onward
success <boolean> Execution success or not 1 and onward
<Analytic Result> Definitions:
Key Value Description Availability
ivaResult Array of <Frame Result> List of the frame result of the recording 1 and onward
setting <Task> Execution success or not 1 and onward
<Frame Result> Definitions:
Key Value Description Availability
frameId <integer> the id of the frame result 1 and onward
instances Array of <Bounding Box> list of bounding box info 1 and onward
is_trigger <boolean> the status for any bbox trigger the detection. 1 and onward
timestamp <integer> the timestamp of the frame result 1 and onward
<Bounding Box> Definitions:
Key Value Description Availability
bottom_right <Vertex> the bottom right vertex of bounding box 1 and onward
top_left <Vertex> the top left of bounding box 1 and onward
<Vertex> Definitions:
Key Value Description Availability
x <double> the coordinate value of vertex on x axis 1 and onward
Copyright © Synology Inc. All rights Reserved. 482
Synology Surveillance Station Web API
y <double> the coordinate value of vertex on y axis 1 and onward
<Task>
Definitions:
Key Value Description Availability
analyze_type <string> Paired camea name 1 and onward
area_grid <boolean> The deleted status of this task 1 and onward
area_line <boolean> The enabled status of this task 1 and onward
area_region <integer> The id of this task 1 and onward
camera_id <string> The name of this task 1 and onward
camera_name <integer> The event count of this task today 1 and onward
deleted <boolean> the status of this task to be deleted or not 1 and onward
det_fg_obj <integer> the bitmap of status of detected object for
detecting specific object.
1 - detect people
2 - detect vehicle
1 and onward
det_region <string> the vertexes of detected region of detection
task, concatenated by ","
1 and onward
det_region_cnt <integer> the number of detected region 1 and onward
enable <boolean> the status of this task to start processing 1 and onward
enable_min_d
uration
<boolean> the status of the shortest limitation of object
staying in the detected region.
1 and onward
enable_recordi
ng
<boolean> the status to record the video of detected
result
1 and onward
enable_schedu
le
<boolean> the status to enable the schedule of this task 1 and onward
event_integrati
on
<boolean> the status to integrate motion detected event
with surveillance station
1 and onward
fence_dir_flag <integer> 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
1 and onward
fence_line <string> the vertexes of virtual fence of intrusion
detection task, concatenated by ","
1 and onward
id <integer> the id of this DVA task 1 and onward
id_on_rec_serv
er
<integer> the id of this DVA task on recording server. it is
only work on cms host.
1 and onward
min_duration <integer> the seconds of the shortest limitation of
object staying in the detected region.
1 and onward
min_obj_size <double> the minimum limitation of object size of
detection.
1 and onward
min_obj_size_
option
<integer> the status to limit the object size of detection.
0 - disable limitation
1 - enable limitation
1 and onward
name <string> the name of this DVA task 1 and onward
owner_ds_id <integer> The DS id of which DS the recording belongs
0: Local Host
> 0: The id of recording server
1 and onward
people_display <integer> The bitmap of the display info. 1 and onward
Copyright © Synology Inc. All rights Reserved. 483
Synology Surveillance Station Web API
_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
people_display
_pos
<integer> the status of position of people counting
displayed result on task preview.
0 - top right
1 - bottom right
2 - top left
3 - bottom left
1 and onward
people_enable
_stay_max
<boolean> the status of to limit the stay count or not 1 and onward
people_enter <integer> the array index of people entering
it could be changed with people_exit to swap
counting result.
1 and onward
people_exit <integer> the array index of people exiting
it could be changed with people_enter to
swap counting result.
1 and onward
people_hint_p
os
<string> the vertexes of people direction of people
counting task, concatenated by ","
1 and onward
people_mode <integer> 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
1 and onward
det_region <string> the vertexes of detected region of detection
task, concatenated by ","
1 and onward
people_stay_m
ax
<integer> the limit number of people stayed.
Only work when people_enable_stay_max is
true.
1 and onward
post_rec_time <integer> the seconds to clip the record after detection 1 and onward
pre_rec_time <integer> the seconds to clip the record before
detection
1 and onward
region_type <integer> the status of region type
0 - Include region
1 - Exclude region
1 and onward
reset_cnt_freq
uency
<integer> 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> the weekday to reset count 1 and onward
reset_date <integer> the date of the month to reset count 1 and onward
Copyright © Synology Inc. All rights Reserved. 484
Synology Surveillance Station Web API
reset_time_mi
nute
<integer> the minutes of the hour in the day to reset
count
1 and onward
reset_time_ho
ur
<integer> the hours of the day to reset count 1 and onward
schedule <string> the bitmap of hours in a week to process task. 1 and onward
scheduleOn <boolean> the status to enable the schedule of this task 1 and onward
status_flags <integer> the bitmap of task status.
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
1 and onward
stream_profile <integer> the status of camera stream level
0 - level high
1 - level medium
2 - level low
1 and onward
sync_to_host <boolean> the status of this task to sync people counting
result to cms host
1 and onward
trans_flags <integer> the bitmap of transient status of this task
0 -DVA_TRANS_FLAG_NORMAL
1 -DVA_TRANS_FLAG_CAM_FPS
2 - DVA_TRANS_FLAG_FETCH_FPS
4 -DVA_TRANS_FLAG_SIMULATING
1 and onward
trigger_alert <boolean> 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. 485
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. 486
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. 487
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. 488
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. 489
Synology Surveillance Station Web API
2.3.55.4 Lock
Lock the recording file of detection results
Request
Key Value Description Availability
dsId <integer> The DS id of which DS the recording belongs
0: Local Host
> 0: The id of recording server
1 and onward
idList <string>
Task ids, concatenated by “,”.
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 Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
2.3.55.5 Unlock
Unlock the recording file of detection results
Request
Key Value Description Availability
dsId <integer> The DS id of which DS the recording belongs
0: Local Host
> 0: The id of recording server
1 and onward
idList <string>
Task ids, concatenated by “,”.
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. 490
Synology Surveillance Station Web API
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
Copyright © Synology Inc. All rights Reserved. 491
Synology Surveillance Station Web API
2.3.56 SYNO.SurveillanceStation.IVA.TaskGroup
This API provides methods to query people counting result.
Name Version Availability
SYNO.SurveillanceStation.IVA.Report 1 Surveillance Station 8.2.6
Method Name Section Availability
List 2.3.56.1 1 and onward
Create 2.3.56.2 1 and onward
Edit 2.3.56.3 1 and onward
Delete 2.3.56.4 1 and onward
Enable 2.3.56.5 1 and onward
Disable 2.3.56.6 1 and onward
GetPeopleCount 2.3.56.7 1 and onward
ResetPeopleCount 2.3.56.8 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 Value Description Availability
data <Group List Object> Information of group list 1 and onward
success <boolean> Execution success or not 1 and onward
<Group List Object> Definitions:
Key Value Description Availability
groups Array of <Group> List of task group info 1 and onward
total <integer> count of task groups 1 and onward
<Group> Definitions:
Key Value Description Availability
enable <boolean> The enabled status of this task group 1 and onward
id <integer> The id of this task group 1 and onward
name <string> The name of this task group 1 and onward
owner_ds_id <integer> The DS id of which DS the recording belongs
0: Local Host
1 and onward
Copyright © Synology Inc. All rights Reserved. 492
Synology Surveillance Station Web API
> 0: The id of recording server
people_display
_info
<integer> 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
1 and onward
people_enable
_stay_max
<boolean> the status of to limit the stay count or not 1 and onward
people_stay_m
ax
<integer> the limit number of people stayed.
Only work when people_enable_stay_max is
true.
1 and onward
reset_cnt_freq
uency
<integer> 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_date <integer> the date of the month to reset count 1 and onward
reset_time_ho
ur
<integer> the hours of the day to reset count 1 and onward
reset_time_mi
nute
<integer> the minutes of the hour in the day to reset
count
1 and onward
reset_weekday <integer> the weekday to reset count 1 and onward
task_ids <string>
Task ids of this group, concatenated by “,”.
1 and onward
uniqueId <string> the unique id in cms, the dsId and the group id
concatenated by “_“.
1 and onward
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. 493
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 Value Description Availability
enable <boolean> The enabled status of this task group. 1 and onward
task_ids <string>
Task ids of this group, concatenated by “,”.
1 and onward
owner_ds_id <integer> The DS id of which DS the recording belongs
0: Local Host
> 0: The id of recording server
1 and onward
name <string> The name of this task group 1 and onward
people_display
_info
<integer> 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
1 and onward
people_enable
_stay_max
<boolean> the status of to limit the stay count or not 1 and onward
people_stay_m
ax
<integer> the limit number of people stayed.
Only work when people_enable_stay_max is
true.
1 and onward
Copyright © Synology Inc. All rights Reserved. 494
Synology Surveillance Station Web API
reset_cnt_freq
uency
<integer> 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_date <integer> the date of the month to reset count 1 and onward
reset_weekday <integer> the weekday to reset count 1 and onward
reset_time_ho
ur
<integer> the hours of the day to reset count 1 and onward
reset_time_mi
nute
<integer> the minutes of the hour in the day to reset
count
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 Value Description Availability
data <Group Id Object> Information of group id 1 and onward
success <boolean> Execution success or not 1 and onward
<Group Id Object> Definitions:
Key Value Description Availability
id <integer> The id of this group 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. 495
Synology Surveillance Station Web API
Key Value Description Availability
enable <boolean> The enabled status of this task group. 1 and onward
id <integer> The id of this task group 1 and onward
task_ids <string>
Task ids of this group, concatenated by “,”.
1 and onward
name <string> The name of this task group 1 and onward
people_display
_info
<integer> 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
1 and onward
people_enable
_stay_max
<boolean> the status of to limit the stay count or not 1 and onward
people_stay_m
ax
<integer> the limit number of people stayed.
Only work when people_enable_stay_max is
true.
1 and onward
reset_cnt_freq
uency
<integer> 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_date <integer> the date of the month to reset count 1 and onward
reset_weekday <integer> the weekday to reset count 1 and onward
reset_time_ho
ur
<integer> the hours of the day to reset count 1 and onward
reset_time_mi
nute
<integer> 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 Value Description Availability
data <Group Id Object> Information of group id 1 and onward
success <boolean> Execution success or not 1 and onward
<Group Id Object> Definitions:
Copyright © Synology Inc. All rights Reserved. 496
Synology Surveillance Station Web API
Key Value Description Availability
id <integer> The id of this group 1 and onward
Example:
{
"data" : {
"id" : 2
},
"success" : true
}
2.3.56.4 Delete
Delete the task groups
Request
Key Value Description Availability
ids <string> ids of the task groups to be deleted,,
concatenated by “,”.
1 and onward
Example:
GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Delete&version=1
Response
Key Value Description Availability
success <boolean> Execution success or not 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. 497
Synology Surveillance Station Web API
Key Value Description Availability
ids <string> ids of the task groups to be enabled,,
concatenated by “,”.
1 and onward
Example:
GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Enable&version=1
Response
Key Value Description Availability
success <boolean> Execution success or not 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 Value Description Availability
ids <string> ids of the task groups to be enabled,,
concatenated by “,”.
1 and onward
Example:
GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=Disable&version=1
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
Copyright © Synology Inc. All rights Reserved. 498
Synology Surveillance Station Web API
2.3.56.7 GetPeopleCount
Get the counting number of the task group
Request
Key Value Description Availability
id <integer> id of the task group to get people counting
number
1 and onward
Example:
GET /webapi/entry.cgi?
id=2&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=GetPeopleCount&version=1
Response
Key Value Description Availability
data <People Count Info> Information of people counting info 1 and onward
success <boolean> Execution success or not 1 and onward
<People Count Info> Definitions:
Key Value Description Availability
InCount <integer> The counting number of people in 1 and onward
OutCount <integer> The counting number of people out 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. 499
Synology Surveillance Station Web API
Key Value Description Availability
id <integer> id of the task group to reset people counting
number
1 and onward
Example:
GET /webapi/entry.cgi?
id=2&api=SYNO.SurveillanceStation.IVA.TaskGroup&method=ResetPeopleCount&version=1
Response
Key Value Description Availability
success <boolean> Execution success or not 1 and onward
Example:
{
success: true
}
Copyright © Synology Inc. All rights Reserved. 500
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 Version Availability
SYNO.SurveillanceStation.Face 1 Surveillance Station 8.2.8
Method Name Section Availability
ListTask 2.3.57.1 1 and onward
SaveTask 2.3.57.2 1 and onward
DeleteTask 2.3.57.3 1 and onward
EnableTask 2.3.57.4 1 and onward
DisableTask 2.3.57.5 1 and onward
ListPlayableTsk 2.3.57.6 1 and onward
CreateFaceGroup 2.3.57.7 1 and onward
DeleteFaceGroup 2.3.57.8 1 and onward
EditFaceGroup 2.3.57.9 1 and onward
ListFaceGroup 2.3.57.10 1 and onward
CountFaceGroup 2.3.57.11 1 and onward
DetectImageFace 2.3.57.12 1 and onward
CreateRegisteredFace 2.3.57.13 1 and onward
DeleteRegisteredFace 2.3.57.14 1 and onward
EditRegisteredFace 2.3.57.15 1 and onward
ListRegisteredFace 2.3.57.16 1 and onward
CountRegisteredFace 2.3.57.17 1 and onward
SearchRegisteredFace 2.3.57.18 1 and onward
2.3.57.1 ListTask
Get face task list.
Request
Key Value Description Availability
ids <string> the string of comma-separated ids of tasks to
list.
1 and onward
ownerDsId <integer> Indicate owner DS of tasks to list, 0 means the
tasks belongs to LOCAL_HOST
1 and onward
blOnlyEnableD
s
<boolean> 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. 501
Synology Surveillance Station Web API
Key Value Description Availability
data <Task List Object> Information of task list 1 and onward
success <boolean> Execution success or not 1 and onward
<Task List Object> Definitions:
Key Value Description Availability
task Array of <Task> List of task info 1 and onward
total <integer> The total number of tasks 1 and onward
<Task> Definitions:
Key Value Description Availability
allowed_color <integer> display color id for face in allowed list 1 and onward
allowed_count <integer> the counter for allowed faces 1 and onward
allowed_list Array of <integer> the list of ids of allowed groups 1 and onward
allowed_name
_list
Array of <string> the list of names of allowed groups 1 and onward
blocked_color <integer> display color id for face in blocked list 1 and onward
blocked_count <integer> the counter for the blocked faces 1 and onward
blocked_list Array of <integer> the list of ids of blocked groups 1 and onward
blocked_name
_list
Array of <string> the list of names of blocked groups 1 and onward
vip_color <integer> display color id for face in vip list 1 and onward
vip_count <integer> the counter for vip faces 1 and onward
vip_list Array of <integer> the list of ids of vip groups 1 and onward
vip_name_list Array of <string> the list of names of vip groups 1 and onward
recognized_col
or
<integer> display color id for recognized faces 1 and onward
recognized_co
unt
<integer> the counter for recognized faces 1 and onward
unrecognized_
color
<integer> display color id for unrecognized face 1 and onward
unrecognized_
count
<integer> the counter for unrecognized faces 1 and onward
camera_id <integer> Paired camera id. 1 and onward
deleted <boolean> The deleted status of this task. 1 and onward
det_region <string> the comma-separated floating number to
show the coordinate of detected region on
frame.
1 and onward
det_region_cnt <integer> the counter for the detected region. 1 and onward
region_type <integer> the type of display region. (detectable or
undetectable)
display_info <integer> The status of display information setting of
liveview.
1 and onward
frame_display_
info
<integer> The status of display information setting of
each face in frame
enable <boolean> The enabled status of this task. 1 and onward
enable_min_o
bj_size
<boolean> The status of setting to enable limitation for
minimum object size.
1 and onward
min_obj_size <float> The limitation for the minimum face size. (%) 1 and onward
Copyright © Synology Inc. All rights Reserved. 502
Synology Surveillance Station Web API
post_rec_time <integer> The append second of the record after the
time when captured face are displayed.
1 and onward
pre_rec_time <integer> The append second of the record before the
time when captured face are displayed.
1 and onward
schedule <string> the string of bits to decide whether to detect
or not for the days in a week.
1 and onward
scheduleOn <boolean> the status of whether the task is following the
schedule or not.
1 and onward
similarity <float> the threshold of recognition similarity. 1 and onward
stream_profile <integer> the type of stream quality 1 and onward
transientSts <integer> the quality type of stream frame rate 1 and onward
trans_flags <integer> the bitmap of transient status 1 and onward
trigger_alert <integer> the bitmap of alert status 1 and onward
id <integer> The id of this task. 1 and onward
owner_ds_id <integer> The ds id of the owner of the task. For
instance, 0 means this task belongs to
LOCAL_HOST
1 and onward
task_id <integer> The id of this task. 1 and onward
id_on_rec_serv
er
<integer> The task id of the counterpart of this task on
recording server
1 and onward
name <string> The name of this task. 1 and onward
ignore_bad_qu
ality
<boolean> True if this task won’t send alerts on detected
faces with low quality(e.g., blurred).
1 and onward
todayEvtCnt <integer> 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. 503
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. 504
Synology Surveillance Station Web API
},
"httpd_restart" : false,
"success" : true
}
2.3.57.2 SaveTask
Create or edit task.
Request
Key Value Description Availability
id <integer> The id of the task to edit. 1 and onward
id_on_rec_serv
er
<integer> The task id of the counterpart of this task on
recording server
1 and onward
camera_id <integer> The camera id to paired. 1 and onward
camera_id_on
_rec
<integer> The camera id on recording server to paired. 1 and onward
owner_ds_id <integer> Indicate owner DS of this task, 0 means the
tasks belongs to LOCAL_HOST
1 and onward
enable <boolean> The status of whether the task is enabled or
not.
1 and onward
blEditMode <boolean> The status of whether this request is edit-
mode or not
1 and onward
stream_profile <integer> the type of stream quality 1 and onward
name <string> The name of this task. 1 and onward
similarity <float> the threshold of recognition similarity. 1 and onward
allowed_color <integer> display color id for face in allowed list 1 and onward
allowed_list Array of <integer> the list of ids of allowed groups 1 and onward
blocked_color <integer> display color id for face in blocked list 1 and onward
blocked_list Array of <integer> the list of ids of blocked groups 1 and onward
vip_color <integer> display color id for face in vip list 1 and onward
vip_list Array of <integer> the list of ids of vip groups 1 and onward
recognized_col
or
<integer> display color id for recognized faces 1 and onward
unrecognized_
color
<integer> display color id for unrecognized face 1 and onward
deleted <boolean> The deleted status of this task. 1 and onward
det_region <string> the comma-separated floating number to
show the coordinate of detected region on
frame.
1 and onward
det_region_cnt <integer> the counter for the detected region. 1 and onward
region_type <integer> the type of display region. (detectable or
undetectable)
display_info <integer> The status of display information setting of
liveview.
1 and onward
frame_display_
info
<integer> The status of display information setting of
each face in frame
Copyright © Synology Inc. All rights Reserved. 505
Synology Surveillance Station Web API
enable_min_o
bj_size
<boolean> The status of setting to enable limitation for
minimum object size.
1 and onward
min_obj_size <float> The limitation for the minimum face size. 1 and onward
post_rec_time <integer> The append second of the record after the
time when captured face are displayed.
1 and onward
pre_rec_time <integer> The append second of the record before the
time when captured face are displayed.
1 and onward
schedule <string> the string of bits to decide whether to detect
or not for the days in a week.
1 and onward
scheduleOn <boolean> the status of whether the task is following the
schedule or not.
1 and onward
similarity <float> the threshold of recognition similarity. 1 and onward
ignore_bad_qu
ality
<boolean> the status of whether to ignore bad quality
result or not
1 and onward
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. 506
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 Value Description Availability
data <Task Object> Information of task info. 1 and onward
success <boolean> Execution success or not 1 and onward
<Task Object> Definitions:
Key Value Description Availability
allowed_color <integer> display color id for face in allowed list 1 and onward
allowed_count <integer> the counter for allowed faces 1 and onward
allowed_list Array of <integer> the list of ids of allowed groups 1 and onward
allowed_name
_list
Array of <string> the list of names of allowed groups 1 and onward
blocked_color <integer> display color id for face in blocked list 1 and onward
blocked_count <integer> the counter for the blocked faces 1 and onward
blocked_list Array of <integer> the list of ids of blocked groups 1 and onward
blocked_name
_list
Array of <string> the list of names of blocked groups 1 and onward
vip_color <integer> display color id for face in vip list 1 and onward
vip_count <integer> the counter for vip faces 1 and onward
vip_list Array of <integer> the list of ids of vip groups 1 and onward
vip_name_list Array of <string> the list of names of vip groups 1 and onward
recognized_col
or
<integer> display color id for recognized faces 1 and onward
recognized_co
unt
<integer> the counter for recognized faces 1 and onward
unrecognized_
color
<integer> display color id for unrecognized face 1 and onward
unrecognized_
count
<integer> the counter for unrecognized faces 1 and onward
camera_id <integer> Paired camera id. 1 and onward
deleted <boolean> The deleted status of this task. 1 and onward
det_region <string> the comma-separated floating number to
show the coordinate of detected region on
frame.
1 and onward
det_region_cnt <integer> the counter for the detected region. 1 and onward
Copyright © Synology Inc. All rights Reserved. 507
Synology Surveillance Station Web API
region_type <integer> the type of display region. (detectable or
undetectable)
display_info <integer> The status of display information setting of
liveview.
1 and onward
frame_display_
info
<integer> The status of display information setting of
each face in frame
enable <boolean> The enabled status of this task. 1 and onward
enable_min_o
bj_size
<boolean> The status of setting to enable limitation for
minimum object size.
1 and onward
min_obj_size <float> The limitation for the minimum face size. (%) 1 and onward
post_rec_time <integer> The append second of the record after the
time when captured face are displayed.
1 and onward
pre_rec_time <integer> The append second of the record before the
time when captured face are displayed.
1 and onward
schedule <string> the string of bits to decide whether to detect
or not for the days in a week.
1 and onward
scheduleOn <boolean> the status of whether the task is following the
schedule or not.
1 and onward
similarity <float> the threshold of recognition similarity. 1 and onward
stream_profile <integer> the type of stream quality 1 and onward
transientSts <integer> the quality type of stream frame rate 1 and onward
trans_flags <integer> the bitmap of transient status 1 and onward
trigger_alert <integer> the bitmap of alert status 1 and onward
id <integer> The id of this task. 1 and onward
owner_ds_id <integer> The ds id of the owner of the task. For
instance, 0 means this task belongs to
LOCAL_HOST
1 and onward
task_id <integer> The id of this task. 1 and onward
id_on_rec_serv
er
<integer> The task id of the counterpart of this task on
recording server
1 and onward
name <string> The name of this task. 1 and onward
ignore_bad_qu
ality
<boolean> True if this task won’t send alerts on detected
faces with low quality(e.g., blurred).
1 and onward
todayEvtCnt <integer> 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. 508
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 Value Description Availability
success <boolean> Execution success or not. 1 and onward
Copyright © Synology Inc. All rights Reserved. 509
Synology Surveillance Station Web API
Example:
{"success":true}
2.3.57.4 EnableTask
Enable task to start detection and recording.
Request
Key Value Description Availability
ids <string> the comma-separated id of tasks to be enabled. 1 and onward
Example:
GET /webapi/entry.cgi?ids="2"&api=SYNO.SurveillanceStation.Face&method=EnableTask&version=1
Response
Key Value Description Availability
success <boolean> Execution success or not. 1 and onward
Example:
{"success":true}
2.3.57.5 DisableTask
Disable task to stop detection and stop recording.
Request
Key Value Description Availability
ids <string> the comma-separated id of tasks to be disabled. 1 and onward
Example:
GET /webapi/entry.cgi?
ids="2"&api=SYNO.SurveillanceStation.Face&method=DisableTask&version=1
Response
Key Value Description Availability
success <boolean> Execution success or not. 1 and onward
Copyright © Synology Inc. All rights Reserved. 510
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 Value Description Availability
ids <string> the comma-separated id of tasks to be listed. 1 and onward
Example:
GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Face&method=ListPlayableTask
&version=1
Response
Key Value Description Availability
data <Task List Object> Information of task list. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Task List Object> Definitions:
Key Value Description Availability
task Array of <Task> List of task info. (Only id and name info.) 1 and onward
total <integer> The total number of listed tasks. 1 and onward
Example:
{
"data":
{
"task":[
{"id":2,"name":"1"},
{"id":5,"name":"0"}
],
"total":2
}
Copyright © Synology Inc. All rights Reserved. 511
Synology Surveillance Station Web API
,"success":true
}
2.3.57.7 CreateFaceGroup
Create face group.
Request
Key Value Description Availability
name <string> Name of the face group. 1 and onward
description <string> Description of the face group. 1 and onward
update_registe
red_face
<Face List Object> Information of face lists in the face group. 1 and onward
<Face List Object> Definitions:
Key Value Description Availability
ids Array of <integer> Ids of faces. 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 Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
face_group <Face Group
Object>
Information of face groups. 1 and onward
<Face Group Object> Definitions:
Key Value Description Availability
checked <boolean> The group is checked on the UI or not. 1 and onward
description <string> Description of the face group. 1 and onward
id <integer> Id of the face group. 1 and onward
name <string> Name of the face group. 1 and onward
registered_face <integer> Number of registered face in the face group. 1 and onward
Copyright © Synology Inc. All rights Reserved. 512
Synology Surveillance Station Web API
_count
registered_face
_ids
Array of <integer> Face ids of registered face in the face group. 1 and onward
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
}
2.3.57.8 DeleteFaceGroup
Delete face group.
Request
Key Value Description Availability
ids Array of <integer> Face group ids to delete. 1 and onward
Example:
GET /webapi/entry.cgi?
ids=[101]&api=SYNO.SurveillanceStation.Face&method=DeleteFaceGroup&version=1
Response
Key Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
Copyright © Synology Inc. All rights Reserved. 513
Synology Surveillance Station Web API
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
ids Array of <integer> Face group ids to delete. 1 and onward
face_group <Face Group
Object>
Information of face groups. 1 and onward
<Face Group Object> Definitions:
Key Value Description Availability
checked <boolean> The group is checked on the UI or not. 1 and onward
description <string> Description of the face group. 1 and onward
id <integer> Id of the face group. 1 and onward
name <string> Name of the face group. 1 and onward
registered_face
_count
<integer> Number of registered face in the face group. 1 and onward
registered_face
_ids
Array of <integer> Face ids of registered face in the face group. 1 and onward
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
Copyright © Synology Inc. All rights Reserved. 514
Synology Surveillance Station Web API
],
"success": true
},
"success": true
}
2.3.57.9 EditFaceGroup
Edit the face group.
Request
Key Value Description Availability
name <string> Name of the face group. 1 and onward
description <string> Description of the face group. 1 and onward
update_registe
red_face
<Face List Object> Information of face lists in the face group. 1 and onward
id <integer> Id of the face group to edit. 1 and onward
<Face List Object> Definitions:
Key Value Description Availability
ids Array of <integer> Ids of faces. 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 Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
face_group <Face Group
Object>
Information of face groups. 1 and onward
<Face Group Object> Definitions:
Key Value Description Availability
Copyright © Synology Inc. All rights Reserved. 515
Synology Surveillance Station Web API
checked <boolean> The group is checked on the UI or not. 1 and onward
description <string> Description of the face group. 1 and onward
id <integer> Id of the face group. 1 and onward
name <string> Name of the face group. 1 and onward
registered_face
_count
<integer> Number of registered face in the face group. 1 and onward
registered_face
_ids
Array of <integer> Face ids of registered face in the face group. 1 and onward
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
}
2.3.57.10 ListFaceGroup
Get face group list.
Request
Key Value Description Availability
id_only <boolean> Results only contain id or not. 1 and onward
filter <Filter Object> Information of filter . 1 and onward
<Filter Object> Definitions:
Key Value Description Availability
offset <integer> Start offset of the query result. 1 and onward
Copyright © Synology Inc. All rights Reserved. 516
Synology Surveillance Station Web API
limit <integer> Limit of the number of the result. 1 and onward
ids Array of <integer> List the face groups matching the ids. 1 and onward
name <string> List the face groups having substring in the name. 1 and onward
description <string> List the face groups having substring in the description. 1 and onward
checked_ids Array of <integer> Checked face group ids on UI. 1 and onward
keyword <string> Keyword in the name or description. Using " " separate
multiple string pattern.
1 and onward
order_by <Order Object> Information of the order. 1 and onward
<Order Object> Definitions:
Key Value Description Availability
column <string> One of ID, NAME, REGISTERED_FACE_COUNT 1 and onward
order <string> One of ASC, DESC 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 Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
face_groups Array of <Face
Group Object>
Information of face groups. 1 and onward
ids Array of <integer> Groups ids. 1 and onward
total <integer> Number of face groups. 1 and onward
<Face Group Object> Definitions:
Key Value Description Availability
checked <boolean> The group is checked on the UI or not. 1 and onward
description <string> Description of the face group. 1 and onward
id <integer> Id of the face group. 1 and onward
name <string> Name of the face group. 1 and onward
registered_face
_count
<integer> Number of registered face in the face group. 1 and onward
registered_face
_ids
Array of <integer> Face ids of registered face in the face group. 1 and onward
Copyright © Synology Inc. All rights Reserved. 517
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 Value Description Availability
filter <Filter Object> Information of filter . 1 and onward
<Filter Object> Definitions:
Key Value Description Availability
offset <integer> Start offset of the query result. 1 and onward
limit <integer> Limit of the number of the result. 1 and onward
ids Array of <integer> List the face groups matching the ids. 1 and onward
name <string> List the face groups having substring in the name. 1 and onward
description <string> List the face groups having substring in the description. 1 and onward
Copyright © Synology Inc. All rights Reserved. 518
Synology Surveillance Station Web API
checked_ids Array of <integer> Checked face group ids on UI. 1 and onward
keyword <string> Keyword in the name or description. Using " " separate
multiple string pattern.
1 and onward
order_by <Order Object> Information of the order. 1 and onward
<Order Object> Definitions:
Key Value Description Availability
column <string> One of ID, NAME, REGISTERED_FACE_COUNT 1 and onward
order <string> One of ASC, DESC 1 and onward
Example:
GET /webapi/entry.cgi?api="SYNO.SurveillanceStation.Face"&method=CountFaceGroup
&version="1"
Response
Key Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
count <integer> Number of face groups. 1 and onward
Example:
{
"data": {
"count": 3,
"error_code": 0,
"success": true
},
"success": true
}
2.3.57.12 DetectImageFace
Detect faces in a image.
Request
Copyright © Synology Inc. All rights Reserved. 519
Synology Surveillance Station Web API
Key Value Description Availability
image_data <string> Base64 encode of registered face image. 1 and onward
image_size <integer> Size of image_data (before encoded). 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 Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
faces Array of <Face Object> Detected faces 1 and onward
<Face Object> Definitions:
Key Value Description Availability
detection <Detection Object> Detection of face. 1 and onward
feature Array of <double> Feature of target face. 1 and onward
bad_quality <boolean> Indicate if the face is bad quality. 1 and onward
<Detection Object> Definitions:
Key Value Description Availability
conf <float> Confidence of the detection. 1 and onward
bbox <BoundingBox> Bounding box of detected face 1 and onward
landmark <Landmark> Landmark of face. 1 and onward
<BoundingBox> Definitions:
Key Value Description Availability
bottom_right <Point> Bottom right coordinate of detection 1 and onward
top_left <Point> Top left coordinate of detection 1 and onward
<Landmark> Definitions:
Key Value Description Availability
left_eye <Point> Coordination of left eye 1 and onward
right_eye <Point> Coordination of right eye 1 and onward
Copyright © Synology Inc. All rights Reserved. 520
Synology Surveillance Station Web API
nose <Point> Coordination of nose 1 and onward
mouth_left <Point> Coordination of mouth left point 1 and onward
mouth_right <Point> Coordination of mouth right point 1 and onward
<Point> Definitions:
Key Value Description Availability
x <float> x coordinate of point 1 and onward
y <float> y coordinate of point 1 and onward
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
},
Copyright © Synology Inc. All rights Reserved. 521
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. 522
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. 523
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. 524
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. 525
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 Description Availability
account <string> Account. 1 and onward
name <string> Name. 1 and onward
description <string> Description. 1 and onward
image_data <string> Base64 encode of registered face image. 1 and onward
image_size <integer> Size of image_data (before encoded). 1 and onward
face <Face Object> Selected face from DetectImageFace response. 1 and onward
update_face_gr
oup
<Ids Object> Face group of the target registered face. 1 and onward
captured_face_
id
<integer> Create with captured face. 1 and onward
update_unreco
gnized_capture
d_face
<boolean> Update unknown captured face with created registered
face
1 and onward
append_image
_data
<boolean> Append Base64 encode image with created registered
face.
1 and onward
<Face Object> Definitions:
Key Value Description Availability
detection <Detection Object> Detection of face. 1 and onward
feature Array of <double> Feature of target face. 1 and onward
<Detection Object> Definitions:
Key Value Description Availability
conf <float> Confidence of the detection. 1 and onward
bbox <BoundingBox> Bounding box of detected face 1 and onward
landmark <Landmark> Landmark of face. 1 and onward
Copyright © Synology Inc. All rights Reserved. 526
Synology Surveillance Station Web API
<BoundingBox> Definitions:
Key Value Description Availability
bottom_right <Point> Bottom right coordinate of detection 1 and onward
top_left <Point> Top left coordinate of detection 1 and onward
<Landmark> Definitions:
Key Value Description Availability
left_eye <Point> Coordination of left eye 1 and onward
right_eye <Point> Coordination of right eye 1 and onward
nose <Point> Coordination of nose 1 and onward
mouth_left <Point> Coordination of mouth left point 1 and onward
mouth_right <Point> Coordination of mouth right point 1 and onward
<Point> Definitions:
Key Value Description Availability
x <float> x coordinate of point 1 and onward
y <float> y coordinate of point 1 and onward
<Ids Object> Definitions:
Key Value Description Availability
ids Array of <integer> Ids list 1 and onward
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
Copyright © Synology Inc. All rights Reserved. 527
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. 528
Synology Surveillance Station Web API
}
update_face_group: {"ids":[]}
api: SYNO.SurveillanceStation.Face
method: CreateRegisteredFace
version: 1
Response
Key Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
registered_face <Registered Face Object> Created registered face. 1 and onward
<Registered Face Object> Definitions:
Key Value Description Availability
id <integer> Id of the registered face. 1 and onward
account <string> Account name of registered face. 1 and onward
name <string> Name of the registered face. 1 and onward
description <string> Description the registered face. 1 and onward
image_data <string> Base64 encoded image. 1 and onward
face_group_ids Array of <integer> Ids of registered face’s groups. 1 and onward
face_group_na
mes
Array of <integer> Names of registered face’s groups. 1 and onward
checked <boolean> 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. 529
Synology Surveillance Station Web API
"id":1049,
"name":"name"
},
"success":true
},
"success":true
}
2.3.57.14 DeleteRegisteredFace
Delete registered face.
Request
Key Value Description Availability
ids Array of <integer> Registered face ids to delete. 1 and onward
Example:
GET /webapi/entry.cgi?
ids=[1049]&api=SYNO.SurveillanceStation.Face&method=DeleteRegisteredFace&version=1
Response
Key Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
ids Array of <integer> Registered face ids to delete. 1 and onward
registered_face
s
Array of
<Registered Face
Object>
Deleted registered faces. 1 and onward
<Registered Face Object> Definitions:
Key Value Description Availability
id <integer> Id of the registered face. 1 and onward
account <string> Account name of registered face. 1 and onward
name <string> Name of the registered face. 1 and onward
description <string> Description the registered face. 1 and onward
Copyright © Synology Inc. All rights Reserved. 530
Synology Surveillance Station Web API
image_data <string> Base64 encoded image. 1 and onward
face_group_ids Array of <integer> Ids of registered face’s groups. 1 and onward
face_group_na
mes
Array of <integer> Names of registered face’s groups. 1 and onward
checked <boolean> The registered face is checked on the UI or not. 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 Value Description Availability
id <integer> Target registered face id 1 and onward
account <string> Account. 1 and onward
name <string> Name. 1 and onward
description <string> Description. 1 and onward
image_data <string> Base64 encode of registered face image. 1 and onward
image_size <integer> Size of image_data (before encoded). 1 and onward
face <Face Object> Selected face from DetectImageFace response. 1 and onward
Copyright © Synology Inc. All rights Reserved. 531
Synology Surveillance Station Web API
update_face_gr
oup
<Ids Object> Face group of the target registered face. 1 and onward
captured_face_
id
<integer> Create with captured face. 1 and onward
update_unreco
gnized_capture
d_face
<boolean> Update unknown captured face with created registered
face
1 and onward
append_image
_data
<boolean> Append Base64 encode image with created registered
face.
1 and onward
<Face Object> Definitions:
Key Value Description Availability
detection <Detection Object> Detection of face. 1 and onward
feature Array of <double> Feature of target face. 1 and onward
<Detection Object> Definitions:
Key Value Description Availability
conf <float> Confidence of the detection. 1 and onward
bbox <BoundingBox> Bounding box of detected face 1 and onward
landmark <Landmark> Landmark of face. 1 and onward
<BoundingBox> Definitions:
Key Value Description Availability
bottom_right <Point> Bottom right coordinate of detection 1 and onward
top_left <Point> Top left coordinate of detection 1 and onward
<Landmark> Definitions:
Key Value Description Availability
left_eye <Point> Coordination of left eye 1 and onward
right_eye <Point> Coordination of right eye 1 and onward
nose <Point> Coordination of nose 1 and onward
mouth_left <Point> Coordination of mouth left point 1 and onward
mouth_right <Point> Coordination of mouth right point 1 and onward
<Point> Definitions:
Key Value Description Availability
x <float> x coordinate of point 1 and onward
y <float> y coordinate of point 1 and onward
<Ids Object> Definitions:
Key Value Description Availability
ids Array of <integer> Ids list 1 and onward
Example:
Copyright © Synology Inc. All rights Reserved. 532
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 Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
registered_face <Registered Face Object> Edited registered face. 1 and onward
<Registered Face Object> Definitions:
Key Value Description Availability
id <integer> Id of the registered face. 1 and onward
account <string> Account name of registered face. 1 and onward
name <string> Name of the registered face. 1 and onward
description <string> Description the registered face. 1 and onward
image_data <string> Base64 encoded image. 1 and onward
face_group_ids Array of <integer> Ids of registered face’s groups. 1 and onward
face_group_na
mes
Array of <integer> Names of registered face’s groups. 1 and onward
checked <boolean> The registered face is checked on the UI or not. 1 and onward
Example:
{
"data":{
"error_code":0,
Copyright © Synology Inc. All rights Reserved. 533
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 Description Availability
id_only <boolean> Results only contain id or not. 1 and onward
filter <Registered Face
Filter Object>
Information of filter . 1 and onward
append_image
_data
<boolean> Append Base64 encode image with edited registered
face.
1 and onward
<Registered Face Filter Object> Definitions:
Key Value Description Availability
offset <integer> Start offset of the query result. 1 and onward
limit <integer> Limit of the number of the result. 1 and onward
ids Array of <integer> List faces matching the ids. 1 and onward
account <string> List faces having substring in the account. 1 and onward
name <string> List faces having substring in the name. 1 and onward
description <string> List faces having substring in the description. 1 and onward
face_group_ids Array of <integer> List faces belong to those face groups. 1 and onward
checked_ids Array of <integer> Checked face ids on UI. 1 and onward
keyword <string> Keyword in the name or description. Using " " separate
multiple string pattern.
1 and onward
order_by <Order Object> Information of the order. 1 and onward
<Order Object> Definitions:
Copyright © Synology Inc. All rights Reserved. 534
Synology Surveillance Station Web API
Key Value Description Availability
column <string> One of ID, NAME, REGISTERED_FACE_COUNT 1 and onward
order <string> One of ASC, DESC 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 Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
registered_face
s
Array of
<Registered Face
Object>
Information of registered faces. 1 and onward
ids Array of <integer> Id of registered faces 1 and onward
total <integer> Number of registered faces 1 and onward
<Registered Face Object> Definitions:
Key Value Description Availability
id <integer> Id of the registered face. 1 and onward
account <string> Account name of registered face. 1 and onward
name <string> Name of the registered face. 1 and onward
description <string> Description the registered face. 1 and onward
image_data <string> Base64 encoded image. 1 and onward
face_group_ids Array of <integer> Ids of registered face’s groups. 1 and onward
face_group_na
mes
Array of <integer> Names of registered face’s groups. 1 and onward
checked <boolean> 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. 535
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 Value Description Availability
filter <Registered Face
Filter Object>
Information of filter . 1 and onward
<Registered Face Filter Object> Definitions:
Key Value Description Availability
offset <integer> Start offset of the query result. 1 and onward
limit <integer> Limit of the number of the result. 1 and onward
ids Array of <integer> List faces matching the ids. 1 and onward
account <string> List faces having substring in the account. 1 and onward
name <string> List faces having substring in the name. 1 and onward
description <string> List faces having substring in the description. 1 and onward
face_group_ids Array of <integer> List faces belong to those face groups. 1 and onward
checked_ids Array of <integer> Checked face ids on UI. 1 and onward
keyword <string> Keyword in the name or description. Using " " separate
multiple string pattern.
1 and onward
order_by <Order Object> Information of the order. 1 and onward
<Order Object> Definitions:
Key Value Description Availability
Copyright © Synology Inc. All rights Reserved. 536
Synology Surveillance Station Web API
column <string> One of ID, NAME, REGISTERED_FACE_COUNT 1 and onward
order <string> One of ASC, DESC 1 and onward
Example:
GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Face&method=CountRegisteredFace
&version=1
Response
Key Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<
Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
count <integer> Number of registered faces 1 and onward
Example:
{
"data":{
"error_code":0,
"success":true,
"count":1
},
"success":true
}
2.3.57.18 SearchRegisteredFace
Search registered face.
Request
Key Value Description Availability
keywords <string> Information of keywords. 1 and onward
append_image
_data
<boolean> Append Base64 encode image with edited registered
face.
1 and onward
Copyright © Synology Inc. All rights Reserved. 537
Synology Surveillance Station Web API
Example:
GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Face&method=SearchRegisteredFace
&version=1&keywords="123"
Response
Key Value Description Availability
data <Result Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Result Object> Definitions:
Key Value Description Availability
error_code <integer> Error code of the execution. 1 and onward
success <boolean> Execution success or not. 1 and onward
registered_face
s
Array of
<Registered Face
Object>
Information of registered faces. 1 and onward
<Registered Face Object> Definitions:
Key Value Description Availability
id <integer> Id of the registered face. 1 and onward
account <string> Account name of registered face. 1 and onward
name <string> Name of the registered face. 1 and onward
description <string> Description the registered face. 1 and onward
image_data <string> Base64 encoded image. 1 and onward
face_group_ids Array of <integer> Ids of registered face’s groups. 1 and onward
face_group_na
mes
Array of <integer> Names of registered face’s groups. 1 and onward
checked <boolean> 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. 538
Synology Surveillance Station Web API
2.3.57.19 API Error Code
Code Description
400 Operation Failed.
401 Illegal parameters.
553 No face detected.
554 Face detected is too small.
555 Multiple faces detected.
556 The account try to set has exists.
557 No image data appended.
558 Add face group failed.
560 The camera try to apply to face task is occupied by another face task.
561 The number of face profile exceeds the maximum limit.
562 The number of face group exceeds the maximum limit.
563 The face profile is created or edited failed due to duplicated account.
567 The face database is under syncrhonization.
Copyright © Synology Inc. All rights Reserved. 539
Synology Surveillance Station Web API
2.3.58 SYNO.SurveillanceStation.Face.Result
This API provides methods to get result information of face task.
Name Version Availability
SYNO.SurveillanceStation.Face.Result 1 Surveillance Station 8.2.8
Method Name Section Availability
List 2.3.58.1 1 and onward
Delete 2.3.58.2 1 and onward
Lock 2.3.58.3 1 and onward
Unlock 2.3.58.4 1 and onward
GetEventInfo 2.3.58.5 1 and onward
GetAnalyticsResult 2.3.58.6 1 and onward
Correct 2.3.58.7 1 and onward
MarkAsStranger 2.3.58.8 1 and onward
2.3.58.1 List
Get face result list.
Request
Key Value Description Availability
filter <Filter Object> Information of filter 1 and onward
blIncludeSnaps
hot
<boolean> Indicate if snapshot should be appended 1 and onward
blIncludeRegist
eredFace
<boolean> Indicate if face profile information should be appended 1 and onward
limit <integer> Max number of result list 1 and onward
slaveDsParam <SlaveDsParam
Object>
Parameter for corresponding recording servers 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
_id
<integer> Id of face profile 1 and onward
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
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
1 and onward
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
Copyright © Synology Inc. All rights Reserved. 540
Synology Surveillance Station Web API
feature Array of <double> Feature of target face 1 and onward
recompare_reg
istered_face_id
_
<integer> Id of target compared face profile 1 and onward
recompare_cap
tured_face_id
<integer> Id of target compared face result 1 and onward
locked <boolean> Indicate if result is locked 1 and onward
ignore_bad_qu
ality
<boolean> Indicate if ignore bad quality results 1 and onward
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 Value Description Availability
start <integer> Start index of face results 1 and onward
max_id <integer> Max id of face results 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 Value Description Availability
data <Data Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Data Object> Definitions:
Key Value Description Availability
captured_face Array of <Result
Object>
Information of face result list 1 and onward
max id <integer> Max id of face result 1 and onward
total <integer> Total count of face result 1 and onward
slaveDsParam <SlaveDsParam
Object>
Parameter for corresponding recording servers 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
Copyright © Synology Inc. All rights Reserved. 541
Synology Surveillance Station Web API
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
_id
<integer> Id of face profile if this result is recognized as a certain
profile
1 and onward
similarity <double> Similarity if this result is comared with a certain profile or
result
1 and onward
task_name <string> Task name which this result is generated by 1 and onward
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
image_data <string> Base64 encode of result snapshot 1 and onward
dsId <integer> Id of belonged DS 1 and onward
uniqueId <string> Unique id for each result 1 and onward
<SlaveDsParam Object> Definitions:
Key Value Description Availability
start <integer> Start index of face result 1 and onward
max_id <integer> Max id of face result 1 and onward
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",
Copyright © Synology Inc. All rights Reserved. 542
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 Value Description Availability
filter <Filter Object> Filter result parameter 1 and onward
slaveDsParam <SlaveDsParam
Object>
Parameter for corresponding recording servers 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
_id
<integer> Id of face profile 1 and onward
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
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
1 and onward
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
istered_face_id
_
<integer> Id of target compared face profile 1 and onward
Copyright © Synology Inc. All rights Reserved. 543
Synology Surveillance Station Web API
recompare_cap
tured_face_id
<integer> Id of target compared face result 1 and onward
locked <boolean> Indicate if result is locked 1 and onward
ignore_bad_qu
ality
<boolean> Indicate if ignore bad quality results 1 and onward
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 Value Description Availability
ids
Array of <integer> List of result id 1 and onward
max_id <integer> Max id of face results 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 Value Description Availability
data <Data Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Data Object> Definitions:
Key Value Description Availability
captured_face_
id
Array of <integer> Face result ids to delete. 1 and onward
delCnt <integer> Deleted count of result 1 and onward
delSizeMb <integer> Deleted megabyte of result 1 and onward
Example:
{
"data": {
"captured_face_id": [],
"delCnt": 0,
"delSizeMb": 0
},
"success": true
}
Copyright © Synology Inc. All rights Reserved. 544
Synology Surveillance Station Web API
2.3.58.3 Lock
Lock face result.
Request
Key Value Description Availability
filter <Filter Object> Filter result parameter 1 and onward
slaveDsParam <SlaveDsParam
Object>
Parameter for corresponding recording servers 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
_id
<integer> Id of face profile 1 and onward
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
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
1 and onward
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
istered_face_id
_
<integer> Id of target compared face profile 1 and onward
recompare_cap
tured_face_id
<integer> Id of target compared face result 1 and onward
locked <boolean> Indicate if result is locked 1 and onward
ignore_bad_qu
ality
<boolean> Indicate if ignore bad quality results 1 and onward
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 Value Description Availability
ids
Array of <integer> List of result id 1 and onward
max_id <integer> Max id of face results 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. 545
Synology Surveillance Station Web API
false,""max_id":89109}&slaveDsParam={"0":{"max_id":89109, "ids":[89109]}}
Response
Key Value Description Availability
success <boolean> Execution success or not. 1 and onward
Example:
{
"success":true
}
2.3.58.4 Unlock
Unlock face result.
Request
Key Value Description Availability
filter <Filter Object> Filter result parameter 1 and onward
slaveDsParam <SlaveDsParam
Object>
Parameter for corresponding recording servers 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
_id
<integer> Id of face profile 1 and onward
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
UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP
1 and onward
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
istered_face_id
_
<integer> Id of target compared face profile 1 and onward
recompare_cap
tured_face_id
<integer> Id of target compared face result 1 and onward
Copyright © Synology Inc. All rights Reserved. 546
Synology Surveillance Station Web API
locked <boolean> Indicate if result is locked 1 and onward
ignore_bad_qu
ality
<boolean> Indicate if ignore bad quality results 1 and onward
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 Value Description Availability
ids
Array of <integer> List of result id 1 and onward
max_id <integer> Max id of face results 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 Value Description Availability
success <boolean> Execution success or not. 1 and onward
Example:
{
"success":true
}
2.3.58.5 GetEventInfo
Get information of recording file corresponding to certain face result.
Request
Key Value Description Availability
capturedFaceId <integer> Id of face result 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. 547
Synology Surveillance Station Web API
Key Value Description Availability
data <Data Object> Information of return data. 1 and onward
success <boolean> Execution success or not 1 and onward
<Data Object> Definitions:
Key Value Description Availability
id <integer> Id of face recording 1 and onward
task_id <integer> id of corresponding task 1 and onward
video_type <integer> 0: unknown, 1: mjpeg, 2: mpeg4, 3: h264, 6: h265,
7:h264_plus, 8: h265_plus
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. 548
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. 549
Synology Surveillance Station Web API
},
"success": true
}
2.3.58.6 GetAnalyticsResult
Get recognition information of certain face recording.
Request
Key Value Description Availability
taskId <integer> Id of face task 1 and onward
eventId <integer> Id of face recording 1 and onward
startTime <long long integer> Start utc timestamp 1 and onward
endTime <long long integer> End utc timestamp 1 and onward
blIncludeRegist
eredFace
<boolean> Indicate if face profile information should be appended 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 Value Description Availability
data <Data Object> Information of return data. 1 and onward
success <boolean> Execution success or not 1 and onward
<Data Object> Definitions:
Key Value Description Availability
faceResult Array of <Result> Face recognition information 1 and onward
<Result> Definitions:
Key Value Description Availability
frameId <integer> ms timestamp of this frame from recording start time 1 and onward
timestamp <long long integer> utc ms timestamp of this frame 1 and onward
instance Array of
<Recognition>
Recognition list of this frame 1 and onward
<Recognition> Definitions:
Key Value Description Availability
bbox <BoundingBox> Bounding box of detected face 1 and onward
Copyright © Synology Inc. All rights Reserved. 550
Synology Surveillance Station Web API
captured_face
_id
<integer> Id of corresponding face result 1 and onward
captured_face <CapturedFace> Corresponding face result information 1 and onward
registered_fac
e
<RegisteredFace> Corresponding face profile information 1 and onward
<BoundingBox> Definitions:
Key Value Description Availability
bottom_right <Point> Bottom right coordinate of detection 1 and onward
top_left <Point> Top left coordinate of detection 1 and onward
<Point> Definitions:
Key Value Description Availability
x <float> x coordinate of point 1 and onward
y <float> y coordinate of point 1 and onward
<CapturedFace> Definitions:
Key Value Description Availability
event <string> UNRECOGNIZED, RECOGNIZED, ALLOWED, BLOCKED, VIP 1 and onward
id <integer> Id of face result 1 and onward
<RegisteredFace> Definitions:
Key Value Description Availability
account null or <string> Account of recognized face profile 1 and onward
id <integer> Id of recognized face profile 1 and onward
name null or <string> Name of recognized face profile 1 and onward
Example:
{
"data":{
"faceResult":[
{
"frameId":5230,
"instances":[
{
"bbox":{
"bottom_right":{
"x":0.8661458492279053,
"y":0.9638888835906982
Copyright © Synology Inc. All rights Reserved. 551
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 Description Availability
id
<integer> Id of target face result 1 and onward
registered_face
_id
<integer> Id of face profile which this result is applied to 1 and onward
Copyright © Synology Inc. All rights Reserved. 552
Synology Surveillance Station Web API
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="Correct"&id=333&registered_face_id=
15
Response
Key Value Description Availability
data <Data Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Data Object> Definitions:
Key Value Description Availability
captured_face <Result Object> Information of face result list 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
_id
<integer> Id of face profile if this result is recognized as a certain
profile
1 and onward
similarity <double> Similarity if this result is comared with a certain profile or
result
1 and onward
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. 553
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 Value Description Availability
ids
Array of <integer> Id of target face results 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="MarkAsStranger"&ids=[93527,93528]
Response
Key Value Description Availability
data <Data Object> Information of execution result. 1 and onward
success <boolean> Execution success or not. 1 and onward
<Data Object> Definitions:
Key Value Description Availability
captured_face <Result Object> Information of face result list 1 and onward
<Result Object> Definitions:
Copyright © Synology Inc. All rights Reserved. 554
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
_id
<integer> Id of face profile if this result is recognized as a certain
profile
1 and onward
similarity <double> Similarity if this result is comared with a certain profile or
result
1 and onward
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 Description
400 Operation Failed.
Copyright © Synology Inc. All rights Reserved. 555
Synology Surveillance Station Web API
401 Illegal parameters.
564 The face result try to query doesn't exist.
Copyright © Synology Inc. All rights Reserved. 556
Synology Surveillance Station Web API
2.3.59 SYNO.SurveillanceStation.Recording.Bookmark
This API provides methods to list, save and delete bookmark.
Name Version Availability
SYNO.SurveillanceStation.Recording.Bookmark 1 Surveillance Station 8.2.7
Method Name Section Availability
SaveBookmark 2.3.59.1 1 and onward
DeleteBookmark 2.3.59.2 1 and onward
2.3.59.1 SaveBookmark
Add new bookmark or edit exist one.
Request
Key Value Description Availability
id <integer> Id of the bookmark, 0 means add. O.W means edit 1 and onward
eventId <integer> Target event id 1 and onward
cameraId <integer> Target event's camera id 1 and onward
archId <integer> Target event's archive task id (set to 0 if the event is not
in archive vault app)
1 and onward
name <string> Bookmark name 1 and onward
timestamp <timestamp> Timestamp of the bookmark 1 and onward
comment <string> Comment of the bookmark 1 and onward
Example:
GET /webapi/entry.cgi?
id=0&eventId=12&cameraId=15&archId=0&name="bookmark_name"&timestamp=1622804136&comment
="COMMENT"&api=SYNO.SurveillanceStation.Recording.Bookmark&method=SaveBookmark&version=1
Response
Key Value Description Availability
success <boolean> Execution success or not. 1 and onward
Example:
{
"success":true
}
Copyright © Synology Inc. All rights Reserved. 557
Synology Surveillance Station Web API
2.3.59.2 DeleteBookmark
Delete bookmark
Request
Key Value Description Availability
bookmarkIds Array of <integer> List of result id 1 and onward
Example:
GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Recording.Bookmark"&version="1"&method="DeleteBookmark"&bookmark
Ids=”4,6”
Response
Key Value Description Availability
success <boolean> Execution success or not. 1 and onward
Example:
{
"success": true
}
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 Value Description Availability
offset <integer> Optional.
The offset to be shifted in the total result.
If not specified, the offset will be 0.
5 and onward
limit <integer> Optional.
Number of recordings to be returned.
If not specified, return recordings to the end of recording
list.
5 and onward
cameraIds <string> Optional.
The list of <CAMERA_ID> to be queried concatenated by “,”.
If not specified, this parameter will be ignored and get all
related events.
5 and onward
fromTime <integer> Optional. 5 and onward
Copyright © Synology Inc. All rights Reserved. 558
Synology Surveillance Station Web API
Query start time.
If not specified, the default value is 0.
toTime <integer> 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 Value Description Availability
events Array of <events> Information of the queried events. 5
offset <integer> The shifted offset in the total result. 5
timestamp <timestamp> UTC unix timestamp.
The time when the system respond this
request.
5
total <integer> The number of total recordings. 5 and onward
<events> definition:
Key Value Description Availability
archId
<integer> Archive task id. 0 means not archive task. 5
audioCodec
<string>
The audio codec of the recording. 5
bookmark Array of <bookmark> Information of bookmark. 5
bookmarkCount <integer> Bookmark count of this recording. 5
cameraId <integer> The belonged camera id of the recording. 5
dsId <integer> The owner ds id of queried recordings. 5
folder <string> The folder path of the recording file. 5
id <integer> The id of the recording. 5
imgHeight <integer> The image height of the recording. 5
imgWidth <boolean> The image width of the recording. 5
startTime <timestamp> Recording start utc timestamp. 5
stopTime <timestamp> Recording stop utc timestamp. 5
videoCodec <string> The video codec of the recording. 5
<bookmark> definition:
Key Value Description Availability
archId
<integer> Archive task id. 0 means not archive task. 5
cameraId <integer> The belonged camera id of the bookmark. 5
comment <string> The comment of the bookmark. 5
eventId <integer> The belonged recording id of the bookmark. 5
id <integer> The id of the bookmark. 5
name <string> The name of the bookmark. 5
timestamp <timestamp> The bookmark timestamp of the recording. 5
Example:
Copyright © Synology Inc. All rights Reserved. 559
Synology Surveillance Station Web API
{
"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. 560
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. 561
Synology Surveillance Station Web API
Appendix: Valid values
The following valid values are used in this document:
Value Description
m ... n Any number between number m and number n.
m … Any number larger than or equal to number m.
<boolean> A Boolean data type.
<integer> Any number between 0 and 4,294,967,295 (2
32
-1).
<float> A floating point number.
<string> Any string encoded by UTF-8.
<timestamp> Unix time, seconds elapsed since UTC of Thursday, Jan 1
st
, 1970.
<value 1>, <value 2>,
<value 3>, ...
Enumeration, only the given values are valid.
Array of <object> A list of object in JSON array format.
<schedule string> 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> 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
represent the information of an event.
<CAMERA_ID> 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
obtained 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> 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 ).
<EMAP_ID> 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. 562