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

How can I use date filters in bitbucket commits and pipelines REST APIs

Bhargavi Chanboina July 13, 2022

Hi ,
I am using  bitbucket commits and pipelines REST APIs
I want to fetch only the commits that are created after a particular date
For that I used q filter as mentioned in documentation https://developer.atlassian.com/cloud/bitbucket/rest/intro/?utm_source=%2Fbitbucket%2Fapi%2F2%2Freference%2Fmeta%2Ffiltering&utm_medium=302#filtering

But it is not working.

Here is my query 
https://api.bitbucket.org/2.0/repositories/amanrajqentelli/opup/commits?q=date%3C%222017-01-01%2000:00%22

Could you please help me figure out how to use date filters in commits and pipelines?

1 answer

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

Hello @Bhargavi Chanboina ,

Welcome to Atlassian Community!

I'm afraid that filtering is currently not available for the commits and pipelines endpoints, but we already have the feature requests below to implement that functionality :

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.

While this feature is not implemented, you can retrieve all pipelines or commits using the APIs and then use an external tool that filters JSON data, like jq, to filter the results.

Thank you, @Bhargavi Chanboina .

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events