EnterpriseVE.ProxmoxVE.Api 1.0.17

.NET Standard 2.0
Suggested Alternatives

Corsinvest.ProxmoxVE.Api

Additional Details

See Corsinvest.ProxmoxVE.Api

Install-Package EnterpriseVE.ProxmoxVE.Api -Version 1.0.17
dotnet add package EnterpriseVE.ProxmoxVE.Api --version 1.0.17
<PackageReference Include="EnterpriseVE.ProxmoxVE.Api" Version="1.0.17" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EnterpriseVE.ProxmoxVE.Api --version 1.0.17
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EnterpriseVE.ProxmoxVE.Api, 1.0.17"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install EnterpriseVE.ProxmoxVE.Api as a Cake Addin
#addin nuget:?package=EnterpriseVE.ProxmoxVE.Api&version=1.0.17

// Install EnterpriseVE.ProxmoxVE.Api as a Cake Tool
#tool nuget:?package=EnterpriseVE.ProxmoxVE.Api&version=1.0.17
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ATTENTION This package is deprecated.

See https://www.nuget.org/packages/Corsinvest.ProxmoxVE.Api

=================================================================================

EnterpriseVE.ProxmoxVE.Api

License

ProxmoVE Client API .Net

ProxmoxVE Api

Nuget Api

Nuget Extension

AppVeyor branch

    ______      __                       _              _    ________
   / ____/___  / /____  _________  _____(_)_______     | |  / / ____/
  / __/ / __ \/ __/ _ \/ ___/ __ \/ ___/ / ___/ _ \    | | / / __/
 / /___/ / / / /_/  __/ /  / /_/ / /  / (__  )  __/    | |/ / /___
/_____/_/ /_/\__/\___/_/  / .___/_/  /_/____/\___/     |___/_____/
                         /_/

                                                       (Made in Italy)

General

The client is generated from a JSON Api on Proxmox VE.

Main features

  • Easy to learn
  • Method named
  • Method native sufix Rest (prevent)
    • GetRest
    • CreateRest (Post)
    • SetRest (Put)
    • DeleteRest
  • Set ResponseType json, png
  • Full method generated from documentation
  • Comment any method and parameters
  • Parameters indexed eg [n] is structured in array index and value
  • Tree structure
    • client.Nodes["pve1"].Qemu[100].Snapshot().snapshotList().Response.data
  • Return data Proxmox VE
  • Return result status
    • StatusCode
    • ReasonPhrase
    • IsSuccessStatusCode
  • Wait task finish task
    • WaitForTaskToFinish
  • Method directry access
    • Get
    • Create (Post)
    • Set (Put)
    • Delete
  • Login return bool if access
  • Return Result class more information

Result

The result is class Result and contain properties:

  • Response returned from Proxmox VE (data,errors,...) dynamic ExpandoObject
  • ResponseInError (bool) : Contains errors from Proxmox VE.
  • StatusCode (System.Net.HttpStatusCode): Status code of the HTTP response.
  • ReasonPhrase (string): The reason phrase which typically is sent by servers together with the status code.
  • IsSuccessStatusCode (bool) : Gets a value that indicates if the HTTP response was successful.
  • GetError() (string) : Get error.

Example result:

{
  "data": {
    "smbios1": "uuid=9246585e-0c8b-4d02-8fe2-f48fd0da3975",
    "ide2": "none,media=cdrom",
    "onboot": 1,
    "boot": "cdn",
    "cores": 2,
    "agent": 1,
    "memory": 4096,
    "numa": 0,
    "bootdisk": "virtio0",
    "sockets": 1,
    "net0": "virtio=3A:39:38:30:36:31,bridge=vmbr0",
    "parent": "auto4hours170904080002",
    "digest": "acafde32daab50bce801fef2e029440c54ebe2f7",
    "vga": "qxl",
    "virtio0": "local-zfs:vm-100-disk-1,cache=writeback,size=50G",
    "ostype": "win8",
    "name": "phenometa"
  }
}

Usage

var client = new Client("10.92.90.91");
if (client.Login("root", "password"))
{
    var vm = client.Nodes["pve1"].Qemu[100];

    //config vm
    var config = vm.Config.VmConfig();
    Console.WriteLine(Client.ObjectToJson(config.Response));

    //create snapshot
    var response = vm.Snapshot.Snapshot("pippo2311");

    //update snapshot description
    vm.Snapshot["pippo2311"].Config.UpdateSnapshotConfig("descr");

    //delete snapshot
    vm.Snapshot["pippo2311"].Delsnapshot();

    //list of snapshot
    foreach (var snapshot in vm.Snapshot.SnapshotList().Response.data)
    {
        Console.WriteLine(Client.ObjectToJson(snapshot));
        Console.WriteLine(snapshot.name);
    }

    client.ResponseType = "png";
    var dataImg = client.Nodes["pve1"].Rrd.Rrd("cpu", "day").Response;
    Console.WriteLine("<img src=\"{dataImg}\" \>");
}

Extension Pack

The extension pack add functionality to API.

See VM.ClientExtension.cs, Storage.ClientExtension.cs, Node.ClientExtension.cs

Nuget Extension

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EnterpriseVE.ProxmoxVE.Api:

Package Downloads
EnterpriseVE.ProxmoxVE.Api.Extension

Api Client for Proxmox VE.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.17 1,053 12/5/2018
1.0.16 776 11/12/2018
1.0.15 1,065 5/18/2018
1.0.14 1,053 1/29/2018
1.0.13 968 11/2/2017
1.0.12 948 10/20/2017
1.0.11 962 10/4/2017
1.0.10 889 9/26/2017
1.0.9 873 9/25/2017
1.0.8 918 9/17/2017
1.0.7 872 9/15/2017
1.0.6 886 9/12/2017
1.0.5 963 9/6/2017
1.0.4 987 9/4/2017
1.0.3 984 9/4/2017
1.0.2-beta 1,017 9/4/2017
1.0.1-beta 1,008 9/2/2017