This API has a deprecated equivalent from v7.0U1.
Restart Services
Restarts a service
Request
URLURL
https://{api_host}/api/appliance/services/{service}?action=restart
Path Parameters
Path Parameters
string
service
Required
identifier of the service to restart
The parameter must be an identifier for the resource type: com.vmware.appliance.services.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/api/appliance/services/{service}?action=restart
Errors
400
com.vmware.vapi.std.errors.not_allowed_in_current_state : if the operation is denied in the current state of the service. If a stop or start operation is in progress, issuing a restart operation will lead to this error.
if a restart operation is issued on a service which has startup type StartupType#DISABLED
404
com.vmware.vapi.std.errors.not_found : if the service associated with service does not exist.
500
com.vmware.vapi.std.errors.timed_out : if any timeout occurs during the execution of the restart operation. | com.vmware.vapi.std.errors.error : if any other error occurs during the execution of the operation.
Availability
Added in 7.0U2