Synology NAS API - feliyur/exercises GitHub Wiki
API docs:
Get API version:
https://<nas id>.quickconnect.to/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&query=SYNO.API.Auth,SYNO.API.Info
Get all APIs apparently
https://<nas id>.quickconnect.to/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&query=all
Login request:
https://<nas id>.quickconnect.to/webapi/query.cgi?api=SYNO.API.Auth&version=3&method=login&account=<username>&passwd=<password>&session=FileStation&format=cookie
from curl:
curl -k 'https://<nas id>.quickconnect.to/webapi/query.cgi?api=SYNO.API.Auth&version=3&method=login&account=<username>&passwd=<password>&session=FileStation&format=cookie' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36' -H 'authority: <nas id>.quickconnect.to' -H 'referer: <nas id>.quickconnect.to'
to retrieve session ID:
<above command> | jq ‘.data.sid’