Is there a way to Export Release Definition using REST API

Copper Contributor

Hi,

 

I'm seeking a method to download or export the release definition in Azure DevOps.

I've already attempted to use the GET method:

$item=  "https://vsrm.dev.azure.com/{org}/{proj}/_apis/release/definitions/527?api-version=6.0"
Invoke-RestMethod -Uri $item -Method Get -Headers @{Authorization = "Basic $encodedPAT"}

 

 

However, this yields a different JSON file.

I aim to view the tasks utilized in the releases, similar to the output JSON file generated when using the "Export" button in the UI.



Thank You..

1 Reply

Okay I found what I need

 

$response.environments.deployPhases.workflowTasks

 

..