President Camacho
President Camacho

Reputation: 1900

How to start a specific stage in a release using Azure DevOps Rest API

I came around this API to create a release.

But there seems to be no property in the request body where I can specific a certain stage to be released?

Is there another way I can do it?

Upvotes: 2

Views: 2052

Answers (1)

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41545

First of all, you need to create the release with the API you provided, after that, you need to use the Update Release Environment API to start the stage (environment = stage):

PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}?api-version=5.1-preview.6

Body:

{
  "status": "inProgress",
  "scheduledDeploymentTime": null,
  "comment": null,
  "variables": {}
}

Upvotes: 5

Related Questions