Overview

Namespaces

  • None
  • PHP

Classes

  • Address
  • AddressGroup
  • AddressRuleContainer
  • AddressStore
  • AggregateEthernetIfStore
  • AggregateEthernetInterface
  • App
  • AppOverrideRule
  • AppRuleContainer
  • AppStore
  • AuthenticationRule
  • CaptivePortalRule
  • cidr
  • Container
  • CsvParser
  • CustomSecurityProfileURL
  • DecryptionProfile
  • DecryptionRule
  • DeviceCloud
  • DeviceGroup
  • DH
  • DoSRule
  • ErrorReporter
  • EthernetIfStore
  • EthernetInterface
  • ExpeditionTaskReporter
  • FawkesConf
  • FileTaskReporter
  • HipObjectsProfile
  • HipProfilesProfile
  • IkeCryptoProfil
  • IkeCryptoProfileStore
  • IKEGateway
  • IKEGatewayStore
  • InterfaceContainer
  • IP4Map
  • IPSecCryptoProfil
  • IPSecCryptoProfileStore
  • IPsecTunnel
  • IPsecTunnelStore
  • LoopbackIfStore
  • LoopbackInterface
  • ManagedDevice
  • ManagedDeviceStore
  • NatRule
  • NetworkPropertiesContainer
  • ObjRuleContainer
  • ObjStore
  • PanAPIConnector
  • PANConf
  • PanoramaConf
  • PbfRule
  • PH
  • PredefinedSecurityProfileURL
  • QoSRule
  • RQuery
  • Rule
  • RuleStore
  • RuleWithUserID
  • Schedule
  • ScheduleStore
  • SecurityProfile
  • SecurityProfileAntiSpyware
  • SecurityProfileAntiVirus
  • SecurityProfileDNSSecurity
  • SecurityProfileFileBlocking
  • SecurityProfileGroup
  • SecurityProfileGroupStore
  • SecurityProfileStore
  • SecurityProfileURL
  • SecurityProfileVirusAndWildfire
  • SecurityProfileVulnerability
  • SecurityProfileWildfire
  • SecurityRule
  • Service
  • ServiceDstPortMapping
  • ServiceGroup
  • ServiceRuleContainer
  • ServiceSrcPortMapping
  • ServiceStore
  • StaticRoute
  • Tag
  • TagRuleContainer
  • TagStore
  • Template
  • TemplateStack
  • TmpInterface
  • TmpInterfaceStore
  • TunnelIfStore
  • TunnelInterface
  • UrlCategoryRuleContainer
  • VirtualRouter
  • VirtualRouterContainer
  • VirtualRouterStore
  • VirtualSystem
  • VirtualWire
  • VirtualWireStore
  • VlanIfStore
  • VlanInterface
  • Zone
  • ZoneRuleContainer
  • ZoneStore

Interfaces

  • TaskReporter

Traits

  • AddressCommon
  • centralAddressStore
  • centralAddressStoreUser
  • centralServiceStore
  • centralServiceStoreUser
  • InterfaceType
  • NegatableRule
  • ObjectWithDescription
  • PanSubHelperTrait
  • PathableName
  • ReferenceableObject
  • RulewithLogging
  • ServiceCommon
  • XmlConvertible

Functions

  • __CmpObjMemID
  • __CmpObjName
  • array_diff_no_cast
  • array_to_devicequery
  • array_unique_no_cast
  • cloneArray
  • convert
  • derr
  • findConnector
  • findConnectorOrDie
  • getDirContents
  • insertAfter
  • lastIndex
  • mdeb
  • mwarning
  • my_shutdown
  • myAutoloader
  • myErrorHandler
  • printn
  • removeElement
  • sortArrayByStartValue
  • yesNoBool
  • Overview
  • Namespace
  • Class
  • Tree

Class PanAPIConnector

This class will allow you interact with PANOS API

Code :
$con = PanAPIConnector::findOrCreateConnectorFromHost( 'fw1.company.com' ); $infos = $con->getSoftwareVersion(); print "Platform: ".$infos['type']." Version: ".$infos['version']; $pan = new PANConf()
$pan->API_load_from_candidate();

Located at misc-classes/PanAPIConnector.php
Methods summary
public
# refreshSystemInfos( boolean $force = FALSE )

Parameters

$force
boolean
$force Force refresh instead of using cache

Throws

Exception
public
# show_config( )
public
# request_license_info( )
public
# show_clock( )
public string[]
# getSoftwareVersion( )

Returns

string[]
Array('type'=> panos|panorama, 'version'=>61 ) (if PANOS=6.1)
public static
# loadConnectorsFromUserHome( )
public static
# saveConnectorsToUserHome( )
public static PanAPIConnector
# findOrCreateConnectorFromHost( string $host, string $apiKey = null, boolean $promptForKey = TRUE, boolean $checkConnectivity = TRUE, boolean $hiddenPW = TRUE )

Parameters

$host
string
$host
$apiKey
string
$apiKey
$promptForKey
boolean
$promptForKey
$checkConnectivity
boolean
$checkConnectivity
$hiddenPW
boolean
$hiddenPW

Returns

PanAPIConnector
public
# testConnectivity( )
public
# toString( )
public
# setShowApiCalls( mixed $yes )
public
# setType( mixed $type, mixed $serial = null )
public
# __construct( string $host, string $key, string $type = 'panos', integer $serial = null, string|null $port = 443 )

Parameters

$host
string
$host
$key
string
$key
$type
string
$type can be 'panos' 'panorama' or 'panos-via-panorama'
$serial
integer
$port
$port
string|null
$serial
public PanAPIConnector
# cloneForPanoramaManagedDevice( string $serial )

Parameters

$serial
string
$serial serial of the firewall you want to reach through Panorama

Returns

PanAPIConnector
public mixed
# userIDLogin( string|string[] $ips, string|string[] $users, string $vsys = 'vsys1', integer $timeout = 3600 )

Parameters

$ips
string|string[]
$ips
$users
string|string[]
$users
$vsys
string
$vsys
$timeout
integer
$timeout

Returns

mixed
public mixed
# userIDLogout( string|string[] $ips, string|string[] $users, string $vsys = 'vsys1', integer $timeout = 3600 )

Parameters

$ips
string|string[]
$ips
$users
string|string[]
$users
$vsys
string
$vsys
$timeout
integer
$timeout

Returns

mixed
public DomDocument
# register_tagIPsWithTags( string[] $ips, string[] $tags, string $vsys = 'vsys1', integer $timeout = 3600 )

Parameters

$ips
string[]
$ips
$tags
string[]
$tags
$vsys
string
$vsys
$timeout
integer
$timeout

Returns

DomDocument
public DomDocument
# register_sendUpdate( string[][] $register = null, string[][] $unregister = null, string $vsys = 'vsys1', integer $timeout = 3600 )

Parameters

$register
string[][]
$register ie: Array( '1.1.1.1' => Array('tag1', 'tag3'), '2.3.4.5' => Array('tag7') )
$unregister
string[][]
$unregister ie: Array( '1.1.1.1' => Array('tag1', 'tag3'), '2.3.4.5' => Array('tag7') )
$vsys
string
$vsys
$timeout
integer
$timeout

Returns

DomDocument
public string[][]
# register_getIp( string $vsys = 'vsys1' )

Parameters

$vsys
string
$vsys

Returns

string[][]
$registered ie: Array( '1.1.1.1' => Array('tag1', 'tag3'), '2.3.4.5' => Array('tag7') )
public
# dynamicAddressGroup_get( mixed $vsys = 'vsys1', mixed $configType = 'panos' )
public DomDocument
# sendRequest( string & $parameters, boolean $checkResultTag = FALSE, string|null & $filecontent = null, string $filename = '', array $moreOptions = array() )

Parameters

$parameters
string
$parameters
$checkResultTag
boolean
$checkResultTag
$filecontent
string|null
$filecontent
$filename
string
$filename
$moreOptions
array
$moreOptions

Returns

DomDocument
public string &
# sendExportRequest( mixed $category )

Parameters

$category
mixed
$category

Returns

string
public &
# getReport( mixed $req )
public
# getRunningConfig( )
public
# getMergedConfig( )
public
# getPanoramaPushedConfig( )
public
# getCandidateConfig( mixed $apiTimeOut = 60 )
public
# getCandidateConfigAlt( )
public
# getSavedConfig( mixed $configurationName, mixed $apiTimeOut = 60 )
public
# APIresponseValidation( DOMDocument $r )
public DomDocument
# sendSetRequest( mixed $xpath, mixed $element, mixed $useChildNodes = FALSE, mixed $timeout = 30 )

Parameters

$xpath
mixed
$xpath string|XmlConvertible
$element
mixed
$element string
$useChildNodes
mixed
$useChildNodes bool if $element is an object then don't use its root but its childNodes to generate xml
$timeout

Returns

DomDocument
public
# sendSimpleRequest( mixed & $request, mixed $options = array() )
public DomDocument
# sendEditRequest( mixed $xpath, mixed $element, mixed $useChildNodes = FALSE, mixed $timeout = 30 )

Parameters

$xpath
mixed
$xpath string
$element
mixed
$element string|XmlConvertible|DOMElement
$useChildNodes
mixed
$useChildNodes bool if $element is an object then don't use its root but its childNodes to generate xml
$timeout

Returns

DomDocument
public
# sendDeleteRequest( mixed $xpath )
public DomDocument
# sendRenameRequest( string $xpath, string $newname )

Parameters

$xpath
string
$xpath
$newname
string
$newname

Returns

DomDocument
public DomDocument
# sendOpRequest( string $cmd, boolean $stripResponseTag = TRUE )

Parameters

$cmd
string
$cmd operational command string
$stripResponseTag
boolean
$stripResponseTag

Returns

DomDocument
public
# waitForJobFinished( mixed $jobID )
public DomDocument|string[]
# sendCmdRequest( mixed $cmd, mixed $checkResultTag = TRUE, mixed $maxWaitTime = -1 )

Parameters

$cmd
mixed
$cmd string
$checkResultTag
mixed
$checkResultTag bool
$maxWaitTime
mixed
$maxWaitTime integer

Returns

DomDocument|string[]
public
# getJobResult( mixed $jobID )
public
# sendJobRequest( mixed $request )
public DOMNode
# uploadConfiguration( DOMNode $configDomXml, string $configName = 'stage0.xml', boolean $verbose = TRUE )

send a config to the firewall and save under name $config_name

send a config to the firewall and save under name $config_name

Parameters

$configDomXml
DOMNode
$configDomXml
$configName
string
$configName
$verbose
boolean
$verbose

Returns

DOMNode
public string[][] &
# panorama_getConnectedFirewallsSerials( )

Returns

string[][]
ie: Array( Array('serial' => '000C12234', 'hostname' => 'FW-MUNICH4' ) )
public static
# hiddenPWvalidation( mixed $user, mixed $hiddenPW, mixed $handle )
Properties summary
public string $name 'connector'
#
public string $apikey
#
public string $apihost
#
public integer $isPANOS 1
#
public null $serial null
#
public integer $port 443
#
public boolean $showApiCalls FALSE
#
public static PanAPIConnector[] $savedConnectors array()
#
public null|string $info_deviceType null
#

$info_deviceType can be "panorama" or "panos" (firewall)

$info_deviceType can be "panorama" or "panos" (firewall)

public null|string $info_PANOS_version null
#

$info_PANOS_version ie: "7.1.2"

$info_PANOS_version ie: "7.1.2"

public null|integer $info_PANOS_version_int null
#

$info_PANOS_version_int integer that represents product OS version, bugfix release is ignore. ie: 7.1.4 -> 71 , 5.0.6 -> 50

$info_PANOS_version_int integer that represents product OS version, bugfix release is ignore. ie: 7.1.4 -> 71 , 5.0.6 -> 50

public null|boolean $info_multiVSYS null
#

$info_multiVSYS true if firewall multi-vsys is enabled

$info_multiVSYS true if firewall multi-vsys is enabled

public null|string $info_serial null
#

$info_serial product serial number. ie: "00C734556"

$info_serial product serial number. ie: "00C734556"

public null|string $info_hostname null
#

$info_hostname device hostname. ie: "PA-200"

$info_hostname device hostname. ie: "PA-200"

public null|string $info_mgmtip null
#

$info_mgmtip product mgmt interface IP. ie: "192.168.0.1"

$info_mgmtip product mgmt interface IP. ie: "192.168.0.1"

public null|string $info_uptime null
#

$info_uptime device uptime. ie: "57 days, 16:02:48"

$info_uptime device uptime. ie: "57 days, 16:02:48"

public string $info_model 'unknown'
#

$info_model can be unknown|m100|m500|pa200|pa500|pa2020|PA2050|PA3020|PA3050|PA3060|PA4020|PA4060|PA.....

$info_model can be unknown|m100|m500|pa200|pa500|pa2020|PA2050|PA3020|PA3050|PA3060|PA4020|PA4060|PA.....

public string $info_vmlicense null
#

$info_vmlicense can be unknown|VM-100|VM-200|VM-300|VM-1000

$info_vmlicense can be unknown|VM-100|VM-200|VM-300|VM-1000

public mixed $info_vmuuid null
#
public mixed $info_vmcpuid null
#
public mixed $info_app_version null
#
public mixed $info_av_version null
#
public mixed $info_wildfire_version null
#
public mixed $info_threat_version null
#
public mixed $show_config_raw null
#
public mixed $show_system_info_raw null
#
public mixed $show_clock_raw null
#
public mixed $request_license_info_raw null
#
PAN-OS-PHP API documentation generated by ApiGen 2.8.0