Forum Discussion
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
- Satoshi_Toyosa1Ret. Employee
I don't think tmsh has
command (iControl REST is just a wrapper for tmsh), or am I missing something?disable
is a valid command but I don't think you can use it fordelete
.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
you can use.commands
For other readers:
To stop the service
(ntpd
😞stop sys service ntpd
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
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
curl -sku admin: https:///mgmt/tm/sys/service/ntpd/stats
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com