synology-api

repository·master·Indexed 20 days ago

https://github.com/n4s4/synology-api

A Python wrapper for the Synology NAS API that supports both synchronous and asynchronous usage patterns. It provides programmatic interaction with various Synology services, including FileStation, DownloadStation, Active Backup for Microsoft 365, Docker, SurveillanceStation, and core system services like storage, security, and network management.

Tokens
100.6K
Snippets
253
Records
630
Agent score
69%

What's inside synology-api

  1. Overview of the TaskScheduler API

    master

    The TaskScheduler API provides functionality to manage and monitor scheduled tasks on a Synology device. It allows you to retrieve scheduler settings, inspect current tasks, and perform actions such as running, creating, deleting, or enabling/disabling tasks.

    Supported Capabilities

    Getters (Retrieving Information):

    • Retrieve a list of all tasks.
    • Retrieve specific task information.
    • Retrieve task results.
    • Retrieve the output path configured for task results.

    Setters (Modifying Configuration):

    • Configure the output path for task results.
    • Update task settings.

    Actions (Executing Commands):

    • Run a task immediately.
    • Create a new task.
    • Delete an existing task.
    • Enable or disable a task.
  2. Overview of the CoreNetwork API

    master

    The CoreNetwork API provides implementation for SYNO.Core.Network.* endpoints on Synology NAS. It covers network configurations that are not available in the SysInfo module.

    Key capabilities include:

    • 802.1X authentication
    • IPv6 configuration
    • MAC cloning
    • Open vSwitch (OVS) management
    • PPPoE relay
    • Static routes and traffic control
    • UPnP
    • VPN helpers
    • Wake on LAN (WoL)
  3. Overview of the CloudSync API

    master

    The CloudSync API implementation allows you to manage Synology Cloud Sync settings, connections, and tasks. You can retrieve information about package configurations, inspect connection details (including auth and logs), and manage syncing processes. It also supports setting configurations for tasks and connections, as well as performing actions like pausing/resuming connections or deleting tasks.

    Note on Cloud Compatibility: Because of the large number of supported public clouds, the API may not have been tested for every specific cloud provider. Some parameters might be missing for untested clouds.

    Tested Cloud Providers:

    • Google Drive
    • OneDrive
    • DropBox
    • Amazon S3 (specifically for task creation)
  4. Manage Synology groups with the Group class

    master

    The Group class provides a comprehensive interface for managing user groups on a Synology NAS. It allows you to perform administrative tasks such as retrieving group metadata, managing group membership, and configuring access controls.

    Key Capabilities

    Retrieving Information (Getters):

    • Get general group information.
    • List members or non-members of a specific group.
    • Retrieve bandwidth control (speed limit) settings.
    • Retrieve quota settings.
    • Retrieve share permissions.

    Modifying Configuration (Setters):

    • Update group names and descriptions.
    • Configure group quotas for specific shares.
    • Configure group permissions for specific shares.
    • Set speed limits for specific shares.
    • Manage group membership by adding or removing users.
    • Create new groups or delete existing ones.
  5. Use the Snapshot class for Snapshot Replication APIs

    master

    The Snapshot class provides an interface for managing snapshots and replication tasks on Synology devices. Because official documentation for these specific APIs is unavailable, the implementation is derived from network inspection.

    Use this class to perform the following operations:

    Getters

    • Retrieve all share or LUN snapshots.
    • Retrieve all replication tasks.
    • Retrieve all LUNs.

    Setters

    • Configure snapshot attributes.

    Actions

    • Create share or LUN snapshots (Note: WORM support is currently only available for share snapshots).
    • Delete share or LUN snapshots.
    • Trigger a replication sync.