NuGet Packages
Stout implements the NuGet V3 API
with service index, registration, flat container, and search. dotnet add package works out of the box.
Configure Your Client
Add the Stout source to your nuget.config:
<!-- nuget.config -->
<configuration>
<packageSources>
<add key="stout" value="https://registry.stout.io/nuget/myorg/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration> Or via the CLI:
dotnet nuget add source https://registry.stout.io/nuget/myorg/v3/index.json --name stout Install a Package
dotnet add package MyPackage --version 1.2.0 Publish a Package
Stout builds from source. Submit a build via the API:
curl -X POST https://registry.stout.io/api/v1/builds \
-H "Authorization: Bearer $STOUT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"format": "nuget",
"repo": "https://github.com/myorg/my-package",
"version": "1.2.0"
}' Authentication
For private packages, add credentials to nuget.config:
<!-- nuget.config with auth -->
<configuration>
<packageSourceCredentials>
<stout>
<add key="Username" value="token" />
<add key="ClearTextPassword" value="your-stout-token" />
</stout>
</packageSourceCredentials>
</configuration> Or use the X-NuGet-ApiKey header directly.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /nuget/:owner/v3/index.json | Service index |
GET | /nuget/:owner/v3/registration/:name/index.json | Registration index |
GET | /nuget/:owner/v3/flat/:name/index.json | Version listing |
GET | /nuget/:owner/v3/flat/:name/:version/*file | Download package |
GET | /nuget/:owner/v3/search | Search packages |