How to clear cache via iControlREST?

We want to automate the process of clearing a cache that supports an application. We currently log into tmsh interactively to clear the cache with the following command…

delete ltm profile ramcache

We’d like to use a REST call to clear the cache instead, but I haven’t been able to find a way to do that. When I make a call to

https:///mgmt/tm/ltm/profile/

, I don’t see an item for ramcache, but I do for web-acceleration.

Ideas?

LTM v11.4.1 HF 2

Similar to here.

Try this:

curl -sk -u admin:admin  -X DELETE https://bigip-mgmt/mgmt/tm/ltm/profile/ramcache/all

Try this:

curl -sk -u admin:admin  -X DELETE https://bigip-mgmt/mgmt/tm/ltm/profile/ramcache/all

Thanks, kunjan. That works. I was guessing it was something like that, but I never tried that exact command. I appreciate the help.

Thanks, kunjan. That works. I was guessing it was something like that, but I never tried that exact command. I appreciate the help.

Has anyone created a python script for this?

Brilliant Kunjan!!! :slight_smile:

Brilliant Kunjan!!! :slight_smile:

Is it compulsory for user to have Administrator role to perform below call?

"curl -sk -u admin:admin -X DELETE ;

Regards,

Mihir

Is it compulsory for user to have Administrator role to perform below call?

"curl -sk -u admin:admin -X DELETE ;;

Regards,

Mihir

Is it compulsory for user to have Administrator role to perform below call?

"curl -sk -u admin:admin -X DELETE ;;

Regards,

Mihir