- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-27-2018 12:13 PM - edited 09-27-2018 12:14 PM
Help Needed! I've been having this issue for a while now. I have a ticket open; yet, I am not able to get this API call to disconnect the connected GP gateway users. It's throwing me an 'invalid username' error each time, when I try to force-logout the user.
Any help spotting the issue is appreciated!
>>> kickOut = requests.get('https://labfirewall.example.com/api/?type=op&key=MYKEYHERE&cmd=<request><global-protect-gateway><client-logout><user>theuser</user><reason>force-logout</reason><gateway>Dummy_Gateway-N</gateway><computer>MACHINENAME</computer></client-logout></global-protect-gateway></request>') >>> soup = bs(kickOut.content, 'html.parser') >>> print(soup) <response status="success"><result> <response status="error"> <gateway>Dummy_Gateway-N</gateway> <user>theuser</user> <computer>MACHINENAME</computer> <error>Invalid user name</error> </response> </result></response> >>>
09-27-2018 04:29 PM
I was missing the <domain>exampledomain</domain<> parameter in my API call
09-27-2018 04:29 PM
I was missing the <domain>exampledomain</domain<> parameter in my API call
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!