Not appending new address object in address group through REST API

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

Not appending new address object in address group through REST API

L1 Bithead

We have been trying to append a new address object to an address group in the firewall. However, when we use the PUT method in Postman to insert it into the group, it replaces the existing address objects instead of adding the new one. Additionally, using the POST method results in an error.

2 REPLIES 2

Cyber Elite
Cyber Elite

Hi @ShaileshKum ,

 

You cannot append with the REST API.  You would need to modify your script to read the members of the address group, append your new value, and replace the contents.

 

REST typically only does CRUD operations.  Here are the supported REST and HTTP methods:

 

  • Create = Post
  • Read = Get
  • Update = Put
  • Delete = Delete
  • Rename = Post
  • Move (policy only) = Post

 

https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-panorama-api/get-started-with-the-pan-os-rest-a...

 

Thanks,

 

Tom

Help the community: Like helpful comments and mark solutions.

L1 Bithead

Hi @TomYoung 

Thanks for your reply! Usually, when we add an object to a group, we need to copy a previous object and paste it when adding a new object.

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