First post on this forum - relitivly new to PAN however I am looking to automate the addition of new URLs to a custom URL catagory we have called "allowed_urls" - I figured I can do this via the RESI API - using the put method, I am using the requests library in python to achieve this.
However my problem is that my exisiting list gets overwritten whenever I attempt to add a new member to the list.
Please find my code below - apologies as this is my first venture into PAN and the PAN API world - is what I am doing possible?
url_add = '<entry name="allowed_urls" location="vsys" vsys="vsys1"><list><member>*.testwebsite.co.uk</member></list><type>URL List</type></entry>'
add_url = requests.put('https://172.22.99.12/restapi/9.0/Objects/CustomURLCategories?name=allowed_urls&action=set&location=vsys&vsys=vsys1&input-format=xml&output-format=xml&key='+cookie+' ', data=url_add, verify=False)
If i send the above, my current "allowed_urls" list gets overwritten and all urls replaced with *.testwebiste.co,uk
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!