概要SRM API
synology-srm的Python项目详细描述
Synology SRM API
Python3库使用Synology SRM(Synology Router Manager)API。这与Synology DSM(diskstation manager)不同。
此库应与以下设备一起使用。
- RT1900AC
- RT2600AC
It's not possible to create another account in SRM with admin permissions. You'll need to use your
admin
account (or the one you renamed at creation).
用法
importsynology_srmclient=synology_srm.Client(host='192.168.1.254',port=8001,https=True,username='admin',password='admin',)
现在可以从api访问所有名称空间。以下方法可用。
- 底座
- 加密()
- info()
- 核心
- ddns_extip()
- ddns_record()
- 系统利用率()
- 网络设备(过滤器=
{}
)
- 网格
- 网络wanstatus()
- 网络设备
- 系统信息()
例如,列出api中可用的所有端点。
endpoints=client.base.info()forendpoint,configinendpoints.items():print("API endpoint {} (minVersion={}, maxVersion={})".format(endpoint,config['minVersion'],config['maxVersion'],))
https自动签名证书
如果使用自签名证书,则可以禁用https证书验证。
client.http.disable_https_verify()