일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- SPL
- index
- Numpy
- pandas
- keras
- synology
- Splunk
- GT-S80
- mean
- ipad
- javascript
- RNN
- CNN
- Series
- LSTM
- mariadb
- DFS
- imread
- Button
- dataframe
- 삼성소프트웨어멤버십
- install
- E-P1
- SciPy
- pip
- Python
- pycharm
- GitHub
- 알고리즘
- Lotto
Archives
- Today
- Total
잠토의 잠망경
[synology] API 본문
sample01
http://synologyaddress:myport/webapi/query.cgi?api=SYNO.API.Info
&version=1
&method=query
&query=SYNO.API.Auth,SYNO.DownloadStation.Task
{"data":{"SYNO.API.Auth":{"maxVersion":7,"minVersion":1,"path":"entry.cgi"}},"success":true}
참고: https://stackoverflow.com/questions/16355814/how-to-access-synology-nas-drive-using-api
sample02
입력
http://synologyaddress:myport/webapi/auth.cgi?api=SYNO.API.Auth
&version=3
&method=login
&account=synology_id
&passwd=synology_pw
&session=FileStation
&format=cookie
결과
{"data":{"did":"Xc3bQHyydfdIct4KUoVgMUj1OWoH6n2dfdKVgdfdWxr-JA0s3REK0dfzxWidfQQ","sid":"fi_AsXQjXK5iodfdzxbnQlth8uLw0HUndfdfd0vsFNnrD0L37Vg2Kjrdfdfdxcdd4ileJSPjM"},"success":true}
python lib 사용
from synology_api import filestation
synology_ip = ip
synology_port = port
synology_id = id
synology_pw = pw
# version은 3입니다.
fl = filestation.FileStation(synology_ip, synology_port, synology_id, synology_pw, dsm_version = 3)
res = fl.get_info()
print(res)
Comments