Provide File Station information
Returns
Enumerate files in a given folder.
Parameters
Name | Type | Description |
---|---|---|
folder_path | string | Path to the folder. |
filetype | "file" | "dir" | "all" | File type to filter. |
additional | Array<"real_path" | "size" | "owner" | "time" | "perm" | "type" | "mount_point_type"> | Additional fields to return. |
pattern | string | Pattern to filter. |
limit | number | Maximum number of files to return. |
offset | number | Offset of the first file to return. |
sort_by | string | Field to sort by. |
sort_direction | string | Sort direction. |
Returns
List all shared folders.
Parameters
Name | Type | Description |
---|---|---|
limit | number | The maximum number of items to return. |
offset | number | The offset of the first item to return. |
sort_by | string | The field to sort by. |
sort_direction | "ASC" | "DESC" | The sort direction. |
additional | string[] | The additional fields to return. |
onlywritable | boolean | Whether to return only writable folders. |
Returns
List all mount point folders of virtual file system, e.g., CIFS or ISO.
Parameters
Name | Type | Description |
---|---|---|
type | "Nfs" | "cifs" | "iso" | The type of virtual folder. |
limit | number | The maximum number of items to return. |
offset | number | The offset of the first item to return. |
sort_by | string | The field to sort by. |
sort_direction | "ASC" | "DESC" | The sort direction. |
additional | Array<"real_path" | "owner" | "time" | "perm" | "mount_point_type" | "volume_status"> | The additional fields to return. |
Returns
Start to search files according to given criteria. If more than one criterion is given in different parameters, searched files match all these criteria.
Parameters
Name | Type | Description |
---|---|---|
folder_path | string | Path to the folder to search. |
pattern | string | Pattern to filter. |
filetype | "file" | "dir" | "all" | File type to filter. |
recursive | boolean | Whether to search recursively. |
Returns
Stop a search task.
Parameters
Name | Type | Description |
---|---|---|
taskid | string | The task ID. |
Returns
Get the list of search tasks.
Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID. |
additional | string[] | Additional fields to return. |
filetype | "file" | "dir" | "all" | File type to filter. |
limit | number | Limit the number of results. |
offset | number | Offset the results. |
Returns
Delete search temporary database(s).
Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID. |
Returns
Create a folder.
Parameters
Name | Type | Description |
---|---|---|
folder_path | string | Path to the folder. |
name | string | Name of the folder. |
force_parent | boolean | Force to create parent folder. |
additional | Array<"real_path" | "size" | "owner" | "time" | "perm" | "type"> | Additional information. |
Returns
Get favorite list.
Parameters
Name | Type | Description |
---|---|---|
limit | number | Limit the number of results. |
offset | number | Offset the results. |
sort_by | string | Sort by. |
sort_direction | "ASC" | "DESC" | Sort direction. |
additional | Array<"real_path" | "size" | "owner" | "time" | "perm" | "type"> | Additional information. |
status_filter | string | Sort by. |
Returns
Add a folder to user's favorites.
Parameters
Name | Type | Description |
---|---|---|
path | string | Path of the folder to add. |
name | string | Name of the folder. |
index | number | Index of the folder. |
Returns
Delete a folder from user's favorites.
Parameters
Name | Type | Description |
---|---|---|
path | string | Path of the folder to delete. |
Returns
Delete all broken statuses of favorites.
Returns
Get a thumbnail of a file Note:
Parameters
Name | Type | Description |
---|---|---|
path | string | The path of the folder. |
size | string | The size of the thumbnail. |
rotate | number | Optional. Return rotated thumbnail. Rotate Options: 0: Do not rotate. 1: Rotate 90°. 2: Rotate 180°. 3: Rotate 270°. 4: Rotate 360°. |
Returns
Start to calculate size for one or more file/folder paths Parameters
Name | Type | Description |
---|---|---|
paths | string | File/folder paths to calculate size. Multiple paths can be separated by comma "," |
Returns
Stop to calculate size for one or more file/folder paths Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID. |
Returns
Get the status of the size calculating task. Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID. |
Returns
Start calculating the MD5 value of a file. Parameters
Name | Type | Description |
---|---|---|
file_path | string | File path. |
Returns
Stop calculating the MD5 value of a file. Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID. |
Returns
Get the status of the MD5 calculating task. Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID. |
Returns
Check if a logged-in user has write permission to create new files/folders in a given folder. Parameters
Name | Type | Description |
---|---|---|
path | string | Path of the folder. |
filename | string | Name of the file. |
overwrite | boolean | If true, overwrite the file if it already exists. |
create_only | boolean | If true, create the file only if it does not exist. |
Returns
Rename a file or folder. Parameters
Name | Type | Description |
---|---|---|
path | string | Path of the file or folder. |
name | string | New name. |
additional | Array<"real_path" | "size" | "owner" | "time" | "perm" | "type"> | Additional information to return. |
search_taskid | string | Optional. A unique ID for the search task which is obtained from start method. It is used to update the renamed file in the search result. |
Returns
List all background tasks including copy, move, delete, compress and extract tasks. Parameters
Name | Type | Description |
---|---|---|
"limit" | number | Limit the number of tasks returned. Default is 100. |
"offset" | number | Offset the number of tasks returned. Default is 0. |
"sort_by" | string | Sort by. Default is "taskid". |
"sort_direction" | "ASC" | "DESC" | Sort direction. Default is "ASC". |
"api_filter" | string[] | API filter. Default is SYNO.FileStation.CopyMove,SYNO.FileStation.Delete,SYNO.FileStation.Extract or SYNO.FileStation.Compress. |
Returns
Delete all finished background tasks.
Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID |
Returns None
Upload a file to the specified directory.
In the browser, you can use the File object to upload files.
In Node.js, you can use the fs path or Buffer to upload files.
Parameters
Name | Type | Description |
---|---|---|
path | string | The path of the directory where the file will be uploaded. |
file | File | Buffer | string | The file to be uploaded. |
overwrite | boolean | Whether to overwrite an existing file with the same name. Default is false. |
create_parents | boolean | Whether to create parent directories if they do not exist. Default is false. |
Returns
Start deleting file task
Parameters
Name | Type | Description |
---|---|---|
path | string |Array | One or more copied/moved file/folder path(s) starting with a shared folder, separated by commas "," and around brackets. |
accurate_progress | boolean | Whether to calculate the accurate progress. Default is true. |
recursive | boolean | Recursively delete files within a folder |
search_taskid | string | Search task ID |
Returns
Stop a delete task.
Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID |
Returns None
Parameters
Name | Type | Description |
---|---|---|
taskid | string | Task ID |
Returns
get download file url
Parameters
Name | Type | Description |
---|---|---|
path | string | file path |
mode | "download" | "open" |
Returns
Get information of a sharing link by the sharing link ID.
Parameters
Name | Type | Description |
---|---|---|
id | string | Sharing link ID |
Returns
List user's file sharing links.
Parameters
Name | Type | Description |
---|---|---|
offset | number | File sharing link offset |
limit | number | File sharing link limit |
sort_by | string | Sorting field |
sort_direction | "ASC" | "DESC" | Sorting direction |
force_clean | boolean | . If set to false, the data will be retrieved from cache database rapidly. If set to true, all sharing information including sharing statuses and user name of sharing owner will be synchronized. It consumes some time |
Returns
Generate one or more sharing link(s) by file/folder path(s).
Parameters
Name | Type | Description |
---|---|---|
path | string | Array | File/folder path(s) |
password | string | Password for the sharing link |
date_expired | string | The expiration date for the sharing link, written in the format YYYYMM-DD. When set to 0 (default), the sharing link is permanent. |
date_available | string | The available date for the sharing link to become effective, written in the format YYYY-MM-DD. When set to 0 (default), the sharing link is valid immediately after creation |
Returns
Delete one or more sharing links
Parameters
Name | Type | Description |
---|---|---|
id | string | Array | Unique IDs of file sharing link(s) to be deleted, separated by commas "," and around the brackets |
Returns None
Remove all expired and broken sharing links.
Returns None
Edit one or more sharing links
Parameters
Name | Type | Description |
---|---|---|
id | Array | Sharing link IDs |
password | string | Password for the sharing link |
date_expired | string | The expiration date for the sharing link, written in the format YYYYMM-DD. When set to 0 (default), the sharing link is permanent. |
date_available | string | The available date for the sharing link to become effective, written in the format YYYY-MM-DD. When set to 0 (default), the sharing link is valid immediately after creation |
Returns None
Start to copy/move files.
path: string; dest_folder_path: string; overwrite?: boolean; remove_src?: boolean; // true : move filess/folders. false : copy files/folders search_taskid?: string; accurate_progress?: boolean;
Parameters
Name | Type | Description |
---|---|---|
path | string | The path of the file/folder to be copied/moved. |
dest_folder_path | string | The destination folder path. |
overwrite | boolean | Whether to overwrite the destination file/folder. |
remove_src | boolean | true : move filess/folders. false : copy files/folders |
search_taskid | string | The search task ID. |
accurate_progress | boolean | Whether to get accurate progress. |
Returns
Get the status of a copy/move task
Parameters
Name | Type | Description |
---|---|---|
taskid | string | The task ID. |
Returns
Stop a copy/move task.
Parameters
Name | Type | Description |
---|---|---|
taskid | string | The task ID. |
Returns Nune