v22.10.7 Release Notes
maiLink Agent Changes
File Push REST API
The maiLink Agent software REST API has been extended to include a new endpoint that allows the Agent to push a file to the Cloud. This can be performed programatically by the Device’s applications software, or can be performed from the command line with a simple Curl instruction.
Files transferred can be of any size. The Agent divides very large files in the sections to better ensure completion of file transfers in the event of connectivity interrupts; transfer will continue if connection is re-established after a connectivity interruption.
The REST API is documented at link.
The JSON message passed to the REST API at localhost:5465 contains the complete path for the file to be uploaded and the destination path in the cloud relative to the storage bucket:
{
"path": "/Users/maidata/files/upload_this.txt",
"destinationPath": "configs/config.txt"
}
Users can access the uploaded files through a table in the maiLink web portal at
Devices > [Device] > File Transfers > Uploaded Files