I need to list all bitbucket pipelines executed in the last 24 hours using the REST API. I came across this community question https://community.atlassian.com/t5/Bitbucket-questions/Re-How-to-get-latest-pipelines-from-API/qaq-p/2071074/comment-id/83462#M83462
and tried using the following REST API query, but all pipelines were returned while I was expecting only a handful of them to be returned. What am I missing?
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines?sort=-created_on&q='created_on>2024-09-02'
Not an answer but I am beginning to think that filtering on the pipelines endpoint does NOT work or, at the very least, the REST documentation is badly written (or even wrong).
For example, the post you link to works but according to documentation there is nothing about filtering on "status" which isn't even a property returned by the endpoint :(
Having said that, the first thing you need to do is use URL encoding in your URL; for example, change the '>' to its %xx equivalent.
But as I said, I am not entirely convinced that it works as well as the REST documentation says it does
EDIT: According to https://community.atlassian.com/t5/Bitbucket-questions/BitBucket-API-repository-Pipelines-search-query/qaq-p/2027370 filtering on the pipeline endpoint DOES NOT work
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.