How to set device tag in panorama using API request
1133
Created On 01/24/24 17:19 PM - Last Modified 02/21/24 03:05 AM
Objective
The objective of this article is to show on how to set device tag to the firewall in panorama using API request.
Environment
- Panorama managed Firewalls
- Supported PAN-OS
- Device Tag
- XML API
Procedure
- From the browser, use below API request to set the device tag in Panorama.
https://panorama-ip/api/?key=api-key&type=config&action=set&xpath=/config/mgt-config/devices/entry[@name='firewall serial number']/vsys/entry[@name='vsysX']/tags&element=<member>tag value</member>
Replace the api-key, firewall serial number, Vsys and tag value as per the required by the organization
- Commit the configuration.
The configured tags are seen under GUI: Panorama > Managed Devices >Summary > Devices(Firewalls).
Additional Information
To Delete:
https://panorama-ip/api/?key=key-api&type=config&action=delete&xpath=/config/mgt-config/devices/entry[@name='Firewall serial number'/vsys/entry[@name='vsysX']/tags&element=<member>tag value</member>