Forums

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

Listing all pipelines executed in the last 24 hours

Inapurapu, Aditya
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!
September 3, 2024

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'

 

1 answer

0 votes
Adam Brunt
Contributor
September 4, 2024

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

Suggest an answer

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

Atlassian Community Events