curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "/home/user/Documents/Final_Report.docx"}' \
--output Final_Report.docx
curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "C:\\Users\\user\\Documents\\Report.xlsx"}' \
--output Report.xlsx
curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "/home/user/Pictures/diagram.png"}' \
--output diagram.png
[Binary file content - save to file]
{
"error": "File not found: /home/user/Documents/nonexistent.docx"
}
Data Plane
File
Download a file from the VM’s file system
POST
/
file
curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "/home/user/Documents/Final_Report.docx"}' \
--output Final_Report.docx
curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "C:\\Users\\user\\Documents\\Report.xlsx"}' \
--output Report.xlsx
curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "/home/user/Pictures/diagram.png"}' \
--output diagram.png
[Binary file content - save to file]
{
"error": "File not found: /home/user/Documents/nonexistent.docx"
}
Downloads a file from the VM’s file system. Use this to retrieve files created or modified during agent tasks.
Replace
VM_API_IP:PORT with the actual IP and port of the VM’s Desktop Environment API server.Request Body
Response
Returns binary file content. Save the response directly to a local file.curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "/home/user/Documents/Final_Report.docx"}' \
--output Final_Report.docx
curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "C:\\Users\\user\\Documents\\Report.xlsx"}' \
--output Report.xlsx
curl -X POST "http://VM_API_IP:PORT/file" \
-H "Content-Type: application/json" \
-d '{"path": "/home/user/Pictures/diagram.png"}' \
--output diagram.png
[Binary file content - save to file]
{
"error": "File not found: /home/user/Documents/nonexistent.docx"
}