Writing Tags to Address Objects via API

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

Writing Tags to Address Objects via API

Not applicable

Hey all,

I have just started playing around with the API in Panorama. I am trying to write an address object with a tag.

I dumped an object and it looks like so:

<response status="success" code="19">

<result total-count="1" count="1">

     <entry name="badstuff" admin="admin" time="2015/02/09 17:00:50">

          <tag admin="admin" time="2015/02/09 17:00:50">

               <member admin="admin" time="2015/02/09 17:00:50">IOC000123423</member>

          </tag>

     <fqdn>foo.com</fqdn>

     </entry>

     </result>

</response>


When I try and write a new object I am using this

https://x.x.x.x/api/?type=config&action=set&key=<insert-key-here>&xpath=/config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='All Firewalls']/address&element=<entry name="blahdeblah"><fqdn>blahdablah.com.com</fqdn><tag><member>IOC23446567</member></tag></entry>

What I am getting back is this.


<response status="error" code="12">

     <msg>

          <line>

          <line>

               <![CDATA[ -> tag has unexpected text. ]]>

          </line>

          <line>

               <![CDATA[ -> tag is invalid ]]>

          </line>

          </line>

     </msg>

</response>


Any Thoughts as to what I am doing wrong?

--Jess

3 REPLIES 3

L4 Transporter

are you using PANOS 6+ ?

Yep, 6.1

L5 Sessionator

Could you please confirm if that tag already exists on the firewall ?

I just tried the following command and it worked:

https://10.66.18.85/api?type=config&action=set&key=<key>&xpath=/config/devices/entry[@name="localhos...

  • 3191 Views
  • 3 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!