Is it possible to have a link to raw content of file in Azure DevOps

0 votes
It's possible to generate a link to raw content of the file in GitHub, is it possible to do with VSTS/DevOps?
Mar 16 in DevOps & Agile by Edureka
• 13,640 points
219 views

1 answer to this question.

0 votes
https://dev.azure.com/{{organization}}/{{project}}/_apis/sourceProviders/{{providerName}}/filecontents
  ?repository={{repository}}
  &path={{path}}
  &commitOrBranch={{commitOrBranch}}
  &api-version=5.0-preview.1
But where do you look for these variables' values? Your current url should look like this if you go into Azure DevOps, choose Repos > Files from the left navigation, and select a specific file:

https://dev.azure.com/{{organization}}/{{project}}/_git/{{repository}}?path=%2Fpackage.json

For organisation, project, and repository, you should use those values. An HTTP encoded version of the unix file path appears in path. Because / is encoded as percent 2F in HTTP, the path is just /package.

You either know what you want for this value or you should use master, so commit or branch is very self-explanatory. Because the documentation presently leads to this version of the API, I've "hard-coded" it in the above URI.

You'll need providerName as the final variable. TfsGit is, in a nutshell, the best option. This value was obtained by searching the list of source providers for one that has a supportedCapabilities value of true. queryFileContents.

answered Mar 24 by gaurav
• 13,560 points

Related Questions In DevOps & Agile

+1 vote
2 answers

is it possible to assign a Feature/User Story/Task to a team [Group] in VSTS

In most cases, we would break Work ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points
3,799 views
+13 votes
2 answers
0 votes
1 answer

Is it possible to preserve local ivy repository in Bluemix BUILD & DEPLOY?

You're right--the pipeline spins up a new ...READ MORE

answered Jul 19, 2018 in DevOps & Agile by Atul
• 10,230 points
190 views
+1 vote
2 answers
0 votes
1 answer

Is it possible to to create IIS Site and application Pool using Web Deploy

You can try and use the ServerManager ...READ MORE

answered Apr 20, 2018 in DevOps & Agile by ajs3033
• 7,280 points
1,089 views
0 votes
4 answers

Is it possible to integrate sonarqube with LDAP

Add the following lines in your config ...READ MORE

answered Apr 29, 2019 in DevOps & Agile by Wazir
2,964 views
0 votes
1 answer

is it possible to use swagger with vs2017

Yes, you can use swagger in a ...READ MORE

answered Apr 29, 2018 in DevOps & Agile by DareDev
• 6,890 points
176 views
0 votes
1 answer

Is it possible to access Couchbase by terminal?

What you want to accomplish isn't possible ...READ MORE

answered Apr 29, 2018 in DevOps & Agile by DareDev
• 6,890 points
244 views
0 votes
1 answer

Azure DevOps Wiki: How can I link the subpages in the parent page?

Unfortunately, Azure Devops does not have the ...READ MORE

answered Mar 8 in DevOps & Agile by gaurav
• 13,560 points
58 views
0 votes
1 answer

Azure DevOps Wiki: How can I link the subpages in the parent page?

Unfortunately, Azure Devops does not have the ...READ MORE

answered Mar 8 in DevOps & Agile by gaurav
• 13,560 points
430 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP