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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Docker.Hub.OpenApiClient" Version="4.0.20" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Docker.Hub.OpenApiClient" Version="4.0.20" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Docker.Hub.OpenApiClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Docker.Hub.OpenApiClient --version 4.0.20
                    
#r "nuget: Soenneker.Docker.Hub.OpenApiClient, 4.0.20"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Docker.Hub.OpenApiClient@4.0.20
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Docker.Hub.OpenApiClient&version=4.0.20
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Docker.Hub.OpenApiClient&version=4.0.20
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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