Soenneker.DigitalOcean.OpenApiClient 4.0.35

Prefix Reserved
dotnet add package Soenneker.DigitalOcean.OpenApiClient --version 4.0.35
                    
NuGet\Install-Package Soenneker.DigitalOcean.OpenApiClient -Version 4.0.35
                    
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.DigitalOcean.OpenApiClient" Version="4.0.35" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.DigitalOcean.OpenApiClient" Version="4.0.35" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.DigitalOcean.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.DigitalOcean.OpenApiClient --version 4.0.35
                    
#r "nuget: Soenneker.DigitalOcean.OpenApiClient, 4.0.35"
                    
#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.DigitalOcean.OpenApiClient@4.0.35
                    
#: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.DigitalOcean.OpenApiClient&version=4.0.35
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.DigitalOcean.OpenApiClient&version=4.0.35
                    
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

Soenneker.DigitalOcean.OpenApiClient

A Kiota-generated .NET client for DigitalOcean’s REST API.

Installation

dotnet add package Soenneker.DigitalOcean.OpenApiClient

Create a client

using System.Net.Http.Headers;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.DigitalOcean.OpenApiClient;

var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", accessToken);

var adapter = new HttpClientRequestAdapter(
    new AnonymousAuthenticationProvider(),
    httpClient: httpClient)
{
    BaseUrl = "https://api.digitalocean.com"
};

var client = new DigitalOceanOpenApiClient(adapter);

Keep the token outside source control and reuse the HttpClient, adapter, and generated client instead of constructing them for every request. The companion Soenneker.DigitalOcean.OpenApiClientUtil package provides dependency-injection registration and cached construction when preferred.

List droplets

using Soenneker.DigitalOcean.OpenApiClient.Models;

AllDropletsResponse? response = await client.V2.Droplets.GetAsync(
    request =>
    {
        request.QueryParameters.Page = 1;
        request.QueryParameters.PerPage = 50;
    },
    cancellationToken);

IEnumerable<Droplet> droplets = response?.Droplets ?? [];

Pagination is explicit. Read the response metadata/links and request subsequent pages as needed; the client does not automatically enumerate every page.

Errors and generated API shape

DigitalOcean error responses are mapped to Soenneker.DigitalOcean.OpenApiClient.Models.Error, which derives from Kiota’s ApiException. Inspect its Id, Message, and RequestId where available, and handle rate limiting (429) according to your application’s retry policy. Cancellation tokens are passed through to the request adapter.

Request builders follow the URL hierarchy, for example client.V2.Droplets, client.V2.Domains, and client.V2.Kubernetes. Collection indexers address item routes.

The client and model files are generated. Avoid editing them directly because regeneration replaces those changes. Endpoint names, nullability, and model shapes can change when DigitalOcean’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.DigitalOcean.OpenApiClient:

Package Downloads
Soenneker.DigitalOcean.OpenApiClientUtil

Provides a cached DigitalOcean OpenAPI client backed by the configured DigitalOcean HttpClient.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.35 3 10/6/2026
4.0.34 71 10/3/2026
4.0.33 73 10/1/2026
4.0.32 101 9/30/2026
4.0.31 106 9/29/2026
4.0.30 127 9/28/2026
4.0.29 145 9/24/2026
4.0.28 123 9/23/2026
4.0.27 101 9/22/2026
4.0.26 108 9/21/2026
4.0.25 112 9/18/2026
4.0.24 103 9/17/2026
4.0.23 121 9/16/2026
4.0.22 141 9/15/2026
4.0.21 98 9/15/2026
4.0.20 209 9/12/2026
4.0.19 139 9/10/2026
4.0.18 151 9/8/2026
4.0.17 145 9/7/2026
4.0.16 179 9/4/2026
Loading failed