API Endpoint to retrieve object usage?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API Endpoint to retrieve object usage?

L0 Member

Hi

I'm looking for a endpoint to check if a object is used (a bit like "Global Find from the GUI). Does it exists?

 

For now, i have a script that retrieve all address.

 

Thanks

 

1 REPLY 1

Cyber Elite
Cyber Elite

Hi @R.Lemaitre ,

 

There is no Global Find option in the API.  If you have some sort of automation tool that uses the API to pull data, why not use the same tool to pull the configuration and perform searches on it?  Cyber Elite @BPry posted a cool Python example in this post -> https://live.paloaltonetworks.com/t5/general-topics/xml-api-for-global-search/td-p/1232224.

 

That is one example, but you could go 50 different directions with automation.  Another way you could do it is through "show | match <object-name>" on the CLI (1) in configuration mode and (2) with output format = set.  If the object shows configured but not used, you can delete it.  If you have mastered a particular automation tool, explore the options it provides.

 

Thanks,

 

Tom

 

Thanks,

 

Tom

Help the community: Like helpful comments and mark solutions.
  • 204 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!