[pve-devel] [PATCH pve-manager 4/5] api: add service state return schema

n.frey at proxmox.com n.frey at proxmox.com
Fri Sep 19 11:33:31 CEST 2025


From: Nicolas Frey <n.frey at proxmox.com>

Signed-off-by: Nicolas Frey <n.frey at proxmox.com>
---
 PVE/API2/Services.pm | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Services.pm b/PVE/API2/Services.pm
index 708b6613..c8e3e933 100644
--- a/PVE/API2/Services.pm
+++ b/PVE/API2/Services.pm
@@ -241,7 +241,35 @@ __PACKAGE__->register_method({
     },
     returns => {
         type => "object",
-        properties => {},
+        properties => {
+            'active-state' => {
+                type => 'string',
+                enum => ['active', 'inactive', 'unknown'],
+                description => 'Current active state of the service process.',
+            },
+            'state' => {
+                type => 'string',
+                enum => ['running', 'dead', 'unknown'],
+                description => 'Execution status of the service.',
+            },
+            'unit-state' => {
+                type => 'string',
+                enum => ['enabled', 'disabled', 'not-found'],
+                description => 'Whether the service is enabled to start at boot.',
+            },
+            'service' => {
+                type => 'string',
+                description => 'Systemd unit name (e.g., pveproxy).',
+            },
+            'name' => {
+                type => 'string',
+                description => 'Short identifier for the service (e.g., "pveproxy").',
+            },
+            'desc' => {
+                type => 'string',
+                description => 'Human-readable description of the service.',
+            },
+        },
     },
     code => sub {
         my ($param) = @_;
-- 
2.47.3




More information about the pve-devel mailing list