Closed eddiewebb closed 4 years ago
We are likely to first add a way to list recent pipelines, each of which would know its workflow IDs. We might also add a way to query directly to recent workflows for a project and/or triggerer, but that's still TBD.
A listing of all pipelines (ideally still supporting the filters, including date :D) that included their workflow IDs would be perfectly sufficient for my use cases.
@eddiewebb you can now retrieve recent pipelines for a project using GET /project/:project_slug/pipeline/
Woot!
https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/api-changes.md#get-projectproject_slugpipeline is light on details.
We don’t yet have any filtering. Recent really means ordered descending by date. The endpoint is paginated.
Current Preview endpoints include specific workflows (GET /workflow/:id) and project details (GET /project/:project_slug) but no way to get the list of workflows for a project. This feels like a gap given our V1 API allowed all jobs for a project, and without a listing/index I don't understand where the workflow_ID would come from unless running inside a job.
This endpoint is important for essentially any API call that needs to discover workflow IDs, statuses, etc.
It would be particularly useful for my Queuing orb to understand all running workflows for the current project since querying individual jobs can have a race condition in the transitions between jobs. https://github.com/eddiewebb/circleci-queue/issues/26