12-21-2021 04:34 AM
Hello, sorry for my english. I writed a python api post code for add a mac add to endpoint group (whitelist), but now need another python api rest code for delete a mac add form DB ise directly.. (not from whitelist)..
The new code need question it the mac add y only eliminate from DB code. Is possible?.
THX in advance.
Solved! Go to Solution.
01-14-2022 10:13 AM - edited 01-14-2022 10:15 AM
Yes this is possible using an API. Take a look at the online sdk (https://your ise pan ip:9060/ers/sdk#) - specifically Endpoint Delete
The trick here will be the fact that you will need to first query to get the endpoint ID string, to then use the ID string in the delete request.
This snippet of python should shed some light on how to extract the endpoint ID string first:
r = p_APIold(HW_ADDR)
print r.encoding
data = r.text
#Store response unicode file contents as string so we can extract unique ID
hostIDJSON = json.loads(data)
for client in hostIDJSON['SearchResult']['resources']:
temp = client['id']
print temp
p_APIupdate(temp)
Good luck & HTH!
01-14-2022 10:13 AM - edited 01-14-2022 10:15 AM
Yes this is possible using an API. Take a look at the online sdk (https://your ise pan ip:9060/ers/sdk#) - specifically Endpoint Delete
The trick here will be the fact that you will need to first query to get the endpoint ID string, to then use the ID string in the delete request.
This snippet of python should shed some light on how to extract the endpoint ID string first:
r = p_APIold(HW_ADDR)
print r.encoding
data = r.text
#Store response unicode file contents as string so we can extract unique ID
hostIDJSON = json.loads(data)
for client in hostIDJSON['SearchResult']['resources']:
temp = client['id']
print temp
p_APIupdate(temp)
Good luck & HTH!
01-14-2022 11:02 AM
THX very much!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide