- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
03-11-2020 01:24 PM
We need to dynamically update the GP gateway exclude access routes and exclude domains. Trying to find the XPATH for the list members. Below is what I have but I can't get to the actual items in the lists.
/config/devices/entry[@name='localhost.localdomain']/template/entry[@name='TEMPLATE']/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/global-protect/global-protect-gateway/entry[@name='GATEWAY']/remote-user-tunnel-configs/entry[@name='AGENT']/split-tunneling/exclude-access-route
I need to add members to this XPATH.
04-16-2020 08:59 AM
Here is the actual URL for updating the exclude access list.
/api/?type=config&action=set&xpath=/config/devices/entry[@name=\'localhost.localdomain\']/template/entry[@name=\'TEMPLATENAME\']/config/devices/entry[@name=\'localhost.localdomain\']/vsys/entry[@name=\'vsys1\']/global-protect/global-protect-gateway/entry[@name=\'GATEWAYNAME\']/remote-user-tunnel-configs/entry[@name=\'AGENTCONFIGNAME\']/split-tunneling/exclude-access-route&element=<member>11.11.16.0/24</member>'
03-25-2020 05:21 PM
From what I can see, your xpath is good. This location is a member
, so if you're just wanting to add stuff to this location, then do a set
with this as the element:
<exclude-access-route>
<member>thing1</member>
<member>thing2</member>
</exclude-access-route>
For set
operations, you need to stop a xpath part above, so end the xpath location at "split-tunneling".
03-31-2020 12:13 PM
What would the format be for the URL for use with urllib?
04-16-2020 08:59 AM
Here is the actual URL for updating the exclude access list.
/api/?type=config&action=set&xpath=/config/devices/entry[@name=\'localhost.localdomain\']/template/entry[@name=\'TEMPLATENAME\']/config/devices/entry[@name=\'localhost.localdomain\']/vsys/entry[@name=\'vsys1\']/global-protect/global-protect-gateway/entry[@name=\'GATEWAYNAME\']/remote-user-tunnel-configs/entry[@name=\'AGENTCONFIGNAME\']/split-tunneling/exclude-access-route&element=<member>11.11.16.0/24</member>'
06-02-2021 05:26 AM
Hello, sir
if I want to add several members ? It's possible todo in one api request?
for example - ... /exclude-access-route&element=<member>11.11.16.0/24</member>&element=<member>12.12.17.0/24</member>&element=<member>13.13.17.0/24</member>
?
06-09-2021 05:09 AM
Hi @NikKaretko,
You can specify multiple members in the element portion, so instead of
&element=<member>11.11.16.0/24</member>&element=<member>12.12.17.0/24</member>&element=<member>13.13.17.0/24</member>
Use:
&element=<member>11.11.16.0/24</member><member>12.12.17.0/24</member><member>13.13.17.0/24</member>
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!