Corsinvest.ProxmoxVE.Api.Metadata
2.9.0
See the version list below for details.
dotnet add package Corsinvest.ProxmoxVE.Api.Metadata --version 2.9.0
NuGet\Install-Package Corsinvest.ProxmoxVE.Api.Metadata -Version 2.9.0
<PackageReference Include="Corsinvest.ProxmoxVE.Api.Metadata" Version="2.9.0" />
paket add Corsinvest.ProxmoxVE.Api.Metadata --version 2.9.0
#r "nuget: Corsinvest.ProxmoxVE.Api.Metadata, 2.9.0"
// Install Corsinvest.ProxmoxVE.Api.Metadata as a Cake Addin #addin nuget:?package=Corsinvest.ProxmoxVE.Api.Metadata&version=2.9.0 // Install Corsinvest.ProxmoxVE.Api.Metadata as a Cake Tool #tool nuget:?package=Corsinvest.ProxmoxVE.Api.Metadata&version=2.9.0
Corsinvest.ProxmoxVE.Api
Proxmox VE Client API .Net
______ _ __
/ ____/___ __________(_)___ _ _____ _____/ /_
/ / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_
\____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/
Corsinvest for Proxmox VE Api Client (Made in Italy)
Copyright and License
Copyright: Corsinvest Srl For licensing details please visit LICENSE.md
Commercial Support
This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the site
General
The client is generated from a JSON Api on Proxmox VE.
Main features
- Easy to learn
- Method named
- Method native suffix Rest (prevent)
- GetRest
- CreateRest (Post)
- SetRest (Put)
- DeleteRest
- Set ResponseType json, png
- Full class and method generated from documentation (about client)
- 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
- Debug Level show to console information REST call
- Return result
- Request
- Response
- Status
- Last result action
- Task utility
- WaitForTaskToFinish
- TaskIsRunning
- GetExitStatusTask
- Method direct access
- Get
- Create (Post)
- Set (Put)
- Delete
- Login return bool if access
- Return Result class more information
- ClientBase lite function
- Form Proxmox VE 6.2 support Api Token for user
Api token
From version 6.2 of Proxmox VE is possible to use Api token. This feature permit execute Api without using user and password. If using Privilege Separation when create api token remember specify in permission. Format USER@REALM!TOKENID=UUID
Result
The result is class Result and contain properties:
- Response returned from Proxmox VE (data,errors,...) dynamic ExpandoObject
- ResponseToDictionary return response to dictionary
IDictionary<String, object>
- 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
//if you want use lite version only get/set/create/delete use PveClientBase
var client = new PveClient("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(JsonConvert.SerializeObject(config.Response,Formatting.Indented));
//create snapshot
var response = vm.Snapshot.Snapshot("pippo2311");
//update snapshot description
vm.Snapshot["pippo2311"].Config.UpdateSnapshotConfig("description");
//delete snapshot
vm.Snapshot["pippo2311"].Delsnapshot();
//list of snapshot
foreach (var snapshot in vm.Snapshot.SnapshotList().Response.data)
{
Console.WriteLine(JsonConvert.SerializeObject(snapshot,Formatting.Indented));
Console.WriteLine(snapshot.name);
}
//change response type from json to png
client.ResponseType = "png";
var dataImg = client.Nodes["pve1"].Rrd.Rrd("cpu", "day").Response;
Console.WriteLine("<img src=\"{dataImg}\" \>");
}
//using Api Token
var client = new PveClient("10.92.100.33");
client.ApiToken = "root@pam!qqqqqq=8a8c1cd4-d373-43f1-b366-05ce4cb8061f";
var version = client.Version.Version();
Console.WriteLine(JsonConvert.SerializeObject(version.Response.data, Formatting.Indented));
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 10.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Corsinvest.ProxmoxVE.Api.Metadata:
Package | Downloads |
---|---|
Corsinvest.ProxmoxVE.Api.Extension
Corsinvest for Proxmox VE Api Client Extension |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.2.5 | 292 | 9/19/2024 |
8.2.4 | 420 | 8/13/2024 |
8.2.3 | 353 | 7/15/2024 |
8.2.2 | 5,464 | 6/14/2024 |
8.2.1 | 2,310 | 5/8/2024 |
8.2.0 | 367 | 4/26/2024 |
8.1.7 | 237 | 4/19/2024 |
8.1.6 | 394 | 4/2/2024 |
8.1.5 | 235 | 3/28/2024 |
8.1.4 | 192 | 3/22/2024 |
8.1.3 | 6,168 | 2/29/2024 |
8.1.2 | 191 | 2/13/2024 |
8.1.1 | 155 | 2/12/2024 |
8.1.0 | 6,834 | 12/11/2023 |
8.0.3 | 1,064 | 9/22/2023 |
8.0.2 | 460 | 9/18/2023 |
8.0.1 | 347 | 8/11/2023 |
8.0.0 | 382 | 6/23/2023 |
7.4.6 | 1,879 | 6/16/2023 |
7.4.5 | 314 | 6/8/2023 |
7.4.4 | 862 | 5/29/2023 |
7.4.3 | 415 | 5/10/2023 |
7.4.2 | 285 | 5/5/2023 |
7.4.1 | 671 | 4/14/2023 |
7.4.0 | 309 | 3/23/2023 |
3.1.0 | 2,042 | 9/7/2022 |
3.0.2 | 464 | 6/21/2022 |
3.0.1 | 6,961 | 4/5/2022 |
3.0.0 | 1,190 | 1/31/2022 |
2.9.0 | 1,815 | 12/16/2021 |
2.8.0 | 3,464 | 4/28/2021 |
2.5.0 | 15,071 | 6/20/2020 |
2.3.0 | 4,379 | 4/16/2020 |
1.2.0 | 524 | 4/15/2020 |
1.1.0 | 3,903 | 10/22/2019 |
1.0.1 | 768 | 10/9/2019 |
1.0.0 | 1,065 | 8/26/2019 |
Change licensing