Enable or disable a service and its monitoring
Changed onThis function enables or disables a service and its monitoring.
Note:
If the user only possesses the clustering Access Control List (ACL), then this function can only act on the named service.
Request
- Base URLhttps://whm-server.tld:2087/json-api
- AuthHTTP basic
Query parameters
The service to configure. For more information about each service, read our Service Manager documentation.
Whether to enable the service.
- 1 — Enable.
- 0 — Disable.
If you do not use this parameter, the function will not change the enabled status of the service.
Warning:
Do not use this function to disable the cpsrvd service.
A port or list of comma-separated ports on which Exim will listen for inbound connections.
Note:
The function only uses this parameter if you set exim-altport as the service parameter's value.
Whether to monitor the service in WHM's Service Status interface (WHM >> Home >> Server Status >> Service Status).
- 1 — Monitor.
- 0 — Do not monitor.
If you do not use this parameter, the function will not change the monitoring status of the service.
Response
HTTP Request was successful.
Example response
{
"metadata": {
"command": "configureservice",
"reason": "Enabled monitoring for mysql.",
"result": 1,
"version": 1
}
}Changes
- breaking
for the
queryrequest parameterexim-altportnum, default value was changed from26to26
- breaking