### Example Return for feasibility_check_install Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON object shows a successful feasibility check for package installation, indicating that the installation is possible. ```json { "data": { "template": "data" }, "success": true } ``` -------------------------------- ### Example Package Installation Check Return Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON details the installation status of a package on available volumes, including occupancy and capacity information. ```json { "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 } ``` -------------------------------- ### Example Return for Package Installation Check Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON structure represents a successful check for package installation, detailing volume information and availability. ```json { "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 } ``` -------------------------------- ### Example Return for Downloaded Package Installation Info Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON structure shows the return value for check_installation_from_download, providing details about a downloaded package file used for subsequent installation steps. ```json { "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 } ``` -------------------------------- ### group_install_start Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_upgrade.md Starts a group installation process. This method is part of the SYNO.Core.Upgrade.GroupInstall API. ```APIDOC ## group_install_start ### Description Start a group install. ### Method POST ### Endpoint /api/entry.cgi?api=SYNO.Core.Upgrade.GroupInstall&method=Start ### Returns #### Success Response (200) - **response** (dict[str, object] or str) - Group install status. ### Response Example ```json { "data": { "status": "success" }, "error": null, "success": true } ``` ``` -------------------------------- ### quickstart_install Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_service_user.md Runs the quick start installation process. This method interacts with the SYNO.Core.QuickStart.Install internal API and accepts additional parameters. ```APIDOC ## quickstart_install ### Description Run quick start installation. ### Method POST ### Endpoint /webapi/entry.cgi?api=SYNO.Core.QuickStart.Install&method=Install ### Parameters #### Request Body - **_kwargs** (object) - Required - Additional DSM API parameters for the install operation. ### Returns #### Success Response - **result** (dict[str, object] or str) - Result of the quickstart install operation. ``` -------------------------------- ### Example Return for Start Container Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/docker_api.md This JSON structure represents the successful return data when starting a Docker container. ```json { "data" : { "cpu" : 0, "memory" : 21241856, "memoryPercent" : 0.52071672677993774, "name" : "glance", "start_dependent_container" : false }, "httpd_restart" : false, "success" : true } ``` -------------------------------- ### DownloadStation: Example Return for download_task_list Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/downloadstation.md This is an example of the expected return format when starting a download task using the download_task_list method. ```json { 'data': { 'task_id': 'username/SYNODLTaskListDownload1759340338C7C39ABA' } } ``` -------------------------------- ### Example Default Install Volume Return Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON shows the default installation volume for a package. If set to 'Always ask me', an error code 4501 is returned. ```json { "data": { "default_vol": "/volume1" }, "success": true } ``` -------------------------------- ### Example Return: Get Package Settings Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/usb_copy.md This is an example of the JSON response when retrieving package settings for the USBCopy API. It shows configuration options like beep notifications and log rotation. ```python { "data": { "beep_on_task_start_end": True, "log_rotate_count": 100000, "repo_volume_path": "/volume2" }, "success": True } ``` -------------------------------- ### Complete Example: Initialize FileStation and DownloadStation Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/getting-started/usage.md A comprehensive example demonstrating the initialization of both FileStation and DownloadStation clients with standard authentication parameters. ```python from synology_api.filestation import FileStation from synology_api.downloadstation import DownloadStation fs = FileStation( 'Synology Ip', 'Synology Port', 'Username', 'Password', secure=False, cert_verify=False, dsm_version=7, debug=True, otp_code=None ) ds = DownloadStation( 'Synology Ip', 'Synology Port', 'Username', 'Password', secure=False, cert_verify=False, dsm_version=7, debug=True, otp_code=None ) fs_info = fs.get_info() ds_info = ds.get_info() ``` -------------------------------- ### Start Local Development Server Source: https://github.com/n4s4/synology-api/blob/master/documentation/README.md Starts a local development server for live preview. Changes are reflected without restarting. ```bash yarn start ``` -------------------------------- ### Example Return: Get Package Logs Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/usb_copy.md This example demonstrates the structure of the JSON response when fetching package logs. It includes log details such as timestamp, error status, and task ID. ```python { "data": { "count": 1, "log_list": [ { "description_id": 101, "description_parameter": "[asdf]", "error": 0, "log_type": 1, "task_id": 2, "timestamp": 1738341351 } ] }, "success": True } ``` -------------------------------- ### Install Synology API from Source Source: https://github.com/n4s4/synology-api/blob/master/README.md Install the synology-api package directly from its GitHub repository. ```bash pip3 install git+https://github.com/N4S4/synology-api ``` -------------------------------- ### Example return for create_snapshot Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/snapshot.md This is an example of a successful response when creating a snapshot for a share. ```json { "data": "GMT+09-2023.09.12-00.33.20", "success": true } ``` -------------------------------- ### Example Return Data for Core Package API Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON structure represents a successful response from the Synology Core Package API, showing details for package installation checks and installation methods. It includes volume information and package-specific data. ```json { "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 } ``` -------------------------------- ### Example Services List for Task Scheduler Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/task_scheduler.md This is an example of the list format for services when creating or modifying a task. To get a list of all available services and their IDs, use `get_task_config(task_id=-1, real_owner=your_username, type='service')`. ```python [ {'id': 'AudioStation', 'type': 'package'}, {'id': 'HyperBackup', 'type': 'package'}, {'id': 'Samba', 'type': 'service'} ] ``` -------------------------------- ### Example Return for set_package_center_settings Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON object shows an example of the return value from the `set_package_center_settings` function, indicating the updated settings for the package center. ```json { "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 } ``` -------------------------------- ### Easy Install Package Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Executes a simplified installation process for a package, including dependency management. ```APIDOC ## easy_install ### Description Execute an easy installation process of the package. ### Parameters #### Path Parameters - **package_id** (str) - Required - Package ID to install. - **volume_path** (str) - Required - Volume path where you want to install the package. #### Query Parameters - **install_dependencies** (bool) - Optional - If you want to install dependencies. Defaults to True. ### Response #### Success Response (200) - **data** (dict[str, object]) - Information about installation, same as install_package function. ``` -------------------------------- ### Install Tool Versions Source: https://github.com/n4s4/synology-api/blob/master/CONTRIBUTING.md Installs the correct versions of development tools as defined in the project's configuration. ```bash asdf install ``` -------------------------------- ### start_project Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/docker_api.md Start a Docker Compose project using 'docker compose up'. ```APIDOC ## start_project ### Description Start (``docker compose up``) a project. ### Method (Not specified in source, assuming POST based on operation) ### Endpoint (Not specified in source) ### Parameters #### Path Parameters (None specified) #### Query Parameters (None specified) #### Request Body - **project_id** (str) - Required - The UUID of the project. ### Request Example (Not specified in source) ### Response #### Success Response (200) - **result** (dict[str, object]) - Result of the start operation. #### Response Example (Not specified in source) ``` -------------------------------- ### Example return for create_snapshot_lun Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/snapshot.md This is an example of a successful response when creating a snapshot for a LUN, including snapshot ID and UUID. ```json { "data": { "snapshot_id": 4, "snapshot_uuid": "31aa7808-9ffc-4689-bb70-262bb1665c9b" }, "success": true } ``` -------------------------------- ### Install Package Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Installs a package with various options for customization and control. ```APIDOC ## install_package ### Description Installs a specified package onto a volume, with options to check code signing, force installation, run after installation, and provide extra values. ### Parameters #### Path Parameters - **package_id** (str) - Required - Id of the package to install. - **volume_path** (str) - Required - Volume path of the installation, can get from `check_installation` function. - **file_path** (str) - Required - File path of the installation, can get from `check_installation_from_download` function. #### Query Parameters - **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 `{}`. ### Response #### Success Response (200) - **data** (dict) - Message and some info about installation. ### Response Example ```json { "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 } ``` ``` -------------------------------- ### Example Return: Get Task Settings Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/usb_copy.md This JSON structure represents the detailed settings for a specific USB Copy task. It includes conflict policies, source and destination paths, and scheduling information. ```python { "data": { "task": { "conflict_policy": "rename", "copy_file_path": "", "copy_strategy": "versioning", "default_device_port": "NA", "destination_path": "[USB]", "eject_when_task_done": True, "enable_rotation": False, "error_code": 0, "id": 2, "is_default_task": False, "is_ds_mounted": False, "is_task_runnable": False, "is_usb_mounted": False, "latest_finish_time": 1738341351, "max_version_count": 256, "name": "asdf", "next_run_time": "N/A", "not_keep_dir_structure": False, "remove_src_file": False, "rename_photo_video": False, "rotation_policy": "oldest_version", "run_when_plug_in": False, "schedule_id": 13, "smart_create_date_dir": False, "source_path": "/music", "status": "unmounted", "type": "export_general" } }, "success": True } ``` -------------------------------- ### Example Return for Get Logs Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/docker_api.md This JSON structure shows the format of the returned logs from a specified container, including log details and pagination information. ```json { "data": { "limit": 1, "logs": [ { "created": "2025-06-15T10:38:55.869358659Z", "docid": "1", "stream": "stderr", "text": "2025/06/15 10:38:55 Starting server on :8080" } ], "offset": 0, "total": 1 }, "success": true } ``` -------------------------------- ### List Installable Packages Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Retrieves a list of packages that can be installed on the NAS, including beta packages. This is useful for populating an application catalog or suggesting available software. ```json { "data": { "banners": [], "beta_packages": [...], "categories": [...], "packages": [] }, "success": true } ``` -------------------------------- ### Install Synology API via Pip Source: https://github.com/n4s4/synology-api/blob/master/README.md Install the synology-api package using pip. ```bash pip3 install synology-api ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/n4s4/synology-api/blob/master/CONTRIBUTING.md Installs pre-commit hooks to automatically format code and run checks before each commit. Can be installed manually or via 'task install'. ```bash pre-commit install ``` -------------------------------- ### Example TaskScheduler Output Configuration Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/task_scheduler.md This JSON shows an example of the output configuration returned by the `get_output_config` method. It includes details about whether output is enabled and the path where results are stored. ```json { "data": { "enable_output": true, "output_path": "share/scripts_output", "type": "esynoscheduler" }, "success": true } ``` -------------------------------- ### Set Traffic Throttle Example Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_active_backup.md Example of setting global bandwidth control and IP range bandwidth control. Ensure bandwidth is specified in MB/s. IP range supports IPv4 format. ```python ["192.168.0.1", "192.168.0.10"] ``` -------------------------------- ### Example JSON Return for list_logs Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_active_backup.md This is an example of the JSON structure returned by the list_logs method, showing log entries for packages, tasks, and devices. ```json { "count": 1, "logs": [ { "backup_type": 4, "device_id": 6, "device_name": "xxxx", "error_code": 0, "log_id": 5525, "log_level": 0, "log_time": 1741897498, "log_type": 1104, "other_params": { "backup_type": 4, "device_id": 6, "device_name": "xxxx", "platform_type": 0, "task_id": 8, "task_name": "xxxxxxxx", "user_id": 0, "user_name": "" }, "result_id": 592, "task_id": 8, "task_name": "xxxxxxxx", "user_id": 0, "user_name": "" } ] } ``` -------------------------------- ### Install Development Dependencies and Run Pre-commit Hooks Source: https://github.com/n4s4/synology-api/blob/master/PULL_REQUEST_TEMPLATE.md Install development dependencies and run pre-commit hooks locally before opening a pull request. This ensures code quality and adherence to project standards. ```bash pip install -r requirements-dev.txt pre-commit run --all-files ``` -------------------------------- ### installed_package_list Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_sys_info.md Get installed package list. This method retrieves a list of all installed packages on the system. ```APIDOC ## installed_package_list ### Description Get installed package list. ### Returns `dict[str, object] or str` - Installed package list. ``` -------------------------------- ### theme_desktop_get Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_system.md Get desktop theme settings. ```APIDOC ## theme_desktop_get ### Description Get desktop theme settings. ### Returns `dict[str, object] or str` - Desktop theme configuration. ``` -------------------------------- ### feasibility_check_install Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Checks if the installation of specified packages is possible. ```APIDOC ## feasibility_check_install ### Description Check if installation is possible. ### Parameters #### Request Body - **_packages_** (List[str]) - Required - List of package IDs to check for feasibility. ### Returns #### Success Response (200) - **data** (dict) - Feasibility check result. - **success** (bool) - Indicates if the operation was successful. ### Response Example ```json { "data": { "template": "data" }, "success": true } ``` ``` -------------------------------- ### List Installed Packages Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Retrieves a list of all packages currently installed on the NAS. This is useful for displaying installed applications and their versions. Additional fields can be requested to get more details about each package. ```json { "data": { "packages": [ { "additional": { "install_type": "" }, "id": "ActiveBackup-Office365", "name": "Active Backup for Microsoft 365", "timestamp": 1738880043640, "version": "2.5.5-14034" } } }, "success": true } ``` -------------------------------- ### quickstart_info_get Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_service_user.md Retrieves quick start wizard information. This method interacts with the SYNO.Core.QuickStart.Info internal API. ```APIDOC ## quickstart_info_get ### Description Get quick start wizard information. ### Method GET ### Endpoint /webapi/entry.cgi?api=SYNO.Core.QuickStart.Info&method=GetInfo ### Returns #### Success Response - **result** (dict[str, object] or str) - Result of the quickstart info get operation. ``` -------------------------------- ### Example Return for set_package_center_settings (minimal) Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON object illustrates a minimal successful return from `set_package_center_settings`, showing only a subset of the updated configuration. ```json { "data": { "enable_dsm": true, "enable_email": false, "update_channel": "stable" }, "success": true } ``` -------------------------------- ### Get Package Information Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Retrieves detailed information about a specific package, including its status and associated DSM applications. Use this to get the current state and details of an installed package. ```json { "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 } ``` -------------------------------- ### desktop_initdata_get Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_system.md Retrieves the desktop initialisation data. ```APIDOC ## desktop_initdata_get ### Description Get desktop initialisation data. ### Returns `dict[str, object] or str` - Desktop initialisation data. ``` -------------------------------- ### Example return for create Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_group.md This JSON shows the details of a newly created group, including its GID and name. ```json { "data": { "gid": 65541, "name": "new_group" }, "success": true } ``` -------------------------------- ### get_task_list Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/downloadstation.md Get info from a task list containing the files to be downloaded, used after creating a task and before starting the download. ```APIDOC ## get_task_list ### Description 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. ### Parameters #### Query Parameters - **_list_id_** (str) - List ID returned by create_task. #### Returns - **dict[str, any]** - A dictionary containing a task list information. #### Response Example ```json { "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" } } ``` ``` -------------------------------- ### Example Return for Get Result Details Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_active_backup.md This JSON structure represents the expected return format when fetching details for a specific result ID. ```json { "data": { "count": 2, "result_detail_list": [ { "error_code": 0, "log_level": 0, "log_time": 1741897456, "log_type": 6002, "other_params": { "fs_error": -65, "os_name": "smb", "path": "abc", "task_id": 8 }, "result_detail_id": 9526, "result_id": 592 }, { "error_code": 0, "log_level": 0, "log_time": 1741897498, "log_type": 1104, "other_params": { "os_name": "smb", "path": "", "task_id": 8, "task_name": "SMB LAPTOP" }, "result_detail_id": 9527, "result_id": 592 } ] }, "success": true } ``` -------------------------------- ### Get Worker Count Example Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/abm.md Retrieves the current worker counts for Active Backup for Microsoft 365. This is useful for monitoring resource allocation. ```json { "data": { "backup_job_worker_count": 40, "event_worker_count": 40, "max_backup_job_worker_count": 40, "max_event_worker_count": 40 }, "success": true } ``` -------------------------------- ### Example Return for Get Result Output Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/event_scheduler.md This JSON structure shows the expected output when retrieving the specific output for a given event task result. ```json { "data": { "script_in": "hello", "script_out": "/volume3/datastore/scripts_output/asd/1726190267/script.log: line 1: hello: command not found\n" }, "success": true } ``` -------------------------------- ### Example Package Upgrade Return Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON provides a message and package information after an upgrade operation. ```json { "data": { "message": "message", "packageName": "Plex Media Server", "worker_message": [] }, "success": true } ``` -------------------------------- ### Example Return for Get Task Results Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/event_scheduler.md This JSON structure represents the expected return format when retrieving the results list for a specific event task. ```json { "data": [ { "event_fire_time": "2024-09-13 03:17:47", "exit_info": { "exit_code": 0, "exit_type": "stop" }, "extra": {}, "pid": 16058, "result_id": 115, "run_time_env": {}, "start_time": "2024-09-13 03:17:47", "stop_time": "2024-09-13 03:17:47", "task_name": "asd", "trigger_event": "on_demand" } ], "success": true } ``` -------------------------------- ### Basic Usage with IP Address Source: https://github.com/n4s4/synology-api/blob/master/README.md Initialize FileStation and DownloadStation objects using IP address, port, username, and password. Debugging is enabled. ```python from synology_api.filestation import FileStation from synology_api.downloadstation import DownloadStation fs = FileStation( 'Synology Ip', 'Synology Port', 'Username', 'Password', secure=False, cert_verify=False, dsm_version=7, debug=True, otp_code=None ) ds = DownloadStation( 'Synology Ip', 'Synology Port', 'Username', 'Password', secure=False, cert_verify=False, dsm_version=7, debug=True, otp_code=None ) fs_info = fs.get_info() ds_info = ds.get_info() ``` -------------------------------- ### Example Return for get_package_center_infos Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON object represents the detailed information returned by the `get_package_center_infos` function, including configuration, prerelease status, and terms agreement. ```json { "data": { "config": { "auth_key": "------------------------------", "blBetaChannel": false, "blOtherServer": false, "def_void": "", "ds_build": "72806", "ds_major": "7", "ds_minor": "2", "ds_timezone": "Amsterdam", "ds_unique": "synology_r1000_723+", "myPayBaseURL": "https://payment.synology.com", "myds_id": "7886858", "serial": "2260TPR7X30E6", "success": true }, "prerelease": { "agreed": true, "success": true }, "term": { "agreed_term_version": "0003", "curr_term_version": "0003", "success": true } }, "success": true } ``` -------------------------------- ### Get Directory Information Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/directory_server.md Retrieves essential information about your domain, including realm and domain controllers. This is useful for understanding the current Active Directory setup. ```python from synology_api.apis.classes.directory_server import DirectoryServer directory_server = DirectoryServer(synology_client) info = directory_server.get_directory_info() print(info) ``` -------------------------------- ### Setup Virtual Environment Source: https://github.com/n4s4/synology-api/blob/master/CONTRIBUTING.md Creates a virtual environment for the project using Python's venv module, managed by a Taskfile task. ```bash task venv ``` -------------------------------- ### promotion_preinstall_get Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_service_user.md Retrieves pre-install promotion information. This method interacts with the SYNO.Core.Promotion.PreInstall internal API. ```APIDOC ## promotion_preinstall_get ### Description Get pre-install promotion information. ### Method GET ### Endpoint /webapi/entry.cgi?api=SYNO.Core.Promotion.PreInstall&method=GetPreInstall ### Returns #### Success Response - **result** (dict[str, object] or str) - Result of the promotion preinstall get operation. ``` -------------------------------- ### Example Cloud Sync Get Task Cloud Folders Return Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/cloud_sync.md This JSON structure shows the return data for the get_task_cloud_folders function, listing child directories within a specified cloud folder path. ```json { "data": { "children": [ { "exists_type": 1, "file_id": "", "path": "/subfolder_1", "text": "subfolder_1" }, { "exists_type": 1, "file_id": "", "path": "/new folder", "text": "new folder" }, { "exists_type": 3, "file_id": "id:xxxx", "path": "/test1", "text": "test1" }, { "exists_type": 3, "file_id": "id:xxxx", "path": "/test2", "text": "test2" } ] }, "success": true } ``` -------------------------------- ### Example User List Return Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_group.md Illustrates the format of the response when listing users within or outside a specific group. It shows user details like UID, name, and description. ```json { "data": { "offset": 0, "total": 3, "users": [ { "description": "System default user", "name": "admin", "uid": 1024 }, { "description": "", "name": "customAdmin", "uid": 1026 }, { "description": "", "name": "test", "uid": 1032 } ] }, "success": true } ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/n4s4/synology-api/blob/master/documentation/README.md Installs project dependencies using Yarn. ```bash yarn ``` -------------------------------- ### Example return for list Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_iscsi.md This JSON response provides a detailed list of available iSCSI targets, including their configuration and status. ```json { 'data': { 'targets': [ { 'auth_type': 0, 'connected_sessions': [], 'has_data_checksum': False, 'has_header_checksum': False, 'iqn': 'iqn.2025-01.com.synology:raspberry-pi', 'is_default_target': False, 'is_enabled': True, 'mapped_luns': [ { 'lun_uuid': 'f699bc85-3be4-4eb0-9332-020b47143169', 'mapping_index': 1 } ], 'mapping_index': -1, 'max_recv_seg_bytes': 262144, 'max_send_seg_bytes': 262144, 'max_sessions': 1, 'mutual_password': '', 'mutual_user': '', 'name': 'raspberry-pi', 'network_portals': [ {'interface_name': 'all', 'ip': '', 'port': 3260} ], 'password': '', 'status': 'online', 'target_id': 1, 'user': '' }, { 'auth_type': 0, 'connected_sessions': [], 'has_data_checksum': False, 'has_header_checksum': False, 'iqn': 'iqn.2000-01.com.synology:xxx.default-target.xxxxxxx', 'is_default_target': True, 'is_enabled': True, 'mapped_luns': [], 'mapping_index': -1, 'max_recv_seg_bytes': 262144, 'max_send_seg_bytes': 262144, 'max_sessions': 1, 'mutual_password': '', 'mutual_user': '', 'name': 'Synology iSCSI Target', 'network_portals': [ {'interface_name': 'all', 'ip': '', 'port': 3260} ], 'password': '', 'status': 'online', 'target_id': 2, 'user': '' } ] }, 'success': True } ``` -------------------------------- ### Example Power Schedule Return Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/event_scheduler.md A successful response containing the current power-on and power-off tasks configured in the schedule. ```json { "data": { "poweroff_tasks": [], "poweron_tasks": [ { "enabled": true, "hour": 0, "min": 0, "weekdays": "1,2,3,4,5" } ] }, "success": true } ``` -------------------------------- ### Example Return for Package Uninstallation Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md This JSON structure indicates a successful uninstallation of a package, providing a status message. ```json { "data": { "message": "", "worker_message": [] }, "success": true } ``` -------------------------------- ### upload_package_file Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Uploads a file to the system for the purpose of installing a package. This function is a prerequisite for package installation. ```APIDOC ## upload_package_file ### Description Upload a file for install a package. This function returns information about the uploaded file, which is then used for installation. ### Method Not specified (likely internal API call) ### Endpoint Not specified (likely internal API call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **data** (dict) - Informations about the uploaded file for installation. - **success** (bool) - Indicates if the operation was successful. #### Response Example None provided in source. ``` -------------------------------- ### Example Return for Creating a Group Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/directory_server.md Illustrates the expected JSON response when a group is successfully created in the directory. It includes the distinguished name (dn) and netbios name of the newly created group. ```json { "data": { "dn": "CN=My Group,CN=Groups,DC=MY,DC=DOMAIN,DC=COM", "name": "NETBIOSNAME\My Group" }, "success": true } ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/n4s4/synology-api/blob/master/CONTRIBUTING.md Installs all required Python packages for the project, including development dependencies, using pip. ```bash task install-python-deps ``` -------------------------------- ### Example System Resources Return Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/docker_api.md This JSON object represents the return value for a system resources query, detailing CPU, disk, memory, and network usage. ```json { "data" : { "cpu" : { "15min_load" : 14, "1min_load" : 29, "5min_load" : 16, "device" : "System", "other_load" : 2, "system_load" : 0, "user_load" : 1 }, "disk" : { "disk" : [ { "device" : "sata2", "display_name" : "Drive 2", "read_access" : 0, "read_byte" : 0, "type" : "internal", "utilization" : 0, "write_access" : 0, "write_byte" : 0 }, { "device" : "sata1", "display_name" : "Drive 1", "read_access" : 0, "read_byte" : 0, "type" : "internal", "utilization" : 0, "write_access" : 0, "write_byte" : 0 } ], "total" : { "device" : "total", "read_access" : 0, "read_byte" : 0, "utilization" : 0, "write_access" : 0, "write_byte" : 0 } }, "lun" : [], "memory" : { "avail_real" : 444840, "avail_swap" : 4163752, "buffer" : 21716, "cached" : 2658180, "device" : "Memory", "memory_size" : 4194304, "real_usage" : 21, "si_disk" : 0, "so_disk" : 0, "swap_usage" : 7, "total_real" : 3983740, "total_swap" : 4489140 }, "network" : [ { "device" : "total", "rx" : 6822, "tx" : 6336 }, { "device" : "eth0", "rx" : 0, "tx" : 0 }, { "device" : "eth1", "rx" : 0, "tx" : 0 }, { "device" : "eth2", "rx" : 6822, "tx" : 6336 } ], "nfs" : [], "smb" : { "smb_cmd" : [], "smb_cpu" : [], "smb_rwpkt" : [] }, "space" : { "total" : { "device" : "total", "read_access" : 0, "read_byte" : 0, "utilization" : 0, "write_access" : 0, "write_byte" : 0 }, "volume" : [ { "device" : "dm-1", "display_name" : "volume1", "read_access" : 0, "read_byte" : 0, "utilization" : 0, "write_access" : 0, "write_byte" : 0 } ] }, "time" : 1749998465 }, "httpd_restart" : false, "success" : true } ``` -------------------------------- ### Install OS Dependencies Source: https://github.com/n4s4/synology-api/blob/master/CONTRIBUTING.md Installs dependencies required for macOS or Linux environments using provided shell scripts. ```bash # macos bash scripts/dependencies_darwin.sh # linux bash scripts/dependencies_linux.sh ``` -------------------------------- ### Example Site Return Structure Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/abm.md Illustrates the structure of a returned site object, including details like ID, storage usage, owner, and URL. This format is typical for site-related queries. ```json { "description": "", "id": 313, "local_used_storage": 0, "owner_type": 0, "parent_id": "", "primary_admin": "username@xxxx.onmicrosoft.com", "selected": false, "site_collection_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", "site_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", "site_name": "username", "site_root": "https://xxxx-my.sharepoint.com", "site_status": 1, "site_type": 1, "url": "https://xxxx-my.sharepoint.com/personal/username" } ``` -------------------------------- ### Basic Usage with QuickConnect ID Source: https://github.com/n4s4/synology-api/blob/master/README.md Initialize a FileStation object using a QuickConnect ID, username, and password. QuickConnect automatically uses HTTPS. ```python fs = FileStation( quickconnect_id='QuickConnect ID', username='Username', password='Password', cert_verify=False, dsm_version=7, debug=True, otp_code=None ) ``` -------------------------------- ### list_installable Source: https://github.com/n4s4/synology-api/blob/master/documentation/docs/apis/classes/core_package.md Retrieves a list of packages that can be installed on the Synology NAS, including beta packages and categories. ```APIDOC ## list_installable ### Description List installable packages. ### Method GET ### Endpoint /webapi/entry.cgi?api=SYNO.Core.Package.Server&method=ListInstallable&version=1 ### Response #### Success Response (200) - **data** (dict) - List of beta_package, categories and packages available. - **success** (bool) - Indicates if the operation was successful. #### Response Example ```json { "data": { "banners": [], "beta_packages": [...], "categories": [...], "packages": [...] }, "success": true } ``` ```