The requested version \”x.x\” of the resource is under preview | Azure DevOps Error

Full Error
The requested version \”x.x1\” of the resource is under preview. The -preview flag must be supplied in the api-version for such requests. For example: \”x.x-preview\””

Sample error
“message”: “The requested version \”5.1\” of the resource is under preview. The -preview flag must be supplied in the api-version for such requests. For example: \”5.1-preview\””,

Solution:
Some API’s are exposed only for preview version and they are not exposed for the final version of API call, so you need to pass preview tag along with the API version

Shan

I am an Azure DevOps expert who has worked on TFS/Azure DevOps from 2012 as part of my job.