Services API

systemd service management.

All endpoints are prefixed with /api/services. Admin only.


Endpoints

MethodPathDescription
GET/servicesList all systemd services
GET/services/actionsAvailable actions
POST/services/:name/:actService action (start/stop/restart/enable/disable)
POST/services/bulk/:actBulk service action
GET/services/:name/statusDetailed service status

Response Formats

GET /services

{
  "services": [
    { "name": "nginx.service", "active": "active", "sub": "running", "description": "The nginx HTTP server" },
    { "name": "postgresql.service", "active": "active", "sub": "running", "description": "PostgreSQL database server" }
  ]
}

GET /services/:name/status

{
  "name": "nginx.service",
  "active": "active",
  "sub": "running",
  "pid": 1234,
  "memory": "5.2M",
  "uptime": "14d 3h",
  "description": "The nginx HTTP server"
}

Part of NexusPanel API Reference

← Back to Documentation