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

Filter commits by date using APIs throws exception

Samuele Salvatico December 19, 2022

Hi!

I'm trying to use the file history API to get data related to commits specific to a file.

My request is:

https://api.bitbucket.org/2.0/repositories/works/repo/filehistory/master/file.txt?fields=values.commit.date&pagelen=1&q=commit.date%3E%3D2022-12-15T10:17:15.000Z

I used this as a reference: Docs 

 

But the API is returning this error: 

{
"type":"error",
"error":
{
"message":"Field \"commit.date\" does not support filtering"
}
}

 

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 28, 2022

Hello @Samuele Salvatico ,

Thank you for reaching out to Atlassian Community!

Currently, the List commits that modified a file endpoint of Bitbucket Cloud API does not support filtering by the commit.date field. I understand that by the time I write this message there's an example in the api reference filtering by the commit.date, but this is not currently available and I already informed the team to fix that specific example in the API documentation.

Also, I went ahead and created a feature request to implement the ability to filter by commit.date in that particular endpoint, which you can access using the following link : 

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.

Thank you, @Samuele Salvatico .

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events