"The requested version "6.1" of the resource is under preview."
Azure DevOps Server 2020 Update 1 names 6.1 as its newest REST API version. But in some parts of the API, the Git calls among them, 6.1 is still a preview. A call with api-version=6.1 there is refused with HTTP 400.
The whole message
The requested version "6.1" of the resource is under preview. The -preview flag must be supplied in the api-version for such requests. For example: "6.1-preview"
Where we saw it
A freshly installed Azure DevOps Server 2020 Update 1 (2020.1.2 Express, October 15, 2026):
api-version=9.9gave HTTP 400: "The latest REST API version this server supports is 6.1." (that message)- The Git calls with
api-version=6.1, starting with{project}/_apis/git/repositories/{repository}, then gave HTTP 400 with the message above. - The same calls with
api-version=6.0all worked: listing, diff, comments, votes, completing.
The two answers fit together: 6.1 is the newest version anywhere on the server, and parts of the API have not released it.
How to fix the call
- Use 6.0. It is the released version on Azure DevOps Server 2020, and every pull request call we tried worked with it.
- Or do what the message says:
api-version=6.1-preview. We did not need it. Microsoft notes that preview versions can be turned off after the API is released, so a script you keep is safer on 6.0.
Microsoft on versions and previews: REST API versioning for Azure DevOps.
In IntelliJ IDEA, Rider and the other JetBrains IDEs
Azure DevOps Pull Requests is a pull request plugin for JetBrains IDEs 2024.1 or later. When a server answers "under preview", it steps down to the .0 version of the same line (6.0 here) and keeps it for that server. Reading is free; voting, commenting and completing are Pro, with a 30-day trial.
Get it on JetBrains Marketplace
More: "The latest REST API version this server supports is…" · 日本語