You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I am trying to migrate code that we wrote against gitlab to stash (3.1), one of these is a rest request to get the content as a file.
https://{my-host}/rest/api/1.0/projects/CLOUD/repos/myrepo/browse/package.json
This return the content as a set of lines:
{ "lines": [ { "text": "{" }, { "text": " \"name\": \"my-project\"," } ], "start": 0, "size": 3, "isLastPage": false }
Is there a way to return the raw contents(text, base64) of the file instead of having text-text lines?
Also i can't tell from the rest api how to create or update just a file.
You may not be able to get the raw contents of the file from the REST API, but it's available if you tack on ?raw
to the full URL of the file. For example, hitting https://{my-host}/projects/CLOUD/repos/myrepo/browse/package.json?raw
should return the raw contents of that file.
Thanks! Spent a lot of time trying to use the REST API to get the raw file, until I read this post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just use 'raw' in place of 'browse' and it should work.
https://{my-host}/rest/api/1.0/projects/CLOUD/repos/myrepo/raw/package.json
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.