Documentation

SecurityConsole extends FortiManagerAPI

FortiManager API SecurityConsole

Tags
link

Fortinet developer ressource center.

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

$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.

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
$body : = null

Request body.

Tags
route

POST /securityconsole/abort (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execAssignPackage()

public execAssignPackage([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/assign/package (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execImportDevObjs()

public execImportDevObjs([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/import/dev/objs (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execInstallDevice()

public execInstallDevice([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/install/device (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execInstallPackage()

public execInstallPackage([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/install/package (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execInstallPreview()

public execInstallPreview([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/install/preview (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execPackageCancelInstall()

public execPackageCancelInstall([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/package/cancel/install (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execPackageClone()

public execPackageClone([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/package/clone (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execPackageCommit()

public execPackageCommit([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/package/commit (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execPackageMove()

public execPackageMove([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/package/move (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execPblockClone()

public execPblockClone([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/pblock/clone (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execPreviewResult()

public execPreviewResult([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/preview/result (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execReinstallPackage()

public execReinstallPackage([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/reinstall/package (exec)

Return values
stdClass

Return the fortimanager's response as an object.

execSignCertificateTemplate()

public execSignCertificateTemplate([ $body = null ]) : stdClass
Parameters
$body : = null

Request body.

Tags
route

POST /securityconsole/sign/certificate/template (exec)

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.

Search results