Skip to content

Corsinvest/cv4pve-api-dotnet

Repository files navigation

Corsinvest.ProxmoxVE.Api 🔧

cv4pve-api-dotnet Banner

🚀 Official .NET Client Library Suite for Proxmox VE API

License .NET GitHub Stars

We appreciate your star, it helps!


📖 About

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

Corsinvest for Proxmox VE Api Client (Made in Italy) 🇮🇹

A comprehensive .NET library suite for interacting with the Proxmox VE API. This collection provides everything you need to build powerful applications that manage Proxmox VE infrastructure programmatically.

🚀 Quick Start

# Install the main API package
dotnet add package Corsinvest.ProxmoxVE.Api

# Install extension package for additional functionality
dotnet add package Corsinvest.ProxmoxVE.Api.Extension
using Corsinvest.ProxmoxVE.Api;

var client = new PveClient("your-proxmox-host.com");
if (await client.Login("root", "your-password"))
{
    // Get cluster status
    var status = await client.Cluster.Status.Status();
    Console.WriteLine($"Cluster: {status.Response.data[0].name}");

    // Manage VMs
    var vm = await client.Nodes["pve1"].Qemu[100].Config.VmConfig();
    Console.WriteLine($"VM: {vm.Response.data.name}");
}

📦 Package Suite

Package Purpose Documentation
Corsinvest.ProxmoxVE.Api 🔧 Core API Client Main library for Proxmox VE API access
Corsinvest.ProxmoxVE.Api.Extension 🚀 Extended Features Helper methods and utilities
Corsinvest.ProxmoxVE.Api.Shared 📊 Shared Models Common models and utilities
Corsinvest.ProxmoxVE.Api.Shell 💻 Console Tools Console application utilities
Corsinvest.ProxmoxVE.Api.Metadata 📋 API Metadata API documentation extraction

🌟 Key Features

Developer Experience

  • Async/Await throughout the library
  • Strongly typed models and responses
  • IntelliSense support in all IDEs
  • Auto-generated from official API docs
  • Tree structure matching Proxmox VE API

🔧 Core Functionality

  • Full API coverage for Proxmox VE
  • VM/CT management (create, configure, snapshot)
  • Cluster operations (status, resources, HA)
  • Storage management (local, shared, backup)
  • Network configuration (bridges, VLANs, SDN)

🛡️ Enterprise Ready

  • API token authentication (Proxmox VE 6.2+)
  • Two-factor authentication support
  • SSL certificate validation
  • Configurable timeouts and retry logic
  • Microsoft.Extensions.Logging integration

🚀 Advanced Features

  • Extension methods for common operations
  • Task management utilities
  • Bulk operations with pattern matching
  • Response type switching (JSON, PNG)
  • Console application helpers

🎯 Choose Your Package

🔧 Core API Client

dotnet add package Corsinvest.ProxmoxVE.Api

Perfect for basic API operations and building custom solutions. 📖 Read Api Documentation →

🚀 Extended Functionality

dotnet add package Corsinvest.ProxmoxVE.Api.Extension

Adds helper methods, VM discovery, and simplified operations. 📖 Read Extension Documentation →

📊 Shared Models

dotnet add package Corsinvest.ProxmoxVE.Api.Shared

Common models and utilities used across the suite. 📖 Read Shared Documentation →

💻 Console Applications

dotnet add package Corsinvest.ProxmoxVE.Api.Shell

Utilities for building command-line tools. 📖 Read Shell Documentation →

📋 API Metadata

dotnet add package Corsinvest.ProxmoxVE.Api.Metadata

Tools for API documentation extraction and analysis. 📖 Read Metadata Documentation →


🛠️ Architecture Overview

graph TB
    A[Your Application] --> B[Corsinvest.ProxmoxVE.Api]
    A --> C[Corsinvest.ProxmoxVE.Api.Extension]
    A --> D[Corsinvest.ProxmoxVE.Api.Shell]

    C --> B
    D --> B
    B --> E[Corsinvest.ProxmoxVE.Api.Shared]
    C --> E
    D --> E

    F[Corsinvest.ProxmoxVE.Api.Metadata] --> E

    B --> G[Proxmox VE API]

    style A fill:#e1f5fe
    style B fill:#f3e5f5
    style C fill:#e8f5e8
    style G fill:#fff3e0
Loading

📚 Documentation

🎓 Getting Started

📖 API Reference

🔧 Package Documentation

Each package has detailed documentation with examples and API reference:


💡 Examples

🖥️ VM Management

// Create and configure a VM
var client = new PveClient("pve.example.com");
await client.Login("admin@pve", "password");

var result = await client.Nodes["pve1"].Qemu.CreateVm(
    vmid: 100,
    name: "web-server",
    memory: 4096,
    cores: 2
);

if (result.IsSuccessStatusCode)
{
    Console.WriteLine("✅ VM created successfully!");
}

📊 Cluster Monitoring

using Corsinvest.ProxmoxVE.Api.Extension;

// Get cluster overview with extension methods
var nodes = await client.GetNodesAsync();
foreach (var node in nodes)
{
    Console.WriteLine($"Node {node.Node}: CPU {node.CpuUsage:P2}, Memory {node.MemoryUsage:P2}");
}

🔍 VM Discovery

// Find VMs using patterns (like cv4pve-autosnap)
var productionVms = await client.GetVmsAsync("@tag-production");
var webVms = await client.GetVmsAsync("web%");
var allExceptTest = await client.GetVmsAsync("@all,-@tag-test");

🤝 Community & Support

🏢 Commercial Support

Professional support and consulting available through Corsinvest.

🌐 Community Resources

🔄 Contributing

We welcome contributions! Please see our Contributing Guide for details.


📄 License

Copyright © Corsinvest Srl

This software is part of the cv4pve-tools suite. For licensing details, please visit LICENSE.


Part of cv4pve-tools suite | Made with ❤️ in Italy by Corsinvest