Comments (14)
Hi,
when call a method tre result is a class Result. See result detail.
You can also use specific methods instead of using url
//use url
var vm = client.get("/nodes/pve1/qemu/100");
//use methods
var vm = client.Nodes["pve1"].Qemu[100];
You are welcome
from cv4pve-api-dotnet.
Hey,
thank you for your response. If I do this:
var users = client.Get("/access/users");
MessageBox.Show(users.Response);
I just get an error:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: "The best match for the overloaded System.Windows.Forms.MessageBox.Show(string) method contains some invalid arguments."
from cv4pve-api-dotnet.
var users = client.Get("/access/users");
MessageBox.Show(users.Response.data);
from cv4pve-api-dotnet.
This will also print out the same error. Do I need to somehow activate the API on the proxmox node first?
Sorry, very beginner with proxmox api here.
from cv4pve-api-dotnet.
Hi,
what version do you use dotnet?
from cv4pve-api-dotnet.
core 3.1 and framework 4.7.2
from cv4pve-api-dotnet.
Hi,
static void Main(string[] args)
{
var client = new PveClient("10.92.90.101");
if (client.Login("root", "password"))
{
var users = client.Access.Users.Index();
Console.Out.WriteLine(users.Response.data);
users = client.Get("/access/users");
Console.Out.WriteLine(users.Response.data);
}
}
it works for me.
from cv4pve-api-dotnet.
Hello,
that is very weird. First option does not work for me as well. Do I have to enable something on Proxmox itself first? Or choose the authentication method?
In a console, the printOut is: System.Collections.Generic.List`1[System.Object]
from cv4pve-api-dotnet.
The user is @pam or @pve.
The data is dynamic objec in this case a collection
from cv4pve-api-dotnet.
Okay, thank you. How would I create a user?
client.Access.Users.CreateUser("test", "", "", true, 0, "", "", "", "", "test1234");
is not printing out any error but it does not create an user either.
from cv4pve-api-dotnet.
In result the message error?
from cv4pve-api-dotnet.
There is no error. MessageBox is just blank
from cv4pve-api-dotnet.
I found it now. I was just too dumb to properly read the ExpandoObject.
However, I have a question about Permissions. If I want to assign a permission to someone, there is no parameter to choose the role I want to apply to the user.
from cv4pve-api-dotnet.
This is solved. Thank you for your patience and help!
from cv4pve-api-dotnet.
Related Issues (12)
- Extensions: maxcpus is parsed in long, but wrapped in Int32
- VMInfo SetStatus resume functionality HOT 1
- # HOT 9
- Upload ISO Task fails HOT 3
- NuGet package is not up-to-date HOT 1
- Creating new HttpClient for each request HOT 4
- How to show all nodes and vm/containers HOT 2
- client.UseApiToken is Error HOT 8
- cpulimit inside of /nodes/{node}/lxc/{vmid} has the wrong type HOT 1
- DELETE: /nodes/{node}/lxc/{vmid} returns "Unexpected content for method 'DELETE'" HOT 5
- WaitForTaskToFinish is inneficient and causes 100% CPU usage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cv4pve-api-dotnet.