I have a powershell script which grabs a file from one of our repositories via the REST 1.0 API but I see that's being depreciated and retired soon(ish).
I'm trying to update my code to grab the file using the 2.0 REST API but having a lot of trouble.
Before trying to write code I'm simply trying to get a curl request to work. I'm using the following:
curl <span>--user myuser@mydomain.com:redacted </span>"https://api.bitbucket.org/2.0/repositories/MyCompany/myrepo/downloads/Scripts/Environment Setup/test.txt"
Enter host password for user 'myusername@mydomain.com': redacted
{"type": "error", "error": {"message": "Resource not found", "detail": "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation at: https://developer.atlassian.com/bitbucket/api/2/reference/"}}
Why am I getting resource not found? Is download the right API call to download a file or should I be using something else?
Thanks,
Brad