I've been trying to leverage Sharepoint revision history to compare a report we receive daily to historical data. I've written some stuff in REST and managed to isolate URLs for previous versions, and if I open that link in a browser, it indeed gets the old version.
However, when I pass that to Web.Contents(), it insists on 'helping' and tries to use GetByServerRelativeUrl('_vti_history/.../file.xlsx')/$value. I get that if was for a current file that would be fine, but for version history it is not.
For the time being, I've tricked it into working by using http instead of https, but does anyone have any idea as to how to get it to work correctly, or is this my only option?
That file downloads the version it corresponds with. No problem there. This has the historical data because it's an old version of the same file. I'm comfortable with that process. Let me know if I need to rephrase this part.
However, my issue is the way PowerBi handles that path. If I was downloading a regular file over rest, I would use 'https://tenant.sharepoint.com/_api/GetFileByServerRelativeUrl('[path]')/$value'. For previous versions, I can't use this. I have to use the absolute path as referenced above. PowerBi tries to help me by using the server relative portion of the above path - except you can't do that with _vti_history.
So, what I need is for it to basically use the URL I give it, and not try to help me. The only I seem to be able to get this to work is use http instead of https. I'm wondering if there is another way.