Forums

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

bitbucket api query all commits

Hise Chapman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 6, 2017

I'm trying to query a repository for all the commits on a specific date.  I believe I have formatted the q= parameter correctly....

 

https://api.bitbucket.org/2.0/repositories/<our name>/<repo name>/commits?q=date%3E%3D2017-10-05+AND+date%3C2017-10-06&page=1

(basically: date >= 2017-10-05 AND date < 2017-10-06)

however, this date criteria is being ignored all all commits are being returned.

 

After reading the support page, at: https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering

it seems like I'm doing thing correctly; but, what am I missing?

2 answers

1 vote
Shawn Miller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 27, 2018

Did you ever figure this out, running into same issue as you...

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2017

Hi Hise, looks like you might be missing some '+' signs. Also, you can try adding the "updated_on" like in the example provided on that article, so for you it would look like:

https://api.bitbucket.org/2.0/repositories/<our name>/<repo name>/commits?q=updated_on+%3E+%3D+2017-10-05+AND+updated_on+%3C+2017-10-06&page=1

Let us know if that worked for you!

Regards,

Ana

Hise Chapman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 10, 2017

Here's sample of the commits json object that is returned.....

I want to return commits where "date" is a specific date.  I've updated my call with the additional + signs you mentioned.  The image below is the result of this call....

https://api.bitbucket.org/2.0/repositories/<ourname>/<ourrepo>/commits?q=date+%3E+%3D+2017-10-05+AND+date+%3C+2017-10-06&page=1

commit sample.png

Parag Sahu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 29, 2019

No, it's working I am getting, all data 

I want data between two specify data  

Adam Goldschmidt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2020

Not working for me too. Any fix for the date / updated_on filter?

Like Maksym Doroshenko likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events