read
To read a text file, use the file/read command.
svc=file/read¶ms={
"itemId": <long>,
"storageType": <uint>,
"path": <text>,
"contentType": <uint>
}
Parameters
Parameter | Description |
itemId | Item ID. |
storageType | Storage type: |
path | Relative path from the root folder to the file. |
contentType | Content type. The content can be returned as: |
Response
If the request has been completed successfully, the file content is returned.
{
"content": <content>
}
If the request hasn’t been completed, an error code is returned.
Error codes
Code | Description |
1 | User not authorized. |
3 | File not found. |
4 | Invalid input parameters. |
7 | Insufficient rights to the item specified in the itemId parameter. |