diff --git a/ProxmoxConnector.sln b/ProxmoxConnector.sln index 41c62e3..4a22946 100644 --- a/ProxmoxConnector.sln +++ b/ProxmoxConnector.sln @@ -5,6 +5,17 @@ VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProxmoxConnector.Tester", "ProxmoxConnector.Tester\ProxmoxConnector.Tester.csproj", "{A0C0198B-8327-4DC5-8577-0B55DF0F06A4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution items", "{E73280D9-92D3-4894-B0CA-43AEADB86FD2}" + ProjectSection(SolutionItems) = preProject + .gitattributes = .gitattributes + .gitignore = .gitignore + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "notes", "notes", "{3C571A15-3810-4F6D-8C61-DC97A8428C7A}" + ProjectSection(SolutionItems) = preProject + notes\pve-api.txt = notes\pve-api.txt + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,6 +30,9 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3C571A15-3810-4F6D-8C61-DC97A8428C7A} = {E73280D9-92D3-4894-B0CA-43AEADB86FD2} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2BE248DF-16B1-42EF-9A34-C3FE5359D418} EndGlobalSection diff --git a/notes/pve-api.txt b/notes/pve-api.txt new file mode 100644 index 0000000..d04a960 --- /dev/null +++ b/notes/pve-api.txt @@ -0,0 +1,18 @@ +Hi Guys +So long story short I want to shut down my physical server that is running Proxmox VE using the API. I am fairly new to using API but what I have found thus far is this: +curl https://yourip***REMOVED***/api2/json//nodes/proxmox/stop -k -d 'username=root@pam&password=yourpassword' +Above does not seem to work, Anyone able to assist and just provide the correct curl to use + +Thanx + +!!!!!!! +Please don't use the root user for that. It is possible to create a new user, name it "shutdown" or something like that, create a new role like "shutdown", add the "shutdown" role to the "shutdown" user. If you then only give that role the rights to use "Sys.PowerMgmt" that user is only allowed to start/shutdown/reboot the node. +Never a good idea to use the root user and its password in clear text. The password could end up in logs if the command fails to execute and so on. + + + +URLS: +https://pve.proxmox.com/wiki/Proxmox_VE_API +https://forum.proxmox.com/threads/shutdown-the-server-via-api.98125/ + +https://github.com/Corsinvest/cv4pve-api-dotnet \ No newline at end of file