REST API: Ability to sort and filter Pipelines by branch and other properties

Issue #14000 open
Samuel Tannous staff created an issue

I'd like a way to sort and filter Pipelines by various properties, for example to find the latest successful pipeline for a specific branch of a repository.

Comments (9)

  1. Pau Sanchez

    Being able to publish and link build artifacts is useless from a programmatic point of view if you can't get them back later easily.
    https://confluence.atlassian.com/bitbucket/publish-and-link-your-build-artifacts-872137736.html

    By looking at the current API (as for 2017-12-07) there is no simple way of retrieving the last successful build along with all the information from that build. Being able to do this for a particular branch would be even better.

    One example of why this would be useful is when you have multiple projects and you want to download last successful build from one project and use it in another. In jenkins you can accomplish this very easily by using "lastSuccessfulBuild" REST API.

  2. Ricardo Machado

    Any expectations on when this would be picked up? It's a very interesting feature, specially for the cases where you need to get all pipelines open to be able to stop them and retrigger them (say master has changed, you need to redeploy all branches depending on it).

  3. Mitchell Suzuki

    I would also love this ability.

    I want to be able to get the most recent build for a specific branch...
    Without parsing the most recent builds until I find the one for that specific branch.

    EDIT:: Also, apparently, the pipelines endpoint does not return a next value. I have to increase my page size to view more builds.
    EDIT EDIT:: To view more builds, page can be passed as a parameter.

  4. Cyril Auburtin

    /pipelines/?sort=-created_on&target.ref_name=some-branch&state.result.name=SUCCESSFUL would be ideal, else it's a nightmare (loop through pages) to fetch the latest successful build for a given branch, for example (the sort part works, not the target.ref_name)

  5. Alexander Kirilov

    +1

    I have started building a simple application allowing our team to manage multi repository deployments from a centralized place and this feature will surely be of help to us.

  6. Log in to comment