tried using this,
curl -G -H "Authorization: Bearer {mmpvgTwfY54A5Nv3Ggmsm35GULHwEsBlx3P1h_t5yrPwYbPZfm7T8xGtqUtc6thNcGvkzm1EBm6BFcKDtVY=}" -H "Accept: application/json" "https://api.bitbucket.org/2.0/repositories/ifs-pd/ifs-applications/pipelines/" --data-urlencode 'sort=-created_on'
and it worked!
BUT this API end point doesn't seem to respond to any query params. Tried using --data-urlencode "q=created_on > 2020-10-17" for example, but it simply doesn't work. Returns the same JSON document that lists all of the pipelines.
Tried a few other end points like e.g.
curl -G -H "Authorization: Bearer {QwpvgYrfw69Z5Nv3Qgmsm3m8ULHwEsBlx3P1h_t5yrPwYbPZfmV78xGtqUtc6thNcGvkzm1EBm6BFcKTHVY=}" -H "Accept: application/json" "https://api.bitbucket.org/2.0/repositories/ifs-pd/ifs-applications/pullrequests/" --data-urlencode 'sort=-created_on&page=2' and they worked as documented.
Has anybody tried using the REST API for Bitbucket cloud pipelines? Would appreciate any explanation/insight.
Thanks!
FWIW, this seems like a duplicate of https://community.atlassian.com/t5/Bitbucket-questions/Query-Bitbucket-API-for-occurrences-of-a-custom-pipeline/qaq-p/1441389
@kuwilk hello, we actually have a pipe that may cover your needs (look at https://bitbucket.org/atlassian/bitbucket-build-statistics/src/master/) This pipe gather statistics of run pipelines builds for given (or current) repository for n days.
Or if it does not cover what you'd like to implement, tell in more detail, what do you want to get from the build, what info?
Also look at bitbucket api doc
and
Cheers, Galyna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.