<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PAN-OS 9.0.6 API Curl JSON output in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322020#M82392</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/43480"&gt;@BPry&lt;/a&gt;Thanks.&amp;nbsp; It isn't what I wanted to hear, but it is what it is.&amp;nbsp; For now I will need to convert from XML to JSON in an external script.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2020 22:04:56 GMT</pubDate>
    <dc:creator>jwhughes</dc:creator>
    <dc:date>2020-04-09T22:04:56Z</dc:date>
    <item>
      <title>PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321960#M82367</link>
      <description>&lt;P&gt;I'm working on a project to get information from the Palo Altos and use it for an input to a SIEM.&amp;nbsp; I'm able to run the below and get XML output.&lt;/P&gt;&lt;P&gt;curl -k 'https://&amp;lt;PAN&amp;gt;/api/?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;system&amp;gt;&amp;lt;info&amp;gt;&amp;lt;/info&amp;gt;&amp;lt;/system&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=&amp;lt;KEY&amp;gt;'&lt;/P&gt;&lt;P&gt;I would prefer getting this in json so I tried &amp;amp;output-format=json after the key and get XML.&amp;nbsp; I did some research and see that /api appears to be XML output only.&amp;nbsp; Is this the case?&amp;nbsp; If so, is there an alternate to get the same output but in json?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 18:30:08 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321960#M82367</guid>
      <dc:creator>jwhughes</dc:creator>
      <dc:date>2020-04-09T18:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321981#M82372</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;What information are you looking to get from the PANs to the SIEM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise,&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 21:11:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321981#M82372</guid>
      <dc:creator>OtakarKlier</dc:creator>
      <dc:date>2020-04-09T21:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321987#M82374</link>
      <description>&lt;P&gt;The hostname, ip address, serial number, ha peer, and ha state.&amp;nbsp; Both the PAN team and the team I am on are tired of asking them if there are any new devices that we need the SIEM to monitor the feed of.&amp;nbsp; If I could get that from the API only a weekly basis I wouldn't have to ask them and manually update the csv file that the SIEM reads.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 21:15:27 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321987#M82374</guid>
      <dc:creator>jwhughes</dc:creator>
      <dc:date>2020-04-09T21:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321991#M82375</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;So you are looking for new PAN's on the network? Sounds like something for a monitoring tool and not a SIEM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise,&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 21:17:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321991#M82375</guid>
      <dc:creator>OtakarKlier</dc:creator>
      <dc:date>2020-04-09T21:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321999#M82381</link>
      <description>&lt;P&gt;The SIEM monitors all the events from the PANs for correlating with other security appliances.&amp;nbsp; The issue as a member of the SIEM team is keeping up with the changes the PAN team makes.&amp;nbsp; That is why I'm looking for a way of getting a list of all the PANs.&amp;nbsp; I can get it with&lt;/P&gt;&lt;P&gt;curl -k 'https://&amp;lt;PAN&amp;gt;/api/?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;devices&amp;gt;&amp;lt;connected&amp;gt;&amp;lt;/connected&amp;gt;&amp;lt;/devices&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=&amp;lt;KEY&amp;gt;'&lt;/P&gt;&lt;P&gt;Unfortunately the response is XML and the software I work with prefers JSON.&amp;nbsp; So either I have to convert from XML to JSON or find out if there is an alternative method of getting the information that outputs as JSON.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 21:26:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/321999#M82381</guid>
      <dc:creator>jwhughes</dc:creator>
      <dc:date>2020-04-09T21:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322015#M82387</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Are you running that against the panorama? There should be logs that are generated when a new device connects. From there you should be able to generate an alert from the SIEM if that new IP is not being monitored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope I understood you correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 21:43:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322015#M82387</guid>
      <dc:creator>OtakarKlier</dc:creator>
      <dc:date>2020-04-09T21:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322016#M82388</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct.&amp;nbsp; I'm running this against the Panorama.&amp;nbsp; What do the logs look like?&amp;nbsp; I still would like an answer to my original question to do a sanity check on what is currently there, but I can use the log for future PANs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 21:48:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322016#M82388</guid>
      <dc:creator>jwhughes</dc:creator>
      <dc:date>2020-04-09T21:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322017#M82389</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;That is something I do not know. However it should be a 'system' log so you might be able to run a SIEM query against that type of log, check its contents and write an alarm/alert around it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 21:50:37 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322017#M82389</guid>
      <dc:creator>OtakarKlier</dc:creator>
      <dc:date>2020-04-09T21:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322019#M82391</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/138009"&gt;@jwhughes&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;So your polling from a Panorama appliance then. Honestly this sounds far more like a process/people issue and not something I would solve like this, but whatever. The /api address will direct you to the XML API, so yes the output is XML.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a limited REST API available in 9.0 and above, but it's pretty limited in what it can do at the moment and can't do any sort of operational command.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll need to utilize the XML response at this time until the REST API gets to the point where it's fully functional or you fix your people/process problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 22:00:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322019#M82391</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2020-04-09T22:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322020#M82392</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/43480"&gt;@BPry&lt;/a&gt;Thanks.&amp;nbsp; It isn't what I wanted to hear, but it is what it is.&amp;nbsp; For now I will need to convert from XML to JSON in an external script.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 22:04:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322020#M82392</guid>
      <dc:creator>jwhughes</dc:creator>
      <dc:date>2020-04-09T22:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: PAN-OS 9.0.6 API Curl JSON output</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322040#M82396</link>
      <description>&lt;P&gt;Assuming that you're using a Linux CLI for this: a combination of the xpath (or xmllint) and the logger commands might be an easy solution to achieve your goal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a good example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --insecure 'https://10.1.1.1/api/?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;session&amp;gt;&amp;lt;info&amp;gt;&amp;lt;/info&amp;gt;&amp;lt;/session&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=XXXXXXXXXXXXXXXXXXXXXXXX=' -s | xpath "//pps/text()" 2&amp;gt;/dev/null | xargs logger -t paloaltoapi -n 10.3.3.7 -P 514 Number of sessions from Palo Alto firewall:&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Apr 2020 23:58:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/pan-os-9-0-6-api-curl-json-output/m-p/322040#M82396</guid>
      <dc:creator>Retired Member</dc:creator>
      <dc:date>2020-04-09T23:58:12Z</dc:date>
    </item>
  </channel>
</rss>

