Package
This API is partially documented or under construction.
Overview​
Core Package API implementation.
Methods​
get_package
​
Get infos of a package
Internal API​
SYNO.Core.Package
Parameters​
package_id str
Package ID
additional List[str]
Additional field to retrieves. Defaults to []
All filed known are:
["status","dsm_apps"]
Returns​
dict
Informations about the package
Example return​
Click to expand
{
"data": {
"additional": {
"dsm_apps": " com.plexapp.plexmediaserver",
"status": "running",
"status_code": 0,
"status_description": "retrieve from status script",
"status_origin": "running"
},
"id": "PlexMediaServer",
"name": "Plex Media Server",
"timestamp": 1739228562839,
"version": "1.41.3.9314-72009314"
},
"success": true
}
list_installed
​
List installed packages
Internal API​
SYNO.Core.Package
Parameters​
additional list[str]
Additional fields to retrieve. Defaults to []
.
All fields known are:
["description", "description_enu", "dependent_packages", "beta", "distributor", "distributor_url", "maintainer", "maintainer_url", "dsm_apps", "dsm_app_page", "dsm_app_launch_name","report_beta_url", "support_center", "startable", "installed_info", "support_url", "is_uninstall_pages","install_type", "autoupdate", "silent_upgrade", "installing_progress", "ctl_uninstall", "updated_at", "status", "url","available_operation"]
.
ignore_hidden bool
TODO: Write description
Returns​
dict
List of packages installed on the NAS
Example return​
Click to expand
{
"data": {
"packages": [
{
"additional": {
"install_type": ""
},
"id": "ActiveBackup-Office365",
"name": "Active Backup for Microsoft 365",
"timestamp": 1738880043640,
"version": "2.5.5-14034"
}
]
},
"success": true
}
list_installable
​
List installable packages
Internal API​
SYNO.Core.Package.Server
Returns​
dict
List of beta_package, categories and packages available
Example return​
Click to expand
{
"data": {
"banners": [],
"beta_packages": [...],
"categories": [...],
"packages": [...]
},
"success": true
}
get_package_center_settings
​
Get package center settings
Internal API​
SYNO.Core.Package.Setting
Returns​
dict
List settings of the Package center
Example return​
Click to expand
{
"data": {
"autoupdateall": false,
"autoupdateimportant": true,
"default_vol": "/volume1",
"enable_autoupdate": true,
"enable_dsm": true,
"enable_email": false,
"mailset": true,
"trust_level": 0,
"update_channel": true,
"volume_count": 2,
"volume_list": [
{
"desc": "",
"display": "Volume 1 (Available capacity: 184.72 GB )",
"mount_point": "/volume1",
"size_free": "198336327680",
"size_total": "206158430208",
"vol_desc": "Apps",
"volume_features": []
},
{
"desc": "",
"display": "Volume 2 (Available capacity: 2391.14 GB )",
"mount_point": "/volume2",
"size_free": "2567467421696",
"size_total": "3623234412544",
"vol_desc": "Stockage",
"volume_features": []
}
]
},
"success": true
}
set_package_center_settings
​
Set settings of the package center
Internal API​
SYNO.Core.Package.Setting
Parameters​
enable_email bool
Enable email notification
enable_dsm bool
Enable desktop notification
enable_autoupdate bool
Update packages automatically
autoupdateall bool
Auto update all packages
autoupdateimportant bool
Auto update "important" packages
default_vol str
Default volume for installation, all your volumes or "no_default_vol" = Always ask me
udpate_channel str
"stable" => Disable beta packages
"beta" => Enable beta packages
Returns​
dict
Return some settings
Example return​
Click to expand
{
"data": {
"enable_dsm": true,
"enable_email": false,
"update_channel": "stable"
},
"success": true
}
get_package_center_infos
​
Get package center informations
Internal API​
SYNO.Core.Package.Info
Returns​
dict
List of configs
feasibility_check_install
​
Check if installation is possible
Internal API​
SYNO.Core.Package.Setting
Parameters​
packages List[str]
List of package IDs to check for feasibility
Returns​
dict
description
Example return​
Click to expand
{
"data": {
"template": "data"
},
"success": true
}
download_package
​
Start download of the package, return a taskId for check status
Internal API​
SYNO.Core.Package.Installation
Parameters​
url str
Url that can be retrieve from package info using get_installable
function, in the link
field
package_id str
Package ID that can be retrieve from package info using get_installable
function, in the id
field
checksum str
Checksum that can be retrieve from package info using get_installable
function, in the md5
field
filesize str
Filesize that can be retrieve from package info using get_installable
function, in the size
field
Returns​
dict
Retreive first progress of the download and the taskid used to check download status with get_dowload_package_status
function
Example return​
Click to expand
{
"data": {
"progress": 1.0000000000000001e-05,
"taskid": "@SYNOPKG_DOWNLOAD_DhcpServer"
},
"success": true
}
get_dowload_package_status
​
Get current download status of the package
Internal API​
SYNO.Core.Package.Installation
Parameters​
task_id str
task ID retrieve from response of download_package
function
Returns​
dict
Retrieve informations about the download, important info is the progress
field
Example return​
Click to expand
{
"data": {
"beta": false,
"blqinst": false,
"finished": false,
"id": "DhcpServer",
"installing": false,
"name": "DhcpServer",
"pid": 27844,
"progress": 1.0000000000000001e-05,
"remote_link": "https://global.synologydownload.com/download/Package/spk/DhcpServer/1.0.2-0046/DhcpServer-x86_64-1.0.2-0046.spk",
"size": "1378697",
"success": true,
"taskid": "@SYNOPKG_DOWNLOAD_DhcpServer",
"tmp_folder": "/volume1/@tmp/synopkg/download.esnnkb"
},
"success": true
}
check_installation_from_download
​
Get info about downloaded package file, response field is used for check_installation
and install_package
function
Internal API​
SYNO.Core.Package.Installation.Download
Parameters​
task_id str
task ID retrieve from response of download_package
function
Returns​
dict
Retrieve information about downloaded package installation file, response field is used for check_installation
and install_package
function
Example return​
Click to expand
{
"data": {
"description": "DHCP Server turns your DiskStation into a DHCP server within LAN to assign dynamic IP addresses and manage DHCP clients.",
"distributor": "",
"dsm_apps": "SYNO.SDS.DHCP.Instance",
"filename": "/volume1/@tmp/synopkg/download.esnnkb/@SYNOPKG_DOWNLOAD_DhcpServer",
"id": "DhcpServer",
"install_on_cold_storage": false,
"install_reboot": false,
"install_type": "system",
"maintainer": "Synology Inc.",
"name": "DHCP Server",
"startable": true,
"status": "non_installed",
"status_code": 255,
"status_description": "failed to locate given package",
"status_origin": "non_installed",
"version": "1.0.2-0046"
},
"success": true
}
upload_package_file
​
Upload a file for install a package
Internal API​
SYNO.Core.Package.Installation
Parameters​
file_path str
File path
verify bool
Use https. Defaults to False
progress_bar bool
Enable progress bar in the terminal. Defaults to True
additional list
Additional field to retrieves. Defaults to []
All fields know are:
["description","maintainer","distributor","startable","dsm_apps","status","install_reboot", "install_type","install_on_cold_storage","break_pkgs","replace_pkgs"]
.
Returns​
dict
Informations about the uploaded file for installation
Example return​
Click to expand
{
"data": {
"additional": {
"break_pkgs": null,
"description": "Plex organizes all of your personal media so you can easily access and enjoy it.",
"distributor": "",
"dsm_apps": " com.plexapp.plexmediaserver",
"install_on_cold_storage": false,
"install_reboot": false,
"install_type": "",
"maintainer": "Plex Inc",
"replace_pkgs": { "Plex Media Server": "" },
"startable": true,
"status": "running",
"status_code": 0,
"status_description": "retrieve from status script",
"status_origin": "running"
},
"codesign_error": 4532,
"id": "PlexMediaServer",
"name": "Plex Media Server",
"task_id": "@SYNOPKG_UPLOAD_17392283048566DD3",
"version": "1.41.3.9314-72009314"
},
"success": true
}
get_default_install_volume
​
Get default install volume for package
Internal API​
SYNO.Core.Package.Setting.Volume
Returns​
dict
Return default volume, if default volume is set to Always ask me
it return error 4501
Example return​
Click to expand
{
"data": {
"default_vol": "/volume1"
},
"success": true
}
check_installation
​
Check installation of the package on the default volume
Internal API​
SYNO.Core.Package.Installation
Parameters​
package_id str
Id of the package to install
install_type str, optionnal
Installation type, Defaults to ""
. TODO: Add description and possible types
install_on_cold_storage bool
Defaults to False
. TODO: Add description
blCheckDep bool
Defaults to False
. TODO: Add description
replacepkgs dict
Defaults to {}
. TODO: Add description
Returns​
dict
List of usefull informations about volumes
Example return​
Click to expand
{
"data": {
"is_occupied": false,
"volume_count": 2,
"volume_list": [
{
"desc": "",
"display": "Volume 1 (Available capacity: 184.52 GB )",
"mount_point": "/volume1",
"size_free": "198126022656",
"size_total": "206158430208",
"vol_desc": "vol1",
"volume_features": []
},
{
"desc": "",
"display": "Volume 2 (Available capacity: 2391.16 GB )",
"mount_point": "/volume2",
"size_free": "2567484923904",
"size_total": "3623234412544",
"vol_desc": "vol2",
"volume_features": []
}
],
"volume_path": "/volume1"
},
"success": true,
}
upgrade_package
​
Upgrade an existing package
Parameters​
task_id : str
Task id of the download or the upload file
check_codesign : bool, optional
Check signature of the source code of the package (is it a Synology one). Defaults to False
force : bool, optional
Force installation. Defaults to False
installrunpackage : bool, optional
Run package after installation. Defaults to True
extra_values : dict, optional
Extra values due to some package installation. Defaults to {}
All known extra values are:
- Surveillance station
{
"chkSVS_Alias": true,
"strSVS_Alias": "cam",
"chkSVS_HTTP": true,
"strSVS_HTTP": "9900",
"chkSVS_HTTPS": true,
"strSVS_HTTPS": "9901"
}
Returns​
dict Message and some info about installation
Example return​
{
"data": {
"message": "<br><strong><p style='color:blue'><big><b>Installation Successful!</big></p>
<br><p style='color:blue'>:::note
If Plex cannot access your media, verify user <strong>PlexMediaServer</strong> is granted permission in <strong>Control Panel</strong>.</p><br>
:::
Set access to your media share(s) by performing the following steps:<br><br>
1. Open <strong>Control Panel</strong> and select <strong>Shared Folder</strong><br>
2. Select the share which contains your media and click <strong>Edit</strong><br>
3. Click the <strong>Permissions</strong> tab<br>
4. Change the dropdown from <strong>Local Users</strong> to <strong>System internal user</strong><br>
5. Check the <strong>Read/Write</strong> checkbox for the <strong>PlexMediaServer</strong> user<br>
6. Click <strong>Save</strong> to confirm the new permissions<br>
7. Repeat steps 2-6 for each share you want Plex Media Server to access<br>
",
"packageName": "Plex Media Server",
"worker_message": []
},
"success": true,
}
Internal API​
SYNO.Core.Package.Installation
install_package
​
Install a package that is already downloaded
Internal API​
SYNO.Core.Package.Uninstallation
Parameters​
package_id str
Id of the package to install
volume_path str
Volume path of the installation, can get from check_installation
function
file_path str
File path of the installation, can get from check_installation_from_download
function
check_codesign bool
Check signature of the source code of the package (is it a Synology one). Defaults to False
force bool
Force installation. Defaults to False
installrunpackage bool
Run package after installation. Defaults to True
extra_values dict
Extra values due to some package installation. Defaults to {}
All known extra values are:
- Surveillance station
{
"chkSVS_Alias": true,
"strSVS_Alias": "cam",
"chkSVS_HTTP": true,
"strSVS_HTTP": "9900",
"chkSVS_HTTPS": true,
"strSVS_HTTPS": "9901"
}
Returns​
dict
Message and some info about installation
Example return​
Click to expand
{
"data": {
"has_fail": false,
"result": [
{
"api": "SYNO.Core.Package.Installation",
"data": {
"is_occupied": false,
"volume_count": 2,
"volume_list": [
{
"desc": "",
"display": "Volume 1 (Available capacity: 185.09 GB )",
"mount_point": "/volume1",
"size_free": "198739943424",
"size_total": "206158430208",
"vol_desc": "Apps",
"volume_features": []
},
{
"desc": "",
"display": "Volume 2 (Available capacity: 2391.17 GB )",
"mount_point": "/volume2",
"size_free": "2567495630848",
"size_total": "3623234412544",
"vol_desc": "Stockage",
"volume_features": []
}
],
"volume_path": "/volume1"
},
"method": "check",
"success": true,
"version": 1
},
{
"api": "SYNO.Core.Package.Installation",
"data": {
"packageName": "Text Editor",
"worker_message": []
},
"method": "install",
"success": true,
"version": 1
}
]
},
"success": true
}
uninstall_package
​
Uninstall a package
Internal API​
SYNO.Core.Package.Uninstallation
Parameters​
package_id str
Id of the package to uninstall
Returns​
dict
Possible message to the user
Example return​
Click to expand
{
"data": {
"message": "",
"worker_message": []
},
"success": true
}
easy_install
​
Execute an "easy" installation process of the package
Parameters​
package_id str
Package ID to install
volume_path str
Volume path where you want to install the package
install_dependencies bool
If you want to install dependencies. Defaults to True
Returns​
dict
Information about installation, same as install_package
function
Example return​
Click to expand
{
"data": {
"has_fail": false,
"result": [
{
"api": "SYNO.Core.Package.Installation",
"data": {
"is_occupied": false,
"volume_count": 2,
"volume_list": [
{
"desc": "",
"display": "Volume 1 (Available capacity: 185.11 GB )",
"mount_point": "/volume1",
"size_free": "198759485440",
"size_total": "206158430208",
"vol_desc": "Apps",
"volume_features": []
},
{
"desc": "",
"display": "Volume 2 (Available capacity: 2391.17 GB )",
"mount_point": "/volume2",
"size_free": "2567495565312",
"size_total": "3623234412544",
"vol_desc": "Stockage",
"volume_features": []
}
],
"volume_path": "/volume1"
},
"method": "check",
"success": true,
"version": 1
},
{
"api": "SYNO.Core.Package.Installation",
"data": {
"packageName": "Text Editor",
"worker_message": []
},
"method": "install",
"success": true,
"version": 1
}
]
},
"success": true
}