How to fetch Panorama Device Groups and Templates using Rest API

How to fetch Panorama Device Groups and Templates using Rest API

15987
Created On 01/05/22 10:45 AM - Last Modified 08/16/22 20:38 PM


Objective


Rest API query to fetch Panorama device Groups and Templates.

Environment


  • Pan OS 10.0 and above.
  • Panorama VM and M-series
  • RestAPI.


Procedure


From Pan OS 10.0 and above we could fetch the Panorama Device Groups and Templates using Rest API queries, the below URL will help in creating Rest API queries for the same,
  1. RestAPI doc
https://<Panorama IP>/restapi-doc/
  1.  Query to fetch specific device group with reference templates
https://<Panorama IP>/restapi/v10.1/Panorama/DeviceGroups?name=<Name_of_Specific_DG>
 
  1.  Query to fetch specific template
https://<Panorama API>/restapi/v10.1/Panorama/Templates?name=<Name_of_Specific_Templates>
  1. Query to fetch specific TemplateStacks
https://<Panorama IP>/restapi/v10.1/Panorama/TemplateStacks? name=<Name_of_Specific_TemplateStack>
Queries will help to fetch the list of Device Groups, Templates and Template Stacks,
  1. Query to fetch list of specific device group
https://<Panorama IP>/restapi/v10.1/Panorama/DeviceGroups
  1. Query to fetch list of Templates
https://<Panorama IP>/restapi/v10.1/Panorama/Templates
  1. Query to fetch list of TemplateStacks
https://<Panorama IP>/restapi/v10.1/Panorama/TemplateStacks

 

 


Additional Information


  • We can see an separate Panorama Tab under restapi-doc document for 10.0 and 10.1, which is not seen under Panorama 9.1 version,  can verify the same with below link.
https://<Panorama IP>/restapi-doc/ -----Panorama with Pan OS 9.1.12
https://<Panorama IP>/restapi-doc/------Panorama with Pan OS 10.0
https://<Panorama IP>/restapi-doc/ -----Panorama with version 10.1
  • In Pan OS 9.1 and below, we could only get the information about Objects, Device, Policies and Network Tab that you can find it using below URL
https://<Panorama IP>/restapi-doc/

 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000oMx0CAE&lang=en_US%E2%80%A9&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language