0

I have several repositories with RAML, Swagger, and json-schemas hosted in corporate bitbucket (on-prem deployed, previously called Atlassian Stash). These files have relative references to other files.

I need to load these hosted files from web application from specified bitbucket namespace, repo & branch, without implementing any additional server with hosted checked out files (this requires one more server, synchronisation, maintenance, and further corresponding problems).

Also, I want to perform direct requests to bitbucket (stash), because this will bring all access features support out of the box: you will able to see only files you have access to.

Best way to implement this - implement raw subdomain, like it is implemented in GitHub. You specify path (namespace, repo, branch, filepath) and get raw file, e.g. raw.git.your-company.com/NAMESPACE/repo/branch/path-to-file.ext

Is it possible (and how?) To implement with Atlassian stash? I know that you can append every file with ?raw parameter and stash will return it in raw format. But hosted files can contain relative references, that will not contain ?raw parameter, so it will not work.

double-beep
  • 5,031
  • 17
  • 33
  • 41
avasin
  • 9,186
  • 18
  • 80
  • 127

1 Answers1

0

Update: This is now possible from Bitbucket Server (formerly known as Stash) in version 4.7

Previously: Currently this isn't available I'm afraid, but it is something we're planning to add. You can watch this feature suggestion for updates

Rog
  • 4,075
  • 2
  • 24
  • 35
  • by your link I see `fixed` but `/rest/api/1.0/projects/WIR/repos/python-learning/raw/Archive.zip?at=refs/heads/feature/files` return 404 – Vitaly Zdanevich Jun 28 '16 at 12:03
  • @VitalyZdanevich, it is not a REST url. Try it without the /rest/api/1.0 part – Rog Jun 30 '16 at 01:47