Craete a Tag on Master

Muddassir Farooq March 19, 2018

Hey, How can I create a tag on head of master using bitbucket Api. Please answer example.

1 answer

0 votes
Prasanth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hey Mudassir,

If you are using Bitbucket server you can use something like

curl -k -X POST -u admin -H "Content-Type: application/json" -d '{ "name": "my-tag", "startPoint": "ae66dd8d1c85b69d527f0648314b7eabf37d2d7b", "message": "my-tag" }' <Your Bitbucket URL>/rest/api/1.0/projects/myf/repos/repo_one/tags

Replace the commit ID in  "startPoint": "ae66dd8d1c85b69d527f0648314b7eabf37d2d7b"  with the one you want to tag and provide appropriate tag details. Also make sure you use the correct username.

More details on REST API can be found here REST API -Tags

 

Regards,

Prasanth - Atlassian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events