How to start or stop specific service via apiv2.0

Howard

Cadet
Joined
Oct 7, 2019
Messages
6
Hello,

In apiv1.0, I can use
PUT /api/v1.0/services/services/(int:id|string:srv_service)/
to start/stop service and works fine.

When I'm trying to use api2.0 control service stop or start by following api doc and trying to use
curl -X PUT "http://ipaddress/api/v2.0/service/id/{id}" -d {"enable": false} -H "accept: */*"
but only the "Start Automatically" changed but "Running" not.
It's OK and behavior same as the doc said (means whether the service should start on boot).
But when I looking for start or stop api for specific service, there's no api for it.
There's api like /service/stop or /service/started or /service/start, no service id parameter can provide and don't know how to use them.
Do I miss something?
 
Top