Please check my xpath for me

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Please check my xpath for me

L0 Member

Hi I'm creating a new admin role via api but it is not working. Here is my complete request:

 

 

https://192.168.10.1/api/?type=config&action=set&xpath=/config/shared/admin-role/entry[@name='test_name']/role/device/xmlapi<config>enable</config>&key=mykeyhere
 

 

 

 

The error I get is:

<response status="error" code="13">
<msg>
<line>
Could not find schema node for xpath /config/shared/admin-role/entry[@name='test_name']/role/device/xmlapi
<config>enable</config>
</line>
</msg>
</response>
 
 
It looks like it is looking for that name in the configs rather than creating it for me.
Spent enough time going through all the available methods of getting the xpath(https://ip/debug or debug cli on) but still getting an error.
Any help is appreciated.
1 REPLY 1

L4 Transporter

You have too much of your configuration in the xpath - since much of that configuartion does nto exist until you create your role.

I think your xpath should be /config/shared/admin-role and all the details of your role should be in the element XML.

 

SET type of config commands are very similar to EDIT, hopefully the documentation for those will help

https://www.paloaltonetworks.com/documentation/71/pan-os/xml-api/pan-os-xml-api-request-types/edit-c...

  • 2790 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!