User Tools

Site Tools


paloaltonetworks:api:basics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
paloaltonetworks:api:basics [2020/05/22 14:25] bstaffordpaloaltonetworks:api:basics [2023/05/17 19:16] (current) – [cURL] bstafford
Line 15: Line 15:
   * white space should be replaced with ''%20''   * white space should be replaced with ''%20''
   * ''"'' should be replaced with ''%22''   * ''"'' should be replaced with ''%22''
-  * ''''' should be replaced with ''%27''+  * '' ' '' should be replaced with ''%27''
   * ''@'' should be replaced with ''%40''   * ''@'' should be replaced with ''%40''
   * ''<'' should be replaced with ''%3C''   * ''<'' should be replaced with ''%3C''
Line 33: Line 33:
   * The ''-g'' flag allows Curl to process symbols such as ''['', '']'', ''<'', ''>'', ''/'', ''@'', ''"'' and '' '' (Whitespace).    * The ''-g'' flag allows Curl to process symbols such as ''['', '']'', ''<'', ''>'', ''/'', ''@'', ''"'' and '' '' (Whitespace). 
   * The ''-X GET'' flat tells Curl that it is a GET request.   * The ''-X GET'' flat tells Curl that it is a GET request.
 +  * The ''-s'' flag makes the progress output silent.
  
 Sometimes we need to output to a file (e.g. if exporting configuration files or certificates) and we use ''-o output_filename.xyz''. If we want to silence all output from the command, we can use ''-o nul''. Sometimes we need to output to a file (e.g. if exporting configuration files or certificates) and we use ''-o output_filename.xyz''. If we want to silence all output from the command, we can use ''-o nul''.
Line 61: Line 62:
 On some scripts, you may need the IP of the server the script is running on. This seems to work: (I found it [[https://stackoverflow.com/questions/27277701/powershell-get-ipv4-address-into-a-variable|here]]. On some scripts, you may need the IP of the server the script is running on. This seems to work: (I found it [[https://stackoverflow.com/questions/27277701/powershell-get-ipv4-address-into-a-variable|here]].
 <code>$ipaddress = $(ipconfig | where {$_ -match 'IPv4.+\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' } | out-null; $Matches[1])</code> <code>$ipaddress = $(ipconfig | where {$_ -match 'IPv4.+\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' } | out-null; $Matches[1])</code>
 +===== Get XML Data ===== 
 +<code>debug cli on</code> 
 +[[https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-cli-to-find-xml-api-syntax|here]].
  
  
paloaltonetworks/api/basics.1590157525.txt.gz · Last modified: (external edit)