200 means systemctl ran. Check success and exit-code: a unit that fails to start is a 200 with success: false. Every platform daemon is a simple unit, so systemd answers as soon as the process is spawned, before it is ready. The response flags that with ready-unknown: true; poll GET /services/{hostname}/{unit} to confirm the unit stayed up.daemon-reloaded: true, so the action uses the current file.apache2 restart is scheduled a few seconds later and answered 202, because the API itself is served through apache2. apache2 cannot be stopped: that is a 403, because it could then only be started again from the server console.409 while an apt operation is running on the server, while another action on the same unit is running, or when the unit is masked. Retry once the apt operation or action finishes, or unmask the unit.Warning: a stop or restart of netsapiens_nms,netsapiens_ncsornetsapiens_licfdrops the calls on that server immediately. This route does not check for active calls, unlike the package upgrade scripts.
Authorization: ********************success reports whether the unit did what was asked.curl --location 'https://awqacore01.crexendocloud.com/ns-api/v2/services/core1.example.com/netsapiens_nms/restart?ticket=API-1234' \
--header 'X-Ticket: API-1234' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"ticket": "API-1234"
}'{
"unit": "netsapiens_nms",
"resolved-unit": "netsapiens_nms.service",
"action": "restart",
"target-host": "core1.example.com",
"package": "netsapiens-core",
"category": "netsapiens",
"success": true,
"exit-code": 0,
"prior-active-state": "active",
"active-state": "active",
"sub-state": "running",
"daemon-reloaded": true,
"restart-count": 0,
"type": "simple",
"ready-unknown": true,
"output": ""
}