write
To write text content into a file, use the file/write method:
svc=file/write¶ms={
   "itemId":<long>,
   "storageType":<uint>,
   "path":<text>,
   "content":<text>,
   "writeType":<uint>,
   "contentType":<uint>
}
Parameters
| Parameter | Description | 
| itemId | Item ID. | 
| storageType | Storage type: | 
| path | Relative path from the root folder to the file. | 
| content | File content. | 
| writeType | Write type: | 
| contentType | Content type. The content can be returned as: | 
Response
If the request is completed successfully, an empty response is returned.
{} /* empty json */
Otherwise, an error code is returned.
Error codes
| Code | Description | 
| 1 | User not authorized. | 
| 4 | Invalid input parameters. | 
| 5 | Failed to overwrite the file because a file with the same name already exists and "writeType":2 is specified. | 
| 7 | Insufficient rights to the item specified in the itemId parameter. |