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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

The Question is I would like to get the commits and pull requests in a certain time range.

Bharath Reddy
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!
Apr 19, 2023

Hello Community,


I am on the way of creating Grafana Dashboards, I am trying to retrieve the commits for the repository only on a certain time range. May I please know if Bit Bucket cloud supports the since and until feature on the Api end points.

1 answer

0 votes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 20, 2023

Hey Bharath,

Unfortunately - only some of what you are requesting is possible within our API at present.

Our /2.0/repositories endpoint does not support filtering by date for commits, however, you can use GIT commands to retrieve a list of commits since a certain date or before a certain date (you can add --count switch to just show the number):

git rev-list --all --since 2023-01-01
git rev-list --all --before 2023-01-01

As for pull requests, you can use filtering and sorting to pull this information - you will need to encode any query manually or using a tool to convert it to URL format, for example:

//This is the base query unencoded for > than a certain date and < than a certain date{workspaceID}/{reposlug}/pullrequests?<2023-01-01T00:00:00+00:00&state=ALL&pagelen=50{workspaceID}/{reposlug}/pullrequests?>2023-01-01T00:00:00+00:00&state=ALL&pagelen=50

//These are the same queries encoded in URL format{workspaceID}/{reposlug}/pullrequests?{workspaceID}/{reposlug}/pullrequests?

NOTE: You will need to remove the curly braces and replace these with actual values in your cURL command.

We have raised a feature request on your behalf to include date filtering in our commits endpoint:

Please feel free to "Watch" this request to receive updates related to it and "Vote" for it to improve its visibility with regard to customer demand, you can view our feature implementation policy below:

Hope this helps.


- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events