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

Need to get the changed,added,removed files between two commits

Currently, when configuring a webhook to trigger on a code push event in Bitbucket Cloud, the payload does not include information about the specific files that have changed. Does Bitbucket Cloud provide a dedicated API endpoint to directly retrieve the changed, added, or deleted files between two commits? 

I have done some search and identified the following endpoint which includes all the changes which is not scalable.{workspace}/{repo}/diff/{commit1}..{commit2}

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2023

Hello @yashodperera ,

Thank you for reaching out to Atlassian Community!

I think what you are looking for can be achieved using the diff stat endpoint : 

This endpoint should return a JSON object containing all the files that were added,removed,modified or renamed by comparing two commits.

Following is an example of an API call using that endpoint, which will compare the files changed between two commits : 

curl -X GET -u USERNAME:APPPASSWORD<workspace>/<repository>/diffstat/f179ff7..00f0e77

 The first commit is the commit you want to see the changes. The second commit represents the state to which we want to compare the first commit.

If you provide only one commit ID to that endpoint, it will calculate the diff spec against the first parent of the specified commit.

Hope that helps! Let me know in case you have any questions.

Thank you, @yashodperera !

Patrik S

Hi @Patrik S Thank you you are a lifesaver.

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events