Forums

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

Require API to list down the commits between two commits

Meetrajsinh Solanki
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 26, 2025

Require API to list down the commits between two commits.

Is there any API or parameter through which we can get the list of commits between two commits?

1 answer

1 accepted

0 votes
Answer accepted
Aron Gombas _Midori_
Community Champion
August 27, 2025

There is this "universal" endpoint to list commits using various criteria:

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commits-get

I think we used this in the past, and AI tells me that you can parametrize it like this:

GET https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commits/?include={end_commit}&exclude={start_commit}

...where:

include={end_commit} → the commit you want to reach to
exclude={start_commit} → the commit you want to start from
{workspace} → your Bitbucket workspace ID
{repo_slug} → your repository slug
Meetrajsinh Solanki
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 28, 2025

@Aron Gombas _Midori_ Thank you for reply. This is resolved my question.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events