Reputation: 379
Looking at Operations on Virtual Machines, I see that there are many management tasks that I can do through the REST API. Is there any way I can stream a file, e.g. something like "GET/{filePath}"
where {filePath}
is like d:\stuff\somefile.txt
or \\somenetworkpath\foo\bar.html
?
Upvotes: 0
Views: 376
Reputation: 10940
No there is no direct way to get a file Path from Azure VM through REST API.
It's also not a secure manner to provide file Path using REST API
If you really want to access the File from outside the VM. You need to configure the FTP/SFTP for your file Path in Azure VM. This way it will be a secure way to access your files.
But remember that you will not get the filepath(d:\stuff\somefile.txt)
using this. You will get access to the file(s) alone which is more likely as \\somenetworkpath\foo\bar.html
Upvotes: 2