REST API - Restart applications

Hi there … is the REST API available only for version 4.2?

how can I restart an application on 4.0 or 4.1?

Thanks

Hello,

The REST API is included with 4.2 whereas earlier 4.x versions required preview approval and installation. Information on How To Access Documentation for WSE API.

The applications can be restarted individually using the following command:

curl -X PUT --header ‘Accept:application/json; charset=utf-8’ http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/[APP-NAME]/actions/restart

More information on restarting hosts with the JMX API.

Best regards,

Andrew

Hello

You will need to add the digest auth parameters if your server is configured to use them. If your Server.xml file contains the following under RESTInterface section:

<AuthenticationMethod>digest</AuthenticationMethod>

You will need to modify your request from just the -u parameter and add the following to your curl request:

curl --digest -u "user:pass" -X ...

Thanks,

Matt

Hi

I am trying to restart the live application using the REST API call:

curl -X PUT -H 'Accept:application/json; charset=utf-8' -H "Content-type:application/json; charset=utf-8" -u "user:pass" http://185.105.4.170:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/actions/restart

The response I am getting is

{"message":"The request requires user authentication","wowzaServer":"4.3.0","code":"401","success":false}

I am using the same username and password as for login to Wowza Manager.

Can anyone tell me what am I doing wrong?

Thanks