Skip to content

Commit 5bcb463

Browse files
committed
Clarify nuget.exe list protocol (NuGet#1299)
1 parent 8cf144c commit 5bcb463

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

docs/api/overview.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ Non-breaking protocol changes have been made to the API since it was first relea
5353

5454
The **service index** describes a variety of resources. The current set of supported resources are as follows:
5555

56-
Resource name | Required | Description
57-
---------------------------------------------------------------------- | -------- | -----------
56+
Resource name | Required | Description
57+
---------------------------------------------------------------------- | -------- | -----------
5858
[`PackagePublish`](package-publish-resource.md) | yes | Push and delete (or unlist) packages.
5959
[`SearchQueryService`](search-query-service-resource.md) | yes | Filter and search for packages by keyword.
6060
[`RegistrationsBaseUrl`](registration-base-url-resource.md) | yes | Get package metadata.
6161
[`PackageBaseAddress`](package-base-address-resource.md) | yes | Get package content (.nupkg).
6262
[`SearchAutocompleteService`](search-autocomplete-service-resource.md) | no | Discover package IDs and versions by substring.
6363
[`ReportAbuseUriTemplate`](report-abuse-resource.md) | no | Construct a URL to access a "report abuse" web page.
64-
[`RepositorySignatures`](repository-signatures-resource.md) | no | Get certificates used for repository signing.
65-
[`Catalog`](catalog-resource.md) | no | Full record of all package events.
66-
[`SymbolPackagePublish`](symbol-package-publish-resource.md) | no | Push symbol packages.
64+
[`RepositorySignatures`](repository-signatures-resource.md) | no | Get certificates used for repository signing.
65+
[`Catalog`](catalog-resource.md) | no | Full record of all package events.
66+
[`SymbolPackagePublish`](symbol-package-publish-resource.md) | no | Push symbol packages.
6767

6868
In general, all non-binary data returned by a API resource are serialized using JSON. The response schema
6969
returned by each resource in the service index is defined individually for that resource. For more information about
@@ -79,6 +79,26 @@ that the implementation does not understand should be ignored.
7979
> report abuse URL (tracked by [NuGet/Home#4924](https://github.com/NuGet/Home/issues/4924)). Other clients may opt
8080
> to simply not show a report abuse URL to the user.
8181
82+
### Undocumented resources on nuget.org
83+
84+
The V3 service index on nuget.org has some resources that are not documented above. There are a few reasons for not
85+
documenting a resource.
86+
87+
First, we don't document resources used as an implementation detail of nuget.org. The `SearchGalleryQueryService`
88+
falls into this category. [NuGetGallery](https://github.com/NuGet/NuGetGallery) uses this resource to delegate some V2
89+
(OData) queries to our search index instead of using the database. This resource was introduced for scalability reasons
90+
and is not intended for external use.
91+
92+
Second, we don't document resources that never shipped in an RTM version of the official client.
93+
`PackageDisplayMetadataUriTemplate` and `PackageVersionDisplayMetadataUriTemplate` fall into this category.
94+
95+
Thirdly, we don't document resources that are tightly coupled with the V2 protocol, which itself is intentionally
96+
undocumented. The `LegacyGallery` resource falls into this category. This resource allows a V3 service index to point to
97+
a corresponding V2 source URL. This resource supports the `nuget.exe list`.
98+
99+
If a resource is not documented here, we *strongly* recommend that you do not take a dependency on them. We may remove
100+
or change the behavior of these undocumented resources which could break your implementation in unexpected ways.
101+
82102
## Timestamps
83103

84104
All timestamps returned by the API are UTC or are otherwise specified using

docs/faqs/NuGet-FAQ.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,13 @@ If that fails, try the [tips mentioned in this StackOverflow post](http://stacko
232232

233233
## What is the API endpoint for nuget.org?
234234

235-
To use nuget.org as a package repository with NuGet clients, you would need to use the following V3 API endpoint:
235+
To use nuget.org as a package repository with NuGet clients, you should use the following V3 API endpoint:
236236

237237
**`https://api.nuget.org/v3/index.json`**
238238

239-
Older clients can still use the v2 protocol to reach nuget.org. However, please note, NuGet clients 3.0 or later will have slower and less-reliable service using the v2 protocol:
239+
Older clients can still use the V2 protocol to reach nuget.org. However, please note, NuGet clients 3.0 or later will have slower and less-reliable service using the V2 protocol:
240240

241-
`https://www.nuget.org/api/v2/` (DEPRECATED!!!) **Note:** the "www." is important.
242-
243-
Additionally, *NuGet.exe List* only works with the v2 protocol.
241+
`https://www.nuget.org/api/v2` (DEPRECATED!!!) **Note:** use "www." for the best reliability.
244242

245243
## nuget.org account management
246244

0 commit comments

Comments
 (0)