list

To see the storage folder structure, use the file/list command:

Copied!
svc=file/list&params={"itemId":<long>,
		      "storageType":<uint>,
		      "path":<text>,
   		      "mask":<text>,
	   	      "recursive":<bool>,
		      "fullPath":<bool>}

Parameters

Parameter

Description

itemId

Item ID.

storageType

Storage type:
1 - public (all users can see and download files),
2 - protected (only users with access rights can see and download files).

path

Relative path from the root folder to the file.

mask

File name mask. It can contain the asterisk (*) which replaces 0 or more characters, and the question mark (?) which replaces 1 character. If you specify several masks, separate them by commas.

recursive

Use this flag to specify whether you want the content to be displayed recursively with subdirectories.

fullPath

Use this flag to specify whether you want to see the full path of the items.

Response

If the request is completed successfully, the storage structure is returned. The signature n/c means that the hierarchy item is a folder, the signature n/s means this is a file.

Copied!
[
	{
		"n": <text>,		/* path to the selected folder, starts with "public" or "protected" */
		"c": [			/* root folder content, it can include files and/or folders */
				{	
					"n": <text> 	/* folder name */
					"c": [...]	/* folder content, it can include files and/or folders */
				},

				{
					"n": <text>, 	/* file name */
					"s": <text> 	/* file size (bytes) */
				},
				...
		]
	}
]

If the request hasn’t been completed, an error code is returned.

Error codes

Code

Description

1User not authorized.
4Invalid input parameters.
5Failed to get the list of files at the specified path.
7Insufficient rights to the item specified in the itemId parameter.
Download PDF file
Download Word document

See also