Palo Alto Networks Knowledgebase: What is the REST API Command to Display All Members of an Address Group?

What is the REST API Command to Display All Members of an Address Group?

4940
Created On 02/07/19 23:48 PM - Last Updated 02/07/19 23:48 PM
Resolution

Follow the steps below to display the members of an address group though the REST API:

  1. Generate the API key
    https://x.x.x.x/api/?type=keygen&user=admin&password=admin
    <response status="success">
    - <result>
      <key>LUFRPT14MW5xOEo1R09KVlBZNnpnemh0VHRBOWl6TGM9bXcwM3JHUGVhRlNiY0dCR0srNERUQT09</key>
      </result>
      </response>

  2. Displaying the members of an address group
    https://x.x.x.x/api/?type=config&action=get&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address-group/entry[@name='test']&key=LUFRPT14MW5xOEo1R09KVlBZNnpnemh0VHRBOWl6TGM9bXcwM3JHUGVhRlNiY0dCR0srNERUQT09
    Note: 'test' is name of the address group

    <response status="success" code="19">
    <result total-count="1" count="1">
    <entry name="test">
    <member>1.1.1.1</member>
    <member>2.2.2.2</member>
    </entry>
    </result>
    </response>
    Note: 1.1.1.1 and 2.2.2.2 are address object names)

 

owner: saryan



Attachments
Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000CltlCAC&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Attachments
Choose Language