SecurityConsole extends FortiManagerAPI
FortiManager API SecurityConsole
Tags
Table of Contents
- $config : Config
- $session : string
- $transaction : int|null
- $config : Config
- $session : string
- $transaction : mixed
- __construct() : mixed
- Constructor takes care of checking and registering FortiManager's data and login to the API
- __destruct() : mixed
- Destructor takes care of logout.
- execAbort() : stdClass
- execAssignPackage() : stdClass
- execImportDevObjs() : stdClass
- execInstallDevice() : stdClass
- execInstallPackage() : stdClass
- execInstallPreview() : stdClass
- execPackageCancelInstall() : stdClass
- execPackageClone() : stdClass
- execPackageCommit() : stdClass
- execPackageMove() : stdClass
- execPblockClone() : stdClass
- execPreviewResult() : stdClass
- execReinstallPackage() : stdClass
- execSignCertificateTemplate() : stdClass
- curlRequest() : stdClass
- Method to request the FortiManager's API.
- login() : bool
- Login in the FortiManager.
- logout() : Return
- Logout from the FortiManager.
Properties
$config
public
Config
$config
Config object with all needed information.
$session
public
string
$session
Authentication token kept in cache.
$transaction
public
int|null
$transaction
Ongoning transaction ID. WARNING : When going through the method prepareRequestData(), all upper case letter in function parameter name will be replaced by '-' and ;brought down to lower case. If you modify or add new endpoints replace all '-' in parameter name by the next letter in uppercase.
$config
private
Config
$config
$session
private
string
$session
= ''
$transaction
private
mixed
$transaction
Methods
__construct()
Constructor takes care of checking and registering FortiManager's data and login to the API
public
__construct(Config $config) : mixed
Parameters
- $config : Config
-
Object containing all necessary configuration.
Return values
mixed —__destruct()
Destructor takes care of logout.
public
__destruct() : mixed
Return values
mixed —execAbort()
public
execAbort([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execAssignPackage()
public
execAssignPackage([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execImportDevObjs()
public
execImportDevObjs([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execInstallDevice()
public
execInstallDevice([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execInstallPackage()
public
execInstallPackage([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execInstallPreview()
public
execInstallPreview([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execPackageCancelInstall()
public
execPackageCancelInstall([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execPackageClone()
public
execPackageClone([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execPackageCommit()
public
execPackageCommit([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execPackageMove()
public
execPackageMove([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execPblockClone()
public
execPblockClone([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execPreviewResult()
public
execPreviewResult([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execReinstallPackage()
public
execReinstallPackage([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
execSignCertificateTemplate()
public
execSignCertificateTemplate([ $body = null ]) : stdClass
Parameters
Tags
Return values
stdClass —Return the fortimanager's response as an object.
curlRequest()
Method to request the FortiManager's API.
protected
curlRequest(string $method, string $endpoint[, stdClass|array<string|int, mixed> $pathData = null ][, stdClass|array<string|int, mixed> $bodyData = null ][, int $timeout = null ]) : stdClass
Parameters
- $method : string
-
API method for the request. Must be one of those : get, add, set, update, delete, move, clone, exec.
- $endpoint : string
-
API endpoint without the first element ('jsonrpc') and with data in the path not replaced. E.g. /pm/config/adom/{adom}/obj/firewall/address.
- $pathData : stdClass|array<string|int, mixed> = null
-
Data to be passed in the request path.
- $bodyData : stdClass|array<string|int, mixed> = null
-
Params to be passed in the request body.
- $timeout : int = null
Return values
stdClass —Return FortiManager's response as a stdClass.
login()
Login in the FortiManager.
private
login() : bool
Return values
bool —Return TRUE if successful or throw Exception if fails.
logout()
Logout from the FortiManager.
private
logout() : Return
Return values
Return —TRUE if successful, FALSE if it failed.