NuGet v3 endpoints
The subset of the v3 protocol implemented by SharpDocs.
SharpDocs implements the minimum slice of the NuGet v3 protocol needed for dotnet restore and the Visual Studio package manager to consume a folder of nupkgs.
All routes are under /v3 and served by NuGetController.
GET /v3/index.json
Service index. Advertises the resources below. The @id values are built from the incoming request, so the feed works behind reverse proxies without configuration.
Resources advertised:
PackageBaseAddress/3.0.0— flatcontainerRegistrationsBaseUrl/3.6.0and/VersionedSearchQueryService(+3.0.0-beta,3.0.0-rc)SearchAutocompleteService(+3.0.0-rc)
`GET /v3/flatcontainer/
List of versions for a package id. Returns 404 when the id is unknown.
{ "versions": ["1.0.0", "1.1.0", "2.0.0"] }
`GET /v3/flatcontainer/
Downloads the nupkg. The file segment must match {id}.{version} exactly (case-insensitive).
`GET /v3/flatcontainer/
Extracts and returns the nuspec from the nupkg.
`GET /v3/registration/
Registration index. Returns a single page with one leaf per version. Each leaf includes:
catalogEntrywith id, version, description, authors, tags, license expression, project URL, dependency groupspackageContentURL pointing at the flatcontainer nupkg
GET /v3/search
Query parameters:
q— optional, matched (case-insensitive) against id, description, and tagsskip— default0take— default20prerelease— accepted but currently ignored (all packages are listed)
Returns the latest version per id, paged.
GET /v3/autocomplete
Query parameters:
q— optional substring filter on idtake— default20
Returns a list of package ids.
Composite mode
If one or more upstream feeds are configured via AddUpstream(...), every endpoint above merges local data with results from the upstreams. Responses are protocol-compatible:
- Version lists and search results include upstream packages alongside local ones.
- Registration
packageContentURLs and search@id/registrationURLs are rewritten to point back at this feed, so clients always resolve through you. .nupkgand.nuspecdownloads are proxy-streamed from the upstream when the package isn't local. No on-disk cache.- Local packages win on
id+versioncollisions.
See NuGet feed for configuration.
GET /api/manifest
Sibling endpoint (not under /v3) that returns a JSON summary of the site for tooling and integrations. The shape varies by mode.
Single-project:
{
"title": "My library",
"description": "...",
"primaryPackageId": "MyLibrary",
"pageCount": 12
}
Multi-project:
{
"title": "Codezerg Libraries",
"description": "...",
"projects": [
{
"id": "alpha",
"title": "Alpha",
"description": "...",
"primaryPackageId": "Codezerg.Alpha",
"pageCount": 9,
"error": null
},
{
"id": "beta",
"title": "beta",
"description": null,
"primaryPackageId": null,
"pageCount": 0,
"error": "Per-project sharpdocs.json not found: ..."
}
]
}
primaryPackageId is the lone package in the project's artifacts folder if there's exactly one, or — if there are several — the one whose id matches the project id (case-insensitive). Otherwise null. error is non-null on degraded projects.
What isn't implemented
- Pushing packages (no write endpoints — drop files into
ArtifactsRootand restart) - Catalog, symbols server, report abuse, deprecated listing
- Multi-page registration responses (everything fits in one page; huge version histories would need sharding)
- API key authentication (the feed is read-only — put it behind a reverse proxy if you need access control)