0

I want to get releases, which state is only in progress, but when I send request https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?definitionId={definitionId}&api-version=5.1 to get all releases and see, which field is responsible for release state I see, that all releases have status active.

I thought I must use https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?definitionId={definitionId}&statusFilter=active&api-version=5.1, but that is wrong way for my target task.

What should I use? Thanks you in advance!

kosmičák
  • 1,043
  • 1
  • 17
  • 41

1 Answers1

0

That's because you're looking at the wrong API. You need to use the deployments API and specify deploymentStatus for querying the status of deployments.

The API you're using queries the overall status of a given release, not the individual stages. The JSON returned contains information about the stages, but you can't filter the stages based on their current status with that API.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120