Hi,
I am looking Bitbucket API which can push file into Bitbucket Repo along with developer comment.
Is there any API available which can do this?
Thanks,
Yash
This is the API you're looking for: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/src
Hi,
Thanks, Now i am able to push file on bitbucket but unable to push file along with comments/message. I have used below sample API.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can pass in `message` as either a GET or a POST parameter, as so:
curl -v https://api.bitbucket.org/2.0/repositories/atlassean/test_number_99/src \
-u my_username:$MY_PASSWORD \
-F /beatles/john.txt=john \
-F /beatles/paul.txt=paul \
-F /beatles/ringo.txt=ringo \
-F /beatles/george.txt=george \
-F files=beatles/john.txt \
-F files=beatles/paul.txt \
-F files=beatles/ringo.txt \
-F files=beatles/george.txt \
-F message="Ladies and gentlemen, the Beatles!"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am unable to push code into sub directories of reposiry.
for e.g https://api.bitbucket.org/2.0/repositories/{0000-0000-0000-0000-0000}/etlsftpdataexporterservice/folder1/folder2
What should be format of api? Can you give me any example please.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the example above, beatles/ is a directory. So paths are a part of the file name, not the URL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.