I would like to read or download files from a volume using the ONTAP Rest API. The “storage/file/copy” is not appropriate as the destination is a container. I can read the files using “storage/volumes/{volume.uuid}/files/{path}…” however the output contains unwanted content. In an example file that contains two lines: “This is a test file.” and Lorem… The result is:
--b62dcee24b2e7920
Content-Disposition: form-data; name="bytes_read"
Content-Type: text/plain
469
--b62dcee24b2e7920
Content-Disposition: form-data; filename="NewTest.txt"
Content-Type: application/octet-stream
This is a test file.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
--b62dcee24b2e7920--
Is there a way to make an exact copy of files using the API?