Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get raw file content using Stash Rest API

I am able to get raw file content using the Bitbucket REST API, as

https://api.bitbucket.org/1.0/repositories/AccountName/Repo_Slug/raw/master/MyFolder/MyFile.cs,

Is there a equivalent to get it from Stash using Stash Rest API. I couldn't find it here: https://developer.atlassian.com/static/rest/stash/2.0.1/stash-rest.html#resources

like image 770
parsh Avatar asked Dec 28 '12 00:12

parsh


2 Answers

With 1.0 of stash/bitbucket api, you could use the below to get the raw file content

    https://example.com/rest/api/1.0/TES/repos/testrepo/raw/testfile?at=feature/branch
like image 117
velsim Avatar answered Nov 15 '22 20:11

velsim


Just specify the file's URL and append ?raw

http://example.com/projects/TES/repos/testrepo/browse/testfile?raw

As I mentioned, that is not a function of either REST API, it is just the full URL of the file.

like image 30
Eddie Avatar answered Nov 15 '22 22:11

Eddie