Forum Discussion
Nikolay_Matveev
Nimbostratus
Mar 23, 2016APM: terminate active session via API
Is it possible to obtain a list of active APM session and then terminate one of them using an API?
I assumed this could be done using iControl REST API but failed to find any relevant informati...
Kurt_Erickson
Employee
Jun 21, 2020Not very pretty but this will iterate through the current access sessions and delete them:
curl -sk -u admin:<password> -H "Content-Type: application/json" -X GET https://<apm ip address>/mgmt/tm/apm/access-info | jq -M . | grep https | grep -v selfLink | sed s'/\// /'g | sed s'/"/ /'g | awk '{system("curl -sk -u admin:<password> -X DELETE https://<apm ip address>/mgmt/tm/apm/session/"$7)}'
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects