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?
Could someone tell me why this behavior?
What exactly are you trying to fetch? You may get a list of releases here: Releases - List.
In your case, you are trying to get deployments. Deployments show each deployment (or redeployment) into each environment of a particular release definition.