### C# Synology API Client Workflow Example Source: https://context7.com/plneto/synology.api.client/llms.txt This C# example demonstrates a full workflow using the Synology API Client. It covers querying API info, authenticating, listing file shares, listing files within a share, checking download station tasks, and ensuring proper logout. It requires the Synology.Api.Client NuGet package. ```csharp using Synology.Api.Client; using Synology.Api.Client.Apis.FileStation.List.Models; const string dsmUrl = "http://192.168.0.1:5001/"; const string username = "username"; const string password = "password"; var client = new SynologyClient(dsmUrl); try { // Query API info (no authentication required) var apiInfo = await client.InfoApi().QueryAsync(); Console.WriteLine($"Connected to DSM with Auth API v{apiInfo.AuthApi?.MaxVersion}"); // Authenticate await client.LoginAsync(username, password); Console.WriteLine("Successfully logged in"); // List all shares var shares = await client.FileStationApi().ListEndpoint().ListSharesAsync(); Console.WriteLine($"Found {shares.Total} shares"); // List files in the first share if (shares.Shares.Any()) { var firstShare = shares.Shares.First(); var request = new FileStationListRequest(firstShare.Path); var files = await client.FileStationApi().ListEndpoint().ListAsync(request); Console.WriteLine($"Files in {firstShare.Name}:"); foreach (var file in files.Files) { Console.WriteLine($" - {file.Name} ({file.Additional?.Size} bytes)"); } } // Check Download Station tasks var tasks = await client.DownloadStationApi().TaskEndpoint().ListAsync(); Console.WriteLine($"Active downloads: {tasks.Total}"); } finally { // Always logout await client.LogoutAsync(); Console.WriteLine("Logged out"); } ``` -------------------------------- ### Get Download Station Info and Configuration Source: https://context7.com/plneto/synology.api.client/llms.txt Retrieves information about the Download Station service, its version, and current server configuration, including default download paths and speed limits. Requires login credentials. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // Get Download Station info var info = await client.DownloadStationApi().InfoEndpoint().InfoAsync(); Console.WriteLine($"Version: {info.VersionString}"); // Get server configuration var config = await client.DownloadStationApi().InfoEndpoint().GetConfigAsync(); Console.WriteLine($"Default destination: {config.DefaultDestination}"); Console.WriteLine($"BT Max Download: {config.BtMaxDownloadSpeed} KB/s"); Console.WriteLine($"HTTP Max Download: {config.HttpMaxDownloadSpeed} KB/s"); await client.LogoutAsync(); ``` -------------------------------- ### Get Download Station Info Source: https://context7.com/plneto/synology.api.client/llms.txt Retrieve information about the Download Station service and its current configuration. ```APIDOC ## Get Download Station Info ### Description Retrieve information about the Download Station service and its current configuration. ### Method GET ### Endpoint /download-station/info ### Parameters None ### Request Example None ### Response #### Success Response (200) - **versionString** (string) - The version of the Download Station. - **defaultDestination** (string) - The default destination folder for downloads. - **btMaxDownloadSpeed** (integer) - The maximum download speed for BitTorrent in KB/s. - **httpMaxDownloadSpeed** (integer) - The maximum download speed for HTTP in KB/s. #### Response Example { "versionString": "3.1.10-1234", "defaultDestination": "/volume1/downloads", "btMaxDownloadSpeed": 5000, "httpMaxDownloadSpeed": 0 } ``` -------------------------------- ### Search Files on Synology NAS Source: https://context7.com/plneto/synology.api.client/llms.txt Shows how to initiate a file search on the NAS and poll for results. The process involves starting a search task and using the returned TaskId to list the found files. ```csharp using Synology.Api.Client; using Synology.Api.Client.Apis.FileStation.Search.Models; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // Start a search var searchRequest = new FileStationSearchStartRequest { FolderPath = "/DataVault", Recursive = true, Pattern = "*.pdf", Extension = "pdf" }; var searchResult = await client.FileStationApi().SearchEndpoint().StartAsync(searchRequest); string taskId = searchResult.TaskId; // Poll for results (check 'finished' flag) var results = await client.FileStationApi().SearchEndpoint() .ListAsync(taskId, offset: 0, limit: 100); foreach (var file in results.Files) { Console.WriteLine($"Found: {file.Name} at {file.Path}"); } await client.LogoutAsync(); ``` -------------------------------- ### Copy and Move Files on Synology NAS Source: https://context7.com/plneto/synology.api.client/llms.txt Explains how to perform asynchronous copy and move operations. Users can start an operation and monitor its progress via the TaskId. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); var sourcePaths = new[] { "/my_share/docs/file1.pdf", "/my_share/docs/file2.pdf" }; var destination = "/my_share/archive"; // Start copy operation var copyResult = await client.FileStationApi().CopyMoveEndpoint() .StartCopyAsync(sourcePaths, destination, overwrite: false); // Start move operation var moveResult = await client.FileStationApi().CopyMoveEndpoint() .StartMoveAsync(sourcePaths, destination, overwrite: true); // Check operation status var status = await client.FileStationApi().CopyMoveEndpoint() .GetStatusAsync(copyResult.TaskId); Console.WriteLine($"Progress: {status.Progress}%"); Console.WriteLine($"Finished: {status.Finished}"); // Stop operation if needed await client.FileStationApi().CopyMoveEndpoint().StopAsync(copyResult.TaskId); await client.LogoutAsync(); ``` -------------------------------- ### Manage Download Tasks Source: https://context7.com/plneto/synology.api.client/llms.txt Get detailed task information, pause, resume, and delete download tasks. ```APIDOC ## Manage Download Tasks ### Description Get detailed task information, pause, resume, and delete download tasks. ### Method GET, POST, DELETE ### Endpoint /download-station/task/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the task to manage. #### Request Body (for Pause, Resume, Delete) - **ids** (array of strings) - Required - An array of task IDs to perform the action on. - **forceComplete** (boolean) - Optional (for Delete) - Whether to force completion before deleting. ### Request Example (Get Info) None ### Request Example (Pause/Resume) { "ids": ["dbid_123", "dbid_456"] } ### Request Example (Delete) { "ids": ["dbid_123"], "forceComplete": false } ### Response #### Success Response (200 - Get Info) - **title** (string) - The title of the task. - **status** (string) - The current status of the task. #### Success Response (200 - Pause/Resume/Delete) - **success** (boolean) - Indicates if the action was performed successfully. #### Response Example (Get Info) { "title": "Example File", "status": "downloading" } #### Response Example (Pause/Resume/Delete) { "success": true } ``` -------------------------------- ### Ignore Certificate Validation for Synology API Client in C# Source: https://github.com/plneto/synology.api.client/blob/master/README.md Provides an example of how to configure the Synology API client to ignore SSL certificate validation, which is useful for self-signed certificates. This involves creating a custom HttpClient with a modified HttpClientHandler. ```csharp 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); ``` -------------------------------- ### Initialize Synology Client Source: https://context7.com/plneto/synology.api.client/llms.txt Demonstrates how to instantiate the SynologyClient using a DSM URL. It also shows how to inject a custom HttpClient for scenarios requiring specific configurations like self-signed certificate validation. ```csharp using Synology.Api.Client; const string dsmUrl = "http://192.168.0.1:5001/"; var client = new SynologyClient(dsmUrl); var handler = new HttpClientHandler(); handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true; var httpClient = new HttpClient(handler); var client = new SynologyClient(dsmUrl, httpClient); ``` -------------------------------- ### Initialize and Use Synology API Client in C# Source: https://github.com/plneto/synology.api.client/blob/master/README.md Demonstrates how to initialize the Synology API client with a DSM URL, authenticate using username and password, and perform common operations like listing file shares and uploading files. It also shows how to end the session. ```csharp 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); ``` -------------------------------- ### List Files and Folders Source: https://context7.com/plneto/synology.api.client/llms.txt Demonstrates how to enumerate files and directories within a specific path, supporting advanced features like pagination, sorting, and file filtering. ```csharp using Synology.Api.Client; using Synology.Api.Client.Apis.FileStation.List.Models; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); var request = new FileStationListRequest("/DataVault/Documents"); var files = await client.FileStationApi().ListEndpoint().ListAsync(request); await client.LogoutAsync(); ``` -------------------------------- ### POST /FileStation/CreateFolder Source: https://context7.com/plneto/synology.api.client/llms.txt Creates one or more directories on the Synology NAS. ```APIDOC ## POST /FileStation/CreateFolder ### Description Create one or more folders on the NAS. Optionally create parent directories if they don't exist. ### Method POST ### Endpoint /webapi/entry.cgi?api=SYNO.FileStation.CreateFolder ### Parameters #### Request Body - **paths** (array) - Required - List of folder paths to create. - **createParentFolders** (boolean) - Optional - Create parent directories if missing. ### Request Example { "paths": ["/my_share/projects/2024/q1"], "createParentFolders": true } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the folders were created. #### Response Example { "success": true } ``` -------------------------------- ### Create Folders on Synology NAS Source: https://context7.com/plneto/synology.api.client/llms.txt Provides a method to create one or more directories on the NAS. Includes an option to automatically generate parent directories if they do not exist. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // Create folders (will create parent folders if needed) var paths = new[] { "/my_share/projects/2024/q1", "/my_share/projects/2024/q2" }; var result = await client.FileStationApi().CreateFolderEndpoint() .CreateAsync(paths, createParentFolders: true); await client.LogoutAsync(); ``` -------------------------------- ### Create New Download Task Source: https://context7.com/plneto/synology.api.client/llms.txt Initiates a new download task by providing a URI, which can be an HTTP, FTP, magnet, or ED2K link, and specifying the destination folder on the Synology server. Requires login. ```csharp using Synology.Api.Client; using Synology.Api.Client.Apis.DownloadStation.Task.Models; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // Create download from HTTP URL var httpRequest = new DownloadStationTaskCreateRequest( uri: "http://example.com/file.zip", destination: "/downloads/files" ); var result1 = await client.DownloadStationApi().TaskEndpoint().CreateAsync(httpRequest); // Create download from magnet link var magnetRequest = new DownloadStationTaskCreateRequest( uri: "magnet:?xt=urn:btih:HASH&dn=filename", destination: "/downloads/torrents" ); var result2 = await client.DownloadStationApi().TaskEndpoint().CreateAsync(magnetRequest); await client.LogoutAsync(); ``` -------------------------------- ### Create Download Task Source: https://context7.com/plneto/synology.api.client/llms.txt Create a new download task from HTTP, FTP, magnet links, or ED2K links. ```APIDOC ## Create Download Task ### Description Create a new download task from HTTP, FTP, magnet links, or ED2K links. ### Method POST ### Endpoint /download-station/task/create ### Parameters #### Request Body - **uri** (string) - Required - The URI of the file to download (HTTP, FTP, magnet, ED2K). - **destination** (string) - Required - The destination folder for the download. ### Request Example { "uri": "http://example.com/file.zip", "destination": "/downloads/files" } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the task was created successfully. - **id** (string) - The ID of the newly created task (if successful). #### Response Example { "success": true, "id": "dbid_789" } ``` -------------------------------- ### Upload Files to Synology NAS Source: https://context7.com/plneto/synology.api.client/llms.txt Demonstrates how to upload files to a Synology NAS using the File Station API. Supports uploading from local file paths, byte arrays, and streams with optional overwrite functionality. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // Upload from file path var result1 = await client.FileStationApi().UploadEndpoint() .UploadAsync(@"C:\myfile.txt", "/my_share/docs", overwrite: true); // Upload from byte array var fileBytes = File.ReadAllBytes(@"C:\myfile.txt"); var result2 = await client.FileStationApi().UploadEndpoint() .UploadAsync(fileBytes, "myfile.txt", "/my_share/docs", overwrite: true); // Upload from stream using var stream = File.OpenRead(@"C:\largefile.zip"); var result3 = await client.FileStationApi().UploadEndpoint() .UploadStreamAsync(stream, "largefile.zip", "/my_share/backups", overwrite: false); await client.LogoutAsync(); ``` -------------------------------- ### Configure Download Station Server Settings Source: https://context7.com/plneto/synology.api.client/llms.txt Modifies Download Station server settings such as speed limits for downloads and uploads, enables/disables the unzip service, and sets the default download destination. Requires administrator privileges and login. ```csharp using Synology.Api.Client; using Synology.Api.Client.Apis.DownloadStation.Info.Models; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("admin", "password"); // Set server configuration (only changed parameters are updated) var newConfig = new DownloadStationServerConfig( btMaxDownloadSpeed: 5000, // 5000 KB/s btMaxUploadSpeed: 1000, // 1000 KB/s httpMaxDownloadSpeed: 0, // Unlimited defaultDestination: "/downloads", unzipServiceEnable: true ); await client.DownloadStationApi().InfoEndpoint().SetServerConfigAsync(newConfig); await client.LogoutAsync(); ``` -------------------------------- ### Authenticate and Manage Sessions Source: https://context7.com/plneto/synology.api.client/llms.txt Shows how to perform user authentication, including optional two-factor authentication, check the current login status, and properly terminate the session via logout. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); await client.LoginAsync("username", "password", "123456"); bool isLoggedIn = client.IsLoggedIn; await client.LogoutAsync(); ``` -------------------------------- ### List All Download Tasks Source: https://context7.com/plneto/synology.api.client/llms.txt Retrieves a list of all current download tasks within the Download Station, including their unique IDs, titles, file types, sizes, and current status. Requires login. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // List all download tasks var tasks = await client.DownloadStationApi().TaskEndpoint().ListAsync(); foreach (var task in tasks.Tasks) { Console.WriteLine($"ID: {task.Id}"); Console.WriteLine($"Title: {task.Title}"); Console.WriteLine($"Type: {task.Type}"); Console.WriteLine($"Size: {task.Size} bytes"); Console.WriteLine($"Status: {task.Status}"); } await client.LogoutAsync(); ``` -------------------------------- ### Manage Individual Download Tasks Source: https://context7.com/plneto/synology.api.client/llms.txt Provides functionality to retrieve detailed information for a specific download task, pause, resume, or delete tasks using their unique IDs. Requires login. ```csharp using Synology.Api.Client; using Synology.Api.Client.Apis.DownloadStation.Task.Models; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // Get detailed info for a specific task var taskInfo = await client.DownloadStationApi().TaskEndpoint() .GetInfoAsync("dbid_123"); Console.WriteLine($"Title: {taskInfo.Title}"); Console.WriteLine($"Status: {taskInfo.Status}"); // Pause tasks await client.DownloadStationApi().TaskEndpoint() .PauseAsync("dbid_123", "dbid_456"); // Resume tasks var resumeResult = await client.DownloadStationApi().TaskEndpoint() .ResumeAsync("dbid_123", "dbid_456"); // Delete tasks var deleteRequest = new DownloadStationTaskDeleteRequest { Ids = new[] { "dbid_123" }, ForceComplete = false }; var deleteResult = await client.DownloadStationApi().TaskEndpoint() .DeleteAsync(deleteRequest); await client.LogoutAsync(); ``` -------------------------------- ### List Download Tasks Source: https://context7.com/plneto/synology.api.client/llms.txt Retrieve all current download tasks with their status and progress information. ```APIDOC ## List Download Tasks ### Description Retrieve all current download tasks with their status and progress information. ### Method GET ### Endpoint /download-station/task/list ### Parameters #### Query Parameters - **type** (string) - Optional - Filter tasks by type (e.g., "all", "bt", "http", "ftp", "emule", "nzb"). - **status** (string) - Optional - Filter tasks by status (e.g., "all", "downloading", "paused", "error", "finished"). ### Request Example None ### Response #### Success Response (200) - **tasks** (array) - An array of download task objects. - **id** (string) - The unique ID of the task. - **title** (string) - The title of the download task. - **type** (string) - The type of the download task (e.g., "bt", "http"). - **size** (integer) - The size of the download in bytes. - **status** (string) - The current status of the task (e.g., "downloading", "finished"). #### Response Example { "tasks": [ { "id": "dbid_123", "title": "Example File", "type": "http", "size": 10485760, "status": "downloading" } ] } ``` -------------------------------- ### POST /FileStation/Search Source: https://context7.com/plneto/synology.api.client/llms.txt Initiates an asynchronous search for files on the NAS and polls for results. ```APIDOC ## POST /FileStation/Search ### Description Search for files by name pattern or extension. The search is asynchronous - start the search, then poll for results. ### Method POST ### Endpoint /webapi/entry.cgi?api=SYNO.FileStation.Search ### Parameters #### Request Body - **folderPath** (string) - Required - The root folder to search in. - **pattern** (string) - Optional - File name pattern. - **extension** (string) - Optional - File extension filter. ### Request Example { "folderPath": "/DataVault", "pattern": "*.pdf", "recursive": true } ### Response #### Success Response (200) - **taskId** (string) - The ID used to poll for results. #### Response Example { "taskId": "task_12345" } ``` -------------------------------- ### Configure Download Station Source: https://context7.com/plneto/synology.api.client/llms.txt Modify Download Station server settings including speed limits and default destinations. Requires admin privileges. ```APIDOC ## Configure Download Station ### Description Modify Download Station server settings including speed limits and default destinations. Requires admin privileges. ### Method PUT ### Endpoint /download-station/config ### Parameters #### Request Body - **btMaxDownloadSpeed** (integer) - Optional - The maximum download speed for BitTorrent in KB/s. Set to 0 for unlimited. - **btMaxUploadSpeed** (integer) - Optional - The maximum upload speed for BitTorrent in KB/s. Set to 0 for unlimited. - **httpMaxDownloadSpeed** (integer) - Optional - The maximum download speed for HTTP in KB/s. Set to 0 for unlimited. - **defaultDestination** (string) - Optional - The default destination folder for downloads. - **unzipServiceEnable** (boolean) - Optional - Whether the unzip service is enabled. ### Request Example { "btMaxDownloadSpeed": 5000, "btMaxUploadSpeed": 1000, "httpMaxDownloadSpeed": 0, "defaultDestination": "/downloads", "unzipServiceEnable": true } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the configuration was updated successfully. #### Response Example { "success": true } ``` -------------------------------- ### POST /FileStation/Upload Source: https://context7.com/plneto/synology.api.client/llms.txt Uploads files to the Synology NAS from local paths, byte arrays, or streams. ```APIDOC ## POST /FileStation/Upload ### Description Uploads files to the Synology NAS. Supports file paths, byte arrays, and streams with an option to overwrite existing files. ### Method POST ### Endpoint /webapi/entry.cgi?api=SYNO.FileStation.Upload ### Parameters #### Request Body - **file** (binary/string) - Required - The file content, path, or stream. - **folderPath** (string) - Required - Destination directory on the NAS. - **overwrite** (boolean) - Optional - Whether to overwrite existing files. ### Request Example { "filePath": "C:\\myfile.txt", "folderPath": "/my_share/docs", "overwrite": true } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the upload was successful. #### Response Example { "success": true } ``` -------------------------------- ### Extract Archives on Synology NAS Source: https://context7.com/plneto/synology.api.client/llms.txt Details how to list contents of compressed files and perform asynchronous extraction on the NAS. Includes status checking and task termination. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); // List files in an archive var archiveContents = await client.FileStationApi().ExtractEndpoint() .ListFilesAsync("/my_share/backups/archive.zip"); foreach (var item in archiveContents.Items) { Console.WriteLine($"Archive item: {item.Name}, Size: {item.Size}"); } // Start extraction var extractResult = await client.FileStationApi().ExtractEndpoint() .StartAsync("/my_share/backups/archive.zip", "/my_share/extracted", overwrite: true); // Check extraction status var status = await client.FileStationApi().ExtractEndpoint() .GetStatusAsync(extractResult.TaskId); // Stop extraction if needed await client.FileStationApi().ExtractEndpoint().StopAsync(extractResult.TaskId); await client.LogoutAsync(); ``` -------------------------------- ### Authentication API Source: https://context7.com/plneto/synology.api.client/llms.txt Endpoints for managing user sessions on the Synology NAS. ```APIDOC ## POST /auth/login ### Description Authenticates a user with the Synology DSM and establishes a session. ### Method POST ### Endpoint /webapi/auth.cgi ### Parameters #### Request Body - **username** (string) - Required - DSM username - **password** (string) - Required - DSM password - **otp_code** (string) - Optional - Two-factor authentication code ### Request Example { "username": "admin", "password": "secret", "otp_code": "123456" } ### Response #### Success Response (200) - **sid** (string) - Session ID for subsequent requests ## POST /auth/logout ### Description Invalidates the current session and logs the user out. ### Method POST ### Endpoint /webapi/auth.cgi ``` -------------------------------- ### List Shared Folders Source: https://context7.com/plneto/synology.api.client/llms.txt Retrieves a list of all shared folders on the NAS, returning metadata such as folder names and paths. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); await client.LoginAsync("username", "password"); var shares = await client.FileStationApi().ListEndpoint().ListSharesAsync(); foreach (var share in shares.Shares) { Console.WriteLine($"Share Name: {share.Name}"); } await client.LogoutAsync(); ``` -------------------------------- ### Query API Information Source: https://context7.com/plneto/synology.api.client/llms.txt Retrieves metadata about available Synology APIs, including paths and versioning information, which is useful for endpoint discovery. ```csharp using Synology.Api.Client; var client = new SynologyClient("http://192.168.0.1:5001/"); var apiInfo = await client.InfoApi().QueryAsync(); Console.WriteLine($"Auth API Path: {apiInfo.AuthApi?.Path}"); ``` -------------------------------- ### File Station API Source: https://context7.com/plneto/synology.api.client/llms.txt Endpoints for managing files, folders, and shares on the Synology NAS. ```APIDOC ## GET /filestation/list_share ### Description Retrieves a list of all shared folders available on the NAS. ### Method GET ### Endpoint /webapi/entry.cgi?api=SYNO.FileStation.List&method=list_share ### Response #### Success Response (200) - **shares** (array) - List of shared folder objects ## GET /filestation/list ### Description Lists files and subfolders within a specific directory path. ### Method GET ### Endpoint /webapi/entry.cgi?api=SYNO.FileStation.List&method=list ### Parameters #### Query Parameters - **folder_path** (string) - Required - The path to list - **offset** (int) - Optional - Pagination offset - **limit** (int) - Optional - Number of items to return - **sort_by** (string) - Optional - Field to sort by ### Response #### Success Response (200) - **files** (array) - List of file/folder objects ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.