How to disable services via iControlREST

Hello,

I’m trying to figure out how to disable a service via iControlREST. I am able to stop/start services, but not disable/remove.

Example:

curl -u USER -d ‘{“command”: “disable”, “name”: “named”}’ -H “Content-TYpe: application/json”

{“code”:501,“message”:"0 is not supported ",“errorStack”:[]}

start/stop/restart all work.

I suspect I need something other than “command” for that? Or maybe I’m supposed to put the resource-id in the URL, however it looks like that URL accepts ID and the docs don’t show how to get the resource-id.

Thanks

I don’t think tmsh has

disable

command (iControl REST is just a wrapper for tmsh), or am I missing something?

delete

is a valid command but I don’t think you can use it for

sys service

.

root@(ltm1310)(cfg-sync Standalone)(Active)(/Common)(tmos) delete sys service ntpd
Syntax Error: "service" unexpected argument

See pp. 57-65 of iControl® REST API User Guide Version 13.1 for the list of

commands

you can use.

For other readers:

To stop the service

ntpd

(

stop sys service ntpd

:disappointed_face:

curl -sku admin: https:///mgmt/tm/sys/service/ntpd \
 -H "Content-type: application/json" -X POST \
 -d '{"command":"stop"}'

To start the service

ntpd

(

start sys service ntpd

:disappointed_face:

curl -sku admin: https:///mgmt/tm/sys/service/ntpd \
 -H "Content-type: application/json" -X POST \
 -d '{"command":"start"}'

To see the current status of

ntpd

(

show sys service ntpd

:disappointed_face:

curl -sku admin: https:///mgmt/tm/sys/service/ntpd/stats