Response: set failed, may need to override template object first

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

Response: set failed, may need to override template object first

L0 Member

Hi,

 

When I am trying to hit below API, I am getting error response, pasted below.

 

Payload:

{"type":"config","action":"set","key":"<Key>","xpath":"/config/devices/entry/vsys/entry/address-group/entry/[@name='apadr']","element":"<static><member>dstobj02</member>\n<member>dstobj01</member>\n</static>"}

 

Response:

'<response status="error" code="13"><msg><line>set failed, may need to override template object first</line></msg></response>'

 

Thanks!

2 REPLIES 2

L5 Sessionator

First and foremost, you seem to have posted your API key on the internet, which is basically posting your password.  Please change the password associated with that account as it is no longer secure.

 

As for the error, you are not specifying a specific vsys in the xpath, so that might be the error..?  It could also be that if the address group "apadr" is currently a dynamic address group, since you're using a set I know PAN-OS will error out, just don't remember off the top of my head if it's this specific error or something else.

 

In general, it is highly recommended that you use one of the API libraries Palo Alto Networks has made available for free to make it easier to work with the API, such as pan-python (python), pandevice (python), or pango (golang).

Hi,

 

I am using the same X-Path for the get objects and response is successful.

  • 6731 Views
  • 2 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!