Skip to main content

DownloadStation

warning

This API is partially documented or under construction.

Overview​

Core Download Station API implementation for Synology NAS.

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

Supported methods​

  • Getters :
    • Get Download Station info.
    • Get Download Station config.
    • Get Download Station statistics.
    • Get RSS site info list.
    • Get schedule info.
    • Get info for specific tasks.
    • List download tasks.
    • Get RSS feed list.
    • Get RSS feed filter list.
    • Get BT search results.
    • Get BT search categories.
    • Get BT search modules.
  • Setters :
    • Set Download Station server config.
    • Set schedule config.
    • Create a new download task.
    • Edit a download task.
    • Delete a download task.
    • Add RSS feed filter.
    • Set RSS feed filter.
    • Delete RSS feed filter.
  • Actions :
    • Download task source.
    • Pause a download task.
    • Resume a download task.
    • Refresh RSS site.
    • Start a BT search.
    • Clean BT search tasks.

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
Use HTTPS if True, HTTP if False (default is False).

cert_verify bool
Verify SSL certificates (default is False).

dsm_version int
DSM version (default is 7).

debug bool
Enable debug output (default is True).

otp_code Optional[str]
One-time password for 2FA (default is None).

device_id Optional[str]
Device ID (default is None).

device_name Optional[str]
Device name (default is None).

interactive_output bool
Enable interactive output (default is True).

download_st_version int
Download Station API version (default is None).

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.

Example return​

Click to expand
{
"data" : {
"files" : [
{
"index" : 0,
"name" : "Pulp.Fiction.1994.2160p.4K.BluRay.x265.10bit.AAC5.1-[YTS.MX].mkv",
"size" : 2391069024
},
{
"index" : 1,
"name" : "YTSProxies.com.txt",
"size" : 604
},
{
"index" : 2,
"name" : "www.YTS.MX.jpg",
"size" : 53226
}
],
"size" : 7835426779,
"title" : "Pulp Fiction (1994) [2160p] [4K] [BluRay] [5.1] [YTS.MX]",
"type" : "bt"
},
}

create_task​

Create a new download task.
You can choose between a url or a file path (.torrent).

Internal API​

SYNO.DownloadStation

Parameters​

url str
Download URL. Use either url or file_path.

file_path str
Path to a file (e.g. a .torrent) to download.

destination str
Download destination folder (default is "").

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.

Example return​

Click to expand
{
'data': {
'task_id': 'username/SYNODLTaskListDownload1759340338C7C39ABA'
}
}

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.


rss_feed_filter_list​

Get RSS feed filter list.

Internal API​

SYNO.DownloadStation

Parameters​

feed_id int
RSS feed ID.

offset int
Offset for pagination.

limit int
Maximum number of filters to retrieve.

Returns​

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


rss_feed_filter_add​

Add RSS feed filter.

Internal API​

SYNO.DownloadStation

Parameters​

feed_id int
RSS feed ID.

filter_name str
Filter name.

match str
Match pattern.

not_match str
Not match pattern.

destination str
Download destination.

is_regex bool
Use regex for matching (default is False).

Returns​

dict[str, object] or str
API response.


rss_feed_filter_set​

Set RSS feed filter.

Internal API​

SYNO.DownloadStation

Parameters​

filter_id int
Filter ID.

filter_name str
Filter name.

match str
Match pattern.

not_match str
Not match pattern.

destination str
Download destination.

is_regex bool
Use regex for matching (default is False).

Returns​

dict[str, object] or str
API response.


rss_feed_filter_delete​

Delete RSS feed filter.

Internal API​

SYNO.DownloadStation

Parameters​

filter_id int
Filter ID.

Returns​

dict[str, object] or str
API response.


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.