Address group - addresses addition using API

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

Address group - addresses addition using API

L0 Member

Dear Team, We have been following the api's provided in documentation and we are stuck where the address created automatically, cannot be added to the address group but the possibility that was seen is only for PUT methods which will overwrite the existing address group. Please suggest if there is a REST-api method that can be utilized to push a new address to existing address group. Thanks in advance.

 

What we tried earlier for testing this:

1. PUT option -> is editing entire members of that address group
2. POST option -> not allowing edits Panorama 

3 REPLIES 3

L5 Sessionator

Hi @RavitejaP, for anyone to assist you, we would need to know which PAN-OS API you are using (XML or REST), and see some (redacted as appropriate) code you are using to interact with the API. Thanks

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

L0 Member

Hi Jimmy,. Thanks for the response. We are using REST API for our regular ops. 
We are testing the action through postman before I deploy into code.

 

Action: Tried POST - No change. Tried PUT: Overrides addressgroup

URL: https://devpanorama/restapi/v10.1/Objects/AddressGroups?location=Mobile_User_Device_Group&name=RSTes...

with the following body.

 

 

{
   "entry": [{
       "@name": "RSTesting",
       "dynamic": { "member": ["RStesting123"]}
    }]
}

 

 

Hi @RavitejaP, if you want to use a Dynamic Address Group (docs), you would specify a "filter" (a match criteria of tags), but in the code you have specified a "member", which is how Static Address Groups work, by adding member objects. Per the docs (at https://yourpanorama/restapi-doc😞

Screenshot 2022-09-12 at 14.37.55.png

 

Also in the docs per the above screenshot, POST should be for creating (and renaming), and PUT for editing, if that helps.

 

Once you have decided if you are going to use Dynamic or Static Address Groups, the code needs to be amended accordingly.

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂
  • 3027 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!