Corsinvest / Cv4pve Api Java
Licence: other
Proxmox VE Client API JAVA
Stars: ✭ 17
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Cv4pve Api Java
cv4pve-api-php
Proxmox VE Client API for PHP
Stars: ✭ 45 (+164.71%)
Mutual labels: api-gateway, cluster, api-client, lxc, qemu, api-rest
cv4pve-api-dotnet
Proxmox VE Client API .Net C#
Stars: ✭ 25 (+47.06%)
Mutual labels: api-gateway, api-client, lxc, qemu, api-rest
Cv4pve Autosnap
Automatic snapshot tool for Proxmox VE
Stars: ✭ 123 (+623.53%)
Mutual labels: api, cluster, qemu, lxc
Cv4pve Barc
Backup And Restore Ceph for Proxmox VE
Stars: ✭ 74 (+335.29%)
Mutual labels: cluster, qemu, lxc
Hoppscotch
👽 Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+203247.06%)
Mutual labels: api, api-client, api-rest
Js Client
A Open-API derived JS + Node.js API client for Netlify
Stars: ✭ 170 (+900%)
Mutual labels: api, api-client, api-rest
Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: ✭ 181 (+964.71%)
Mutual labels: api, api-gateway, api-rest
Zato
ESB, SOA, REST, APIs and Cloud Integrations in Python
Stars: ✭ 889 (+5129.41%)
Mutual labels: api, api-gateway, cluster
Nodejsstarterkit
Starter Kit for Node.js v14.x, minimum dependencies 🚀
Stars: ✭ 348 (+1947.06%)
Mutual labels: api, cluster
Service Proxy
API gateway for REST and SOAP written in Java.
Stars: ✭ 355 (+1988.24%)
Mutual labels: api, api-gateway
Annon.api
Configurable API gateway that acts as a reverse proxy with a plugin system.
Stars: ✭ 306 (+1700%)
Mutual labels: api, api-gateway
Awesome Ocelot
A curated list of awesome ocelot books, courses, trainings, conference talks, blogs and most inspiring open source contributors
Stars: ✭ 386 (+2170.59%)
Mutual labels: api, api-gateway
Scalecube Services
ScaleCube Services is a high throughput, low latency reactive microservices library built to scale. it features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing. its open and designed to accommodate changes. (no sidecar in a form of broker or any kind)
Stars: ✭ 482 (+2735.29%)
Mutual labels: api-gateway, cluster
cv4pve-api-java
Proxmox VE Client API Java
______ _ __
/ ____/___ __________(_)___ _ _____ _____/ /_
/ / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_
\____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/
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.
Result
The result is class Result and contain methods:
- getResponse() returned from Proxmox VE (data,errors,...) JSONObject
- responseInError (bool) : Contains errors from Proxmox VE.
- getStatusCode() (int) : Status code of the HTTP response.
- getReasonPhrase() (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.
Main features
- Easy to learn
- Method named
- Method no named rest (same parameters)
- getRest
- setRest
- createRest
- deleteRest
- Full method generated from documentation
- Comment any method and parameters
- Parameters indexed eg [n] is structured in array index and value
- Tree structure
- client.getNodes().get("pve1").getQemu().vmlist().getResponse().getJSONArray("data")
- Return data Proxmox VE
- Debug Level show to console information
- Return result
- Request
- Response
- Status
- Last result action
- Wait task finish task
- waitForTaskToFinish
- taskIsRunning
- getExitStatusTask
- Method directly access
- get
- set
- create
- delete
- Login return bool if access
- Return Result class more information
- Minimal dependency library
- 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 [email protected]!TOKENID=UUID
Usage
//if you want use lite version only get/set/create/delete use PveClientBase
PveClient client = new PveClient("10.92.90.91", 8006);
if (client.login("root", "password", "pam")) {
//version
System.out.println(client.getVersion().version().getResponse().get("data"));
// same for put/post/delete
//loop nodes for
JSONArray nodes = client.getNodes().index().getResponse().getJSONArray("data");
for (int i = 0; i < nodes.length(); i++) {
System.out.println(nodes.get(i));
}
//loop nodes for each
PveClient.<JSONObject>JSONArrayToList(client.getNodes().index().getResponse().getJSONArray("data")).forEach((node) -> {
System.out.println(node);
});
//loops vms qemu
JSONArray vms = client.getNodes().get("pve1").getQemu().vmlist().getResponse().getJSONArray("data");
for (int i = 0; i < vms.length(); i++) {
System.out.println(vms.get(i));
}
//loop snapshots
JSONArray snapshots = client.getNodes().get("pve1")
.getQemu().get(100).getSnapshot().snapshotList().getResponse().getJSONArray("data");
for (int i = 0; i < snapshots.length(); i++) {
System.out.println(snapshots.get(i));
}
//create snapshot
JSONObject retCreateSnap = client.getNodes().get("pve1").getQemu().get(100).getSnapshot().snapshot("pippo").getResponse();
//print UPID
System.out.println(retCreateSnap.get("data"));
//wait creation
client.waitForTaskToFinish("pve1", retCreateSnap.getString("data"), 500, 10000);
//delete snapshot
Result retDeleSnap = client.getNodes().get("pve1").getQemu().get(100).getSnapshot().get("pippo").delsnapshot();
System.out.println(retDeleSnap.getResponse().get("data"));
}
Escape string
For escape string use URLEncoder.encode
Map<Integer, String> netN = new HashMap<>();
netN.put(1, URLEncoder.encode("name=eth0,rate=15,bridge=vmbr0,firewall=1,gw=xx.xx.xx.xx,ip=xx.xx.xx.xx/24,hwaddr=02:00:be:0f:f2:63",StandardCharsets.UTF_8));
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].