All Projects → Corsinvest → cv4pve-api-dotnet

Corsinvest / cv4pve-api-dotnet

Licence: other
Proxmox VE Client API .Net C#

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to cv4pve-api-dotnet

cv4pve-api-php
Proxmox VE Client API for PHP
Stars: ✭ 45 (+80%)
Mutual labels:  enterprise, api-gateway, api-client, lxc, qemu, api-rest, proxmox, proxmox-cluster, proxmox-ve, pve, proxmox-apis, proxmoxve
Cv4pve Api Java
Proxmox VE Client API JAVA
Stars: ✭ 17 (-32%)
Mutual labels:  api-gateway, api-client, lxc, qemu, api-rest
ProxmoxVE PHP API
ProxmoxVE PHP API
Stars: ✭ 78 (+212%)
Mutual labels:  lxc, qemu, proxmox, pve, proxmoxve
cv4pve-botgram
Telegram Bot for Proxmox VE
Stars: ✭ 26 (+4%)
Mutual labels:  lxc, qemu, proxmox, proxmox-cluster, proxmox-ve
proxmox-tools
📦 A collection of stuff that I and others wrote for Proxmox 📦
Stars: ✭ 112 (+348%)
Mutual labels:  proxmox, proxmox-cluster, proxmox-ve, proxmox-apis
ans-pve-win-templ
Ansible playbook to create Proxmox Windows VM templates
Stars: ✭ 49 (+96%)
Mutual labels:  proxmox, proxmox-ve, pve
cv4pve-pepper
Launching SPICE remote-viewer for Proxmox VE
Stars: ✭ 48 (+92%)
Mutual labels:  proxmox, proxmox-cluster, proxmox-ve
pve exporter
Prometheus exporter for Proxmox VE.
Stars: ✭ 31 (+24%)
Mutual labels:  proxmox, proxmox-ve, proxmox-apis
cv4pve-metrics
Metrics for Proxmox VE, Grafana with dasboard, InfluxDb
Stars: ✭ 38 (+52%)
Mutual labels:  proxmox, proxmox-cluster, proxmox-ve
ansible role proxmox
Ansible role to provision containers in Proxmox VE virtualization
Stars: ✭ 42 (+68%)
Mutual labels:  proxmox, proxmox-cluster, proxmox-ve
dubbo-go-pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: ✭ 385 (+1440%)
Mutual labels:  api-gateway, api-rest
covidtrackerapiwrapper
CovidSharp is a crossplatform C# API wrapper for the Coronavirus tracking API (https://github.com/ExpDev07/coronavirus-tracker-api)
Stars: ✭ 11 (-56%)
Mutual labels:  nuget, dotnet-standard
DummyJSON
DummyJSON provides different types of REST Endpoints filled with JSON data which you can use in developing the frontend with your favorite framework and library without worrying about writing a backend.
Stars: ✭ 213 (+752%)
Mutual labels:  api-client, api-rest
freenas-proxmox
ZFS over iSCSI to FreeNAS API's from Proxmox VE
Stars: ✭ 129 (+416%)
Mutual labels:  proxmox, proxmox-ve
python-sonarqube-api
Python wrapper for the SonarQube (Community Edition and Enterprise Edition) and SonarCloud API.
Stars: ✭ 107 (+328%)
Mutual labels:  enterprise, api-client
AutoMeter-API
AutoMeter-API是一款针对分布式服务,微服务API功能和性能一体的自动化测试平台,一站式解决应用,服务,API,环境管理,用例,条件,测试场景,计划,测试报告,功能/性能测试兼容支持的一体化工作平台
Stars: ✭ 105 (+320%)
Mutual labels:  api-client, api-rest
Pluralize.NET
📘 Pluralize or singularize any English word.
Stars: ✭ 50 (+100%)
Mutual labels:  nuget, dotnet-standard
dab templates
DAB Templates for Proxmox
Stars: ✭ 21 (-16%)
Mutual labels:  proxmox, proxmox-ve
chess.com
Python wrapper for Chess.com Published-Data API
Stars: ✭ 34 (+36%)
Mutual labels:  api-client, api-rest
pve-common
Proxmox Project's Common Perl Code
Stars: ✭ 33 (+32%)
Mutual labels:  proxmox, proxmox-ve

Corsinvest.ProxmoxVE.Api

License Nuget Nuget Nuget Nuget

Proxmox VE Client API .Net

Proxmox VE Api

Nuget Api

Nuget Extension

Nuget Metadata

Nuget Shell

   ______                _                      __
  / ____/___  __________(_)___ _   _____  _____/ /_
 / /   / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_
\____/\____/_/  /____/_/_/ /_/|___/\___/____/\__/

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
  • Async/Await

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 (await client.Login("root", "password"))
{
    var vm = await client.Nodes["pve1"].Qemu[100];

    //config vm
    var config = await vm.Config.VmConfig();
    Console.WriteLine(JsonConvert.SerializeObject(config.Response,Formatting.Indented));

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

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

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

    //list of snapshot
    foreach (var snapshot in (await 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 = await client.Version.Version();
Console.WriteLine(JsonConvert.SerializeObject(version.Response.data, Formatting.Indented));
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].