Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create a Branch in Bit Bucket using JAVA API.

Naveen Kumar D P
Contributor
June 14, 2019

Hello All,

I am looking for a JAVA rest API to create branch in Bit Bucket repo.

I have tried with the following rest api am not able to get the results.

https://xxxx/rest/api/1.0/projects/xxx/repos/Test/branches{fields:{name:my-feature-branch,{startPoint:master}}}

Please help me on this.

 

Thanks

Naveen

1 answer

0 votes
Aleksandr Zuevich
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 15, 2019

Hi,

I've just tried

curl -X POST \
https://xxx/bitbucket/rest/branch-utils/1.0/projects/xxx/repos/xxx/branches \
-H 'Authorization: Bearer Nxxxq' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"name": "feature/my-feature-branch",
"startPoint": "dev"
}'

and it works perfectly.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira product discovery learning path, product discovery training, idea prioritization, align stakeholders, discovery to delivery, product collaboration, atlassian learning, dev process, roadmap planning, insight capture, team alignment

Elevate Your Skills with Jira Product Discovery!

Unlock your potential and learn how to use Jira Product Discovery to your advantage. You’ll have the expertise to revolutionize ideas and insights, roadmapping, engage and align teams and stakeholders, and deliver the best solutions—faster. Enroll today!

Start Learning
AUG Leaders

Atlassian Community Events