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

Bitbucket REST API Rate Limiting ?

Jeremy Freeman Feb 26, 2018

I'm downloading a list of commits through the Bitbucket REST API, and I'm running into the flowing message:

AppError: Rate limit for this resource has been exceeded.

There is information on the rate limits here: https://confluence.atlassian.com/bitbucket/rate-limits-668173227.html

However, there isn't a lot of information around how they work, when they reset, or what the timeout is. I would like to modify my download script in a way that can download the full list of commits, while still respecting the limits.

2 answers

0 votes
Ana Retamal Ortiz Atlassian Team Feb 28, 2018

Hi Jeremy, rate limits are divided into one hour windows for both authenticated and unauthenticated requests. To obtain a list of repository commits, the rate is 1,000 requests per hour. Once you reach it you'll need to wait until 1 hour has passed so you can continue sending requests.

Hope this clarifies!

Ana

Jeremy Freeman Feb 28, 2018

So, does that mean If I make 1000 requests from 9:45 to 9:59, I can then make 1000 more requests from 10:01-10:15.

Is the one hour window based on clock time? is it a rolling count? Does it start with the last request?

My workload is bursty, so, I would like some clarification around how it's calculated to better prepare for this.

Yana Bazulina Atlassian Team Mar 01, 2018

Hi Jeremy, 

It's the rolling count I believe , not by clock hour. 

Cheers.

Yana

Jeremy Freeman Mar 03, 2018

Thanks!  Is there no official documentation on this behavior, aside from the above link?

Yana Bazulina Atlassian Team Mar 06, 2018

Hi Jeremy, 

The document linked above is what we have available right now. 

If you do get more questions or need clarification on anything please do get in touch via the community or raise a support ticket with us.

Cheers.

Yana

Jeremy Freeman May 09, 2018

I'm responding to this to add to the documentation.  My tests confirmed that it's a rolling count.

Like # people like this
0 votes
Alok Saldanha May 04, 2018

I may be missing something, but rather than using the API could you clone the entire repo and extract the list of commits locally?

Jeremy Freeman May 07, 2018

I'm not able to find an endpoint to clone the repository from the OAuth Credentials.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,609 views 1 18
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