Hello Greg Smith,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to download a file from Azure DevOps using the Curl command.
The URL and token need to be accurately set, and the curl
command will look like this:
curl -u myPAT: \
"https://dev.azure.com/hc-it-ops/MyProject/_apis/git/repositories/WebSphere/items?path=/Repo/Files/windows_test.yml&api-version=7.1-preview" \
--output windows_test.yml
What you should note in above command is that the Correct API URL where /hc-it-ops/MyProject/
organization or your Azure DevOps organization name, and the name of your project. Then, myPAT is a need to authenticate using a personal access token (PAT). You'll pass this token in the Authorization
header. You can create a PAT in Azure DevOps under "User settings > Personal access tokens."
Then, make sure you have the correct permissions to access the file in the repository, and the file path is exactly as it appears in your repo (case-sensitive).
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.