Looking for Script help for Synology API
Posted: Mon Feb 18, 2013 1:07 am
I'm trying to figure out how to do this but not finding any examples.
I'd like to create some basic scripts that I can send commands to the Synology. To do this I need to authenticate, then pass the SID (token) to send the commands. Can someone help me with the Python portion?
Thank you for the help!
*INFO*
The API supports GET. Examples in the guides look like... GET /webapi/192.168.2.50:5000?api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=1&cameraId=2&action=start
To authenticate... http://192.168.2.50:5000/webapi/auth.cg ... format=sid
-- when I use this directly in the browser it replies with a SID and success.
Get Camera List... http://192.168.2.50:5000/webapi/Surveil ... &_sid=<SID>
-- when I use this directly in the browser it replies it gives an error saying "Logged in session does not have permission".
Send Command:
http://192.168.2.50:5000/webapi/query.c ... tion=start
... oddly no SID seems required. when I try it I get an error "requested API does not exist"
Synology general API doc... http://download.synology.com/download/d ... API_V9.pdf
Synology Security Station Web API doc... http://download.synology.com/download/d ... _v0.12.pdf
I'd like to create some basic scripts that I can send commands to the Synology. To do this I need to authenticate, then pass the SID (token) to send the commands. Can someone help me with the Python portion?
Thank you for the help!
*INFO*
The API supports GET. Examples in the guides look like... GET /webapi/192.168.2.50:5000?api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=1&cameraId=2&action=start
To authenticate... http://192.168.2.50:5000/webapi/auth.cg ... format=sid
-- when I use this directly in the browser it replies with a SID and success.
Get Camera List... http://192.168.2.50:5000/webapi/Surveil ... &_sid=<SID>
-- when I use this directly in the browser it replies it gives an error saying "Logged in session does not have permission".
Send Command:
http://192.168.2.50:5000/webapi/query.c ... tion=start
... oddly no SID seems required. when I try it I get an error "requested API does not exist"
Synology general API doc... http://download.synology.com/download/d ... API_V9.pdf
Synology Security Station Web API doc... http://download.synology.com/download/d ... _v0.12.pdf