How to get the current stage running in an Azure DevOps pipeline build?

Viewed 416

Using this endpoint only shows overall pipeline run status:

https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs/{runId}

Using this endpoint can check stage status, but not of a specific run:

https://dev.azure.com/{organization}/{project}/_apis/build/status/{definition}?stageName=[stage]

I want to get the current stage running in a pipeline build in Azure DevOps. So for example, there are multiple runs ongoing, I want to be able to get which stage each run is in.

1 Answers
Related