Synology.Api.Client 0.3.81

dotnet add package Synology.Api.Client --version 0.3.81                
NuGet\Install-Package Synology.Api.Client -Version 0.3.81                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Synology.Api.Client" Version="0.3.81" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Synology.Api.Client --version 0.3.81                
#r "nuget: Synology.Api.Client, 0.3.81"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Synology.Api.Client as a Cake Addin
#addin nuget:?package=Synology.Api.Client&version=0.3.81

// Install Synology.Api.Client as a Cake Tool
#tool nuget:?package=Synology.Api.Client&version=0.3.81                

Synology API Client (.NET/C#) Build status Test status NuGet Version NuGet Downloads

A client written in .NET/C# for the Synology API - https://www.synology.com/en-us/support/developer#tool

⚠️ WORK IN PROGRESS

I've only implemented the endpoints that I'm currently using but please feel free to request changes or submit contributions.

Usage:

const string dsmUrl = "http://192.168.0.1:5001/";

var client = new SynologyClient(dsmUrl);

// Retrieve all API description objects
var apiInfo = await client.InfoApi().QueryAsync();

// Authenticate
await client.LoginAsync("username", "password");

// List all shares
var shares = await client.FileStationApi().ListEndpoint().ListSharesAsync();

// Upload file
var uploadResult = await client.FileStationApi().UploadEndpoint().UploadAsync("path_to_file", "destination");

// End session
await client.LogoutAsync(session);

APIs Implemented

SYNO.API Methods
Auth login logout
Info query
SYNO.FileStation Methods
List list list_share
Search start list
Upload upload
CopyMove start status stop
CreateFolder create
Extract start status stop list
SYNO.DownloadStation Methods
Info Info GetConfig SetServerConfig
Task List Create Delete Pause Resume

Example on how to ignore certificate validation for e.g. self signed certificates:

You need to inject your own HttpClient with a modified HttpClientHandler.

const string dsmUrl = "http://192.168.0.1:5001/";

var handler = new HttpClientHandler();
//This disables all certificate validation. It is not recommended (especially in production)!
handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true;

var httpClient = new HttpClient(handler);

var client = new SynologyClient(dsmUrl, httpClient);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.81 84 12/15/2024
0.3.80 88 12/14/2024
0.3.77 74 12/14/2024
0.3.76 82 12/14/2024
0.3.75 70 12/14/2024
0.3.74 75 12/13/2024
0.2.68 201 9/23/2024
0.2.66 86 9/23/2024
0.2.62 455 7/2/2024
0.2.60 1,367 3/6/2024
0.2.57 762 9/23/2023
0.2.56 145 9/23/2023
0.2.55 185 9/15/2023
0.2.53 206 7/29/2023
0.2.52 158 7/28/2023
0.2.49 392 3/10/2023
0.2.46 243 3/8/2023
0.2.42 371 2/22/2023
0.2.37 271 2/17/2023
0.2.32 268 2/16/2023
0.2.27 259 2/13/2023
0.2.23 266 2/11/2023
0.1.22 282 2/10/2023
0.1.20 314 1/13/2023
0.1.18 1,698 11/20/2022
0.1.17 345 11/20/2022
0.1.13 427 9/20/2022
0.1.9 494 7/10/2021
0.1.8 356 7/10/2021
0.1.7 341 7/6/2021
0.1.6 329 7/2/2021
0.1.5 320 7/2/2021
0.1.4 374 4/23/2021
0.1.3 358 4/20/2021
0.1.2 349 4/19/2021