Apigen.Hetzner
1.0.6
dotnet add package Apigen.Hetzner --version 1.0.6
NuGet\Install-Package Apigen.Hetzner -Version 1.0.6
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="Apigen.Hetzner" Version="1.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Apigen.Hetzner" Version="1.0.6" />
<PackageReference Include="Apigen.Hetzner" />
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 Apigen.Hetzner --version 1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Apigen.Hetzner, 1.0.6"
#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 Apigen.Hetzner@1.0.6
#: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=Apigen.Hetzner&version=1.0.6
#tool nuget:?package=Apigen.Hetzner&version=1.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Apigen.Hetzner
One NuGet package, three generated C# clients for Hetzner's public REST APIs.
dotnet add package Apigen.Hetzner
What's inside
| Client | Endpoint | Auth | Credential source |
|---|---|---|---|
Apigen.Hetzner.Cloud |
api.hetzner.cloud/v1 |
Bearer token | Cloud Console → Project → API tokens |
Apigen.Hetzner.Api |
api.hetzner.com/v1 |
Bearer token | Hetzner Console → Security → API tokens |
Apigen.Hetzner.Robot |
robot-ws.your-server.de |
HTTP Basic | Robot panel → Settings → Web service user |
The three APIs are unrelated services with different base URLs, different credentials and different documentation. Tokens are not shared between them.
Usage
using Apigen.Hetzner.Cloud;
using Apigen.Hetzner.Api;
using Apigen.Hetzner.Robot;
var cloud = HetznerCloudClient.WithBearer("hcloud-token");
var api = HetznerApiClient.WithBearer("hetzner-account-token");
var robot = HetznerRobotClient.WithBasic("#ws+user", "ws-password");
var cloudServers = await cloud.Servers.ListServersAsync();
var dnsZones = await api.Zones.ListAsync();
var dedicatedServers = await robot.Server.GetAllAsync();
var serverDetail = (await robot.Server.GetAsync("321")).Server;
Console.WriteLine(serverDetail.ServerIp);
Versioning
major.minor tracks the upstream Hetzner API generation; patch is the client revision.
Source
- Repository: https://github.com/apigen-dotnet/hetzner
- Generator: https://github.com/apigen-dotnet/generator
- Cloud OpenAPI: https://docs.hetzner.cloud/cloud.spec.json
- API OpenAPI: https://docs.hetzner.cloud/hetzner.spec.json
- Robot reference: https://robot.hetzner.com/doc/webservice/en.html (HTML) and the official PHP client.
The Robot OpenAPI spec is reverse-engineered by
tools/build_robot_spec.py.
License
MIT
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.