rm

To delete a file, use the file/rm method.

Copied!
svc=file/rm&params={
    "itemId": <long>,
    "storageType": <uint>,
    "path": <text>
}

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.

Response

If the request is completed successfully, you will receive an empty response.

Copied!
{}   /* empty json */

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

Error codes

Error code Description
1 User not authorized.
4 Invalid input parameters.
5 File not found.
7 The item specified in the itemId parameter isn’t found, the storageType value is invalid, or you have no View and download files and Upload and delete files access rights to the item.

If you find a mistake in the text, please select it and press Ctrl+Enter.