Skip to main content

DownloadStation

warning

This API is not documented yet.

Overview​

Core Download Station API implementation for Synology NAS.

This class provides methods to manage downloads, tasks, RSS feeds, and BT searches.

Parameters​

ip_address : str IP address or hostname of the Synology NAS. port : str Port number to connect to. username : str Username for authentication. password : str Password for authentication. secure : bool, optional Use HTTPS if True, HTTP if False (default is False). cert_verify : bool, optional Verify SSL certificates (default is False). dsm_version : int, optional DSM version (default is 7). debug : bool, optional Enable debug output (default is True). otp_code : Optional[str], optional One-time password for 2FA (default is None). device_id : Optional[str], optional Device ID (default is None). device_name : Optional[str], optional Device name (default is None). interactive_output : bool, optional Enable interactive output (default is True). download_st_version : int, optional Download Station API version (default is None).

Methods​

get_info() Get Download Station info. get_config() Get Download Station config. set_server_config(...) Set Download Station server config. schedule_info() Get schedule info. schedule_set_config(...) Set schedule config. tasks_list(...) List download tasks. tasks_info(...) Get info for specific tasks. tasks_source(...) Download task source. create_task(...) Create a new download task. delete_task(...) Delete a download task. pause_task(...) Pause a download task. resume_task(...) Resume a download task. edit_task(...) Edit a download task. get_statistic_info() Get Download Station statistics. get_rss_info_list(...) Get RSS site info list. refresh_rss_site(...) Refresh RSS site. rss_feed_list(...) Get RSS feed list. start_bt_search(...) Start a BT search. get_bt_search_results(...) Get BT search results. get_bt_search_category() Get BT search categories. clean_bt_search(...) Clean BT search tasks. get_bt_module() Get BT search modules.

Methods​

get_info​

Get Download Station info.

Internal API​

SYNO.DownloadStation.Info

Returns​

dict[str, object] or str
Download Station info.


get_config​

Get Download Station config.

Internal API​

SYNO.DownloadStation.Info

Returns​

dict[str, object] or str
Download Station config.


set_server_config​

Set Download Station server configuration.

Internal API​

SYNO.DownloadStation.Info

Parameters​

bt_max_download Optional[int]
Maximum BT download speed.

bt_max_upload Optional[int]
Maximum BT upload speed.

emule_max_download Optional[int]
Maximum eMule download speed.

emule_max_upload Optional[int]
Maximum eMule upload speed.

nzb_max_download Optional[int]
Maximum NZB download speed.

http_max_download Optional[int]
Maximum HTTP download speed.

ftp_max_download Optional[int]
Maximum FTP download speed.

emule_enabled Optional[bool]
Enable eMule.

unzip_service_enabled Optional[bool]
Enable unzip service.

default_destination Optional[str]
Default download destination.

emule_default_destination Optional[str]
Default eMule download destination.

Returns​

dict[str, object] or str
API response.


schedule_info​

Get Download Station schedule configuration.

Internal API​

SYNO.DownloadStation.Schedule

Returns​

dict[str, object] or str
Schedule configuration.


schedule_set_config​

Set Download Station schedule configuration.

Internal API​

SYNO.DownloadStation.Schedule

Parameters​

enabled bool
Enable schedule (default is False).

emule_enabled bool
Enable eMule schedule (default is False).

Returns​

dict[str, object] or str
API response.


tasks_list​

List download tasks.

Internal API​

SYNO.DownloadStation

Parameters​

additional_param Optional[str or list[str]]
Additional fields to retrieve.

offset int
Offset for pagination (default is 0).

limit int
Maximum number of tasks to retrieve (default is -1).

Returns​

dict[str, object] or str
List of download tasks.


tasks_info​

Get information for specific download tasks.

Internal API​

SYNO.DownloadStation

Parameters​

task_id str or list[str]
Task ID(s).

additional_param Optional[str or list[str]]
Additional fields to retrieve.

Returns​

dict[str, object] or str
Task information.


tasks_source​

Download task source.

Internal API​

SYNO.DownloadStation2.Task.Source

Parameters​

task_id str or list[str]
Task ID(s).

Returns​

bytes
Task source content.


get_task_list​

Get info from a task list containing the files to be downloaded. This is to be used after creating a task, and before starting the download.

Internal API​

SYNO.DownloadStation

Parameters​

list_id str
List ID returned by create_task.

Returns​

dict[str, any]
A dictionary containing a task list information.


create_task​

Create a new download task.

Internal API​

SYNO.DownloadStation

Parameters​

url str
Download URL.

destination str
Download destination.

Returns​

dict[str, object] or str
API response.


delete_task​

Delete a download task.

Internal API​

SYNO.DownloadStation

Parameters​

task_id str or list[str]
Task ID(s).

force bool
Force delete (default is False).

Returns​

dict[str, object] or str
API response.


pause_task​

Pause a download task.

Internal API​

SYNO.DownloadStation

Parameters​

task_id str or list[str]
Task ID(s).

Returns​

dict[str, object] or str
API response.


resume_task​

Resume a download task.

Internal API​

SYNO.DownloadStation

Parameters​

task_id str or list[str]
Task ID(s).

Returns​

dict[str, object] or str
API response.


edit_task​

Edit a download task.

Internal API​

SYNO.DownloadStation

Parameters​

task_id str or list[str]
Task ID(s).

destination str
New download destination (default is 'sharedfolder').

Returns​

dict[str, object] or str
API response.


download_task_list​

Download files from a task list.

Internal API​

SYNO.DownloadStation

Parameters​

list_id str
Task list ID.

file_indexes list[int]
List of file indexes to download.
For example, if get_task_list() returns files: [{index: 0, name: "file1.txt"}, {index: 1, name: "file2.txt"}], then file_indexes = [1] will download only file2.txt.

destination str
Download destination, e.g. 'sharedfolder/subfolder'

create_subfolder bool
Create subfolder. Defaults to True

Returns​

dict[str, object] or str
A dictionary containing the task_id for the started download task.


get_statistic_info​

Get Download Station statistics.

Internal API​

SYNO.DownloadStation.Statistic

Returns​

dict[str, object] or str
Statistics information.


get_rss_info_list​

Get RSS site info list.

Internal API​

SYNO.DownloadStation.RSS.Site

Parameters​

offset Optional[int]
Offset for pagination.

limit Optional[int]
Maximum number of RSS sites to retrieve.

Returns​

dict[str, object] or str
RSS site info list.


refresh_rss_site​

Refresh an RSS site.

Internal API​

SYNO.DownloadStation.RSS.Site

Parameters​

rss_id Optional[str]
RSS site ID.

Returns​

dict[str, object] or str
API response.


rss_feed_list​

Get RSS feed list.

Internal API​

SYNO.DownloadStation

Parameters​

rss_id Optional[str]
RSS site ID.

offset Optional[int]
Offset for pagination.

limit Optional[int]
Maximum number of RSS feeds to retrieve.

Returns​

dict[str, object] or str
RSS feed list.


Start a BT search.

Internal API​

SYNO.DownloadStation

Parameters​

keyword Optional[str]
Search keyword.

module str
BT search module (default is 'all').

Returns​

dict[str, object] or str
BT search task information or message.


get_bt_search_results​

Get BT search results.

Internal API​

SYNO.DownloadStation

Parameters​

taskid Optional[str]
BT search task ID.

offset Optional[int]
Offset for pagination.

limit Optional[int]
Maximum number of results to retrieve.

sort_by Optional[str]
Field to sort by.

sort_direction Optional[str]
Sort direction.

filter_category Optional[str]
Filter by category.

filter_title Optional[str]
Filter by title.

Returns​

dict[str, object] or str
BT search results.


get_bt_search_category​

Get BT search categories.

Internal API​

SYNO.DownloadStation

Returns​

dict[str, object] or str
BT search categories.


Clean BT search tasks.

Internal API​

SYNO.DownloadStation

Parameters​

taskid Optional[str or list[str]]
BT search task ID(s).

Returns​

dict[str, object] or str
API response.


get_bt_module​

Get BT search modules.

Internal API​

SYNO.DownloadStation

Returns​

dict[str, object] or str
BT search modules.