Skip to content

Instantly share code, notes, and snippets.

@joeperpetua
Created June 5, 2024 08:46
Show Gist options
  • Save joeperpetua/97e212e27edcdf2ced558d43f64fed5a to your computer and use it in GitHub Desktop.
Save joeperpetua/97e212e27edcdf2ced558d43f64fed5a to your computer and use it in GitHub Desktop.
Synology Drive Labels

To get a list of the files of home (of user from whom the ssid belongs):
https://IP:5001/webapi/entry.cgi?api=SYNO.SynologyDrive.Files&method=list&version=2&path=/mydrive&_ssid=XXX

If you need a list of the file of a team folder instead, first get the team folders list:
https://IP:5001/webapi/entry.cgi?api=SYNO.SynologyDrive.TeamFolders&method=list&version=1&_ssid=XXX

And then the files of the team folder you want:
https://IP:5001/webapi/entry.cgi?api=SYNO.SynologyDrive.Files&method=list&version=2&path="id:XXX"&_ssid=XXX

Get a list of labels:
https://IP:5001/webapi/entry.cgi?method=list&api=SYNO.SynologyDrive.Labels&version=1&_ssid=XXX

To apply a label to a file:
https://IP:5001/webapi/entry.cgi?api=SYNO.SynologyDrive.Files&method=label&version=2&files=["id:XXX"]&labels=[{"action":"add","label_id":"XXX"}]&_ssid=XXX

To remove label from file:
https://IP:5001/webapi/entry.cgi?api=SYNO.SynologyDrive.Files&method=label&version=2&files=["id:XXX"]&labels=[{"action":"delete","label_id":"XXX"}]&_ssid=XXX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment