Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I retrieve commit data from git tag that has slashes via rest api

Hi everyone.

 

I am trying to retrieve commit data for a tag that has slashes in the name.  

Ex tag: 

release/2020-09-23-v3.13.4

I am using the following rest GET call but getting a 404 error.

https://git.server.com/rest/api/1.0/projects/TEST/repos/test/commits/release/2020-09-23-v3.13.4

Is there a way I can properly format this call to retrieve the commit data for the tag above?

Thank you so much for your help.

1 answer

Encode the forward slash, dash and period characters in UTF-8 format, like:

release%2F2020%2D09%2D23%2Dv3%2E13%2E4

 

Thank you for your response.

 

It still produces an error:

 

<title>HTTP Status 400 – Bad Request</title>

 

Interestingly if you trying to do a range of commits between 2 tags with the same naming scheme using params since and until.  Same commits endpoint works without any issues.  Its only a problem when I want to get commit data for one tag.  Maybe there is another call that would give me that data?

Like Earl McCutcheon likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,757 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you