EMI.SYS.FILE.GET
Initiates download of a file from some external source to local temp folder. The progress of file transfer can be followed by issuing emi.sys.file.info mathod with the given file name.
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| session | JSON String | yes | Session ID |
| url | JSON String | yes | Specify the url where the file is to be transferred from |
| filename | JSON String | no | Specify the local file name for the file. If no file name is specified, the file name will be same as the original file name |
Response
No response result returned if request is successful.
Error Codes
| Reference | Description |
|---|---|
| EOK | No errors (contains warnings) |
| EBADPARAM | Error in parameters |
| EGENERAL | Some other error |
| ESESSION | Session with the given ID is not found |
Examples
Request to EMI-RPC Server:
{
"EMI-RPC": "1.0",
"id": 1,
"method": "emi.sys.file.get",
"params": {
"session":"some_session_id",
"url":"http://www.somehost.com/path/file.dat",
"filename":"localfile.dat"
}
}
Response from EMI-RPC Server:
{
"EMI-RPC": "1.0",
"id": 1
}
