skip to Main Content

I have powershell code where I am trying to fetch the releases using azure devops rest api and able to do it successfully I am using below rest Api. Only the issue which I am facing is when I check from azure portal it is having more releases of that particular deployments whereas rest api is giving me only top 6-7 release information?

GET https://vsrm.dev.azure.com/fabrikam/A13d3daac-03b8-4a23-9cc4-2c3de65dab63/_apis/release/deployments?definitionId=38&api-version=7.1-preview.2

Could someone tell me why this behavior?

2

Answers


  1. What exactly are you trying to fetch? You may get a list of releases here: Releases – List.

    GET 
    https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?definitionId={definitionId}&api-version=7.2-preview.8
    

    In your case, you are trying to get deployments. Deployments show each deployment (or redeployment) into each environment of a particular release definition.

    Login or Signup to reply.
  2. The reason why you are not getting all the releases under a release definition is because the API is paginating the results. You can use $top and continuationToken to get all the releases of the release definition.

    This is an example for a different requirement for your reference

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search