Custom V2 OData queries will be deprecated March 9, 2021
We announced the deprecation of custom V2 OData queries (#37) last year and conducted a dry run in early November to ensure that there are no surprises for users. Going forward, we plan to bring all new features and improvements only to the newer V3 APIs. As part of this strategy, we will begin blocking select endpoints used by 3rd party clients on March 9th, 2021.
Based on server-side telemetry, less than 2% of OData traffic on nuget.org will be blocked by this deprecation effort. By inspecting user agent strings provided in requests to NuGet.org, our team identified and worked with affected 3rd party client implementations to resolve concerns and assist with migration. Over 70% of the deprecated traffic could be identified by user agent, with the remaining traffic either unidentifiable with no or generic user agent, or present at a very low volume.
Note that this is not a deprecation of V2 OData queries utilized by the official client, (e.g. nuget.exe). These supported V2 queries are more scoped than the deprecated OData queries and have been optimized to perform well at scale. The scenarios in the official client that use these supported queries are well-documented and allows the NuGet.org team to make reasonable decisions about future optimizations (e.g. caching). 3rd party clients can continue to make supported V2 queries on nuget.org alongside official client software.
Unfortunately, the V2 protocol was not documented like the V3 protocol and allows for infinite possible query patterns. The breadth of the OData protocol makes enumerating all affected queries impractical.
As a result, determining whether a custom app using the V2 OData feed can be challenging. For ease of testing, we have provided an INT (integration/pre-production) environment that has affected endpoints disabled: https://int.nugettest.org/
In addition, here are some resources to help you with the migration from V2 to V3:
A supported query example can be found here.
A deprecated query example can be found here.
An XML OData error will be returned if the query is deprecated with HTTP status code 400 Bad Request. The OData error code is NuGet.V2.Deprecated.
The full error response looks like this:
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <m:code>NuGet.V2.Deprecated</m:code> <m:message xml:lang="en-US"> The combination of parameters provided to this OData endpoint is no longer supported. Please refer to the following URL for more information about this deprecation: https://aka.ms/nuget/odata-deprecation </m:message> </m:error>
If you need further help in moving your use case to V3 APIs, please reach out to us at email@example.com or by commenting on the discussion issue: NuGet/NuGetGallery#7423
If you are running into issues from a third-party client, we have included a few client-specific resources here: