Soenneker.Docker.Hub.OpenApiClient
4.0.20
Prefix Reserved
dotnet add package Soenneker.Docker.Hub.OpenApiClient --version 4.0.20
NuGet\Install-Package Soenneker.Docker.Hub.OpenApiClient -Version 4.0.20
<PackageReference Include="Soenneker.Docker.Hub.OpenApiClient" Version="4.0.20" />
<PackageVersion Include="Soenneker.Docker.Hub.OpenApiClient" Version="4.0.20" />
<PackageReference Include="Soenneker.Docker.Hub.OpenApiClient" />
paket add Soenneker.Docker.Hub.OpenApiClient --version 4.0.20
#r "nuget: Soenneker.Docker.Hub.OpenApiClient, 4.0.20"
#:package Soenneker.Docker.Hub.OpenApiClient@4.0.20
#addin nuget:?package=Soenneker.Docker.Hub.OpenApiClient&version=4.0.20
#tool nuget:?package=Soenneker.Docker.Hub.OpenApiClient&version=4.0.20
Soenneker.Docker.Hub.OpenApiClient
A Kiota-generated .NET client for the Docker Hub API.
Installation
dotnet add package Soenneker.Docker.Hub.OpenApiClient
Create a client
using System.Net.Http.Headers;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.Docker.Hub.OpenApiClient;
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", accessToken);
var adapter = new HttpClientRequestAdapter(
new AnonymousAuthenticationProvider(),
httpClient: httpClient)
{
BaseUrl = "https://hub.docker.com"
};
var client = new DockerHubOpenApiClient(adapter);
Keep the token outside source control and reuse the HttpClient, adapter, and generated client. The companion Soenneker.Docker.Hub.OpenApiClientUtil package supplies dependency-injection registration and cached construction.
List personal access tokens
using Soenneker.Docker.Hub.OpenApiClient.Models;
GetAccessTokensResponse? response = await client.V2.AccessTokens.GetAsync(
request =>
{
request.QueryParameters.Page = 1;
request.QueryParameters.PageSize = 25;
},
cancellationToken);
IReadOnlyList<GetAccessTokensResponseResultsItem> tokens = response?.Results ?? [];
Pagination is explicit. Use Next, Previous, and Count from the response to decide which page to request next; the client does not automatically enumerate all results.
API shape and failures
Request builders follow the URL hierarchy, starting at client.V2. Collection indexers supply path parameters, such as an access-token UUID or organization name.
Kiota maps documented non-success responses to generated models deriving from ApiException. The exact error type depends on the endpoint—for example, listing access tokens maps 400 to ValueError and 401 to Error. Preserve those details when logging or translating failures, and let cancellation flow to the caller.
The client and models are generated. Avoid editing them directly because regeneration replaces those changes. Endpoint names, nullability, error mappings, and model shapes can change when Docker Hub’s specification changes; review package updates before upgrading production consumers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Kiota.Http.HttpClientLibrary (>= 2.1.2)
- Microsoft.Kiota.Serialization.Form (>= 2.1.2)
- Microsoft.Kiota.Serialization.Json (>= 2.1.2)
- Microsoft.Kiota.Serialization.Multipart (>= 2.1.2)
- Microsoft.Kiota.Serialization.Text (>= 2.1.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Docker.Hub.OpenApiClient:
| Package | Downloads |
|---|---|
|
Soenneker.Docker.Hub.OpenApiClientUtil
Provides a cached Docker Hub OpenAPI client backed by the configured Docker Hub HttpClient. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.20 | 172 | 9/24/2026 |
| 4.0.19 | 113 | 9/22/2026 |
| 4.0.18 | 100 | 9/21/2026 |
| 4.0.17 | 110 | 9/17/2026 |
| 4.0.16 | 184 | 9/15/2026 |
| 4.0.15 | 220 | 9/12/2026 |
| 4.0.14 | 179 | 9/8/2026 |
| 4.0.13 | 216 | 9/4/2026 |
| 4.0.12 | 122 | 9/4/2026 |
| 4.0.11 | 183 | 9/4/2026 |
| 4.0.10 | 123 | 9/3/2026 |
| 4.0.9 | 123 | 9/3/2026 |
| 4.0.8 | 97 | 9/3/2026 |
| 4.0.7 | 130 | 8/31/2026 |
| 4.0.6 | 211 | 8/30/2026 |
| 4.0.5 | 215 | 8/29/2026 |
| 4.0.4 | 321 | 8/18/2026 |
| 4.0.3 | 126 | 8/18/2026 |
| 4.0.2 | 164 | 8/16/2026 |
| 4.0.1 | 113 | 8/16/2026 |