rm
To delete a file, use the file/rm method.
svc=file/rm¶ms={
"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. |
To clear public or protected storage totally, use “path”:“/” in your request.
Response
If the request is completed successfully, you will receive an empty response.
{} /* 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. |