Fortinet black logo

System provisioning

System provisioning

These API endpoints allow you to retrieve system-provisioning information.

Get all devices

Method

URL

Description

Arguments

Outputs

GET

/devices or /devices?status=

Retrieve all devices

none required

JSON array

GET

/devices?haRole=master and /devices?haRole=slave

Retrieve the primary devices or the secondary devices, depending on the value specified.

haRole

JSON array

GET

/devices?status=available

Retrieve the devices that can be assigned to customer sites

status

JSON array

Arguments

Parameter

Type

Description

haRole

string

If the value is primary, all primary devices are returned. If the value is secondary, all secondary devices are returned. NOTE: the values are case sensitive; use all lower-case letters for primary and secondary.

status

string

If no value is specified, all devices are returned. If the value is available, the devices that can be assigned to customer sites are returned.

Outputs

Parameter

Type

Description

deviceId

int

Device ID.

deviceName

String

Name of the device.

customerName

String

Customer name or empty.

serialNumber

String

The serial number of the device.

haRole

String

The role of the device, either primary or secondary.

version

String

The value is orignal, new, or old. Devices with a new or original version can be assigned to the customer if they are not associated with any other customer.

customerId

String

Customer ID if the device is assigned to a customer,
otherwise empty

Get all ADOMs

Method

URL

Description

Arguments

Outputs

GET

/adoms

Retrieve all ADOMs and the customers assigned to each one.

none

JSON array

Arguments

None.

Outputs

Parameter

Type

Description

customers

JSON object

List of customer ID and customer names assigned to the adom

adom

String

ADOM name

Get all roles

Method

URL

Description

Arguments

Outputs

GET

/roles

Retrieve all roles

none

JSON array

Arguments

None.

Outputs

Parameter

Type

Description

rolesId

int

Role ID.

rolesName

String

Name of the roles.

rolesType

String

Type of role, SP or CUST

roleCreateType

String

Default or custom.

Get information for a specified role

Method

URL

Description

Arguments

Outputs

GET

/roles/{roleId}

Retrieve the specified role

roleId

See the Outputs table.

Arguments

Parameter

Type

Description

roleId

int

Role ID.

Outputs

Parameter

Type

Description

roleId

int

Role ID.

roleName

String

Name of the roles.

roleType

String

Type of role, SP or CUST

roleCreateType

String

Default or custom.

Permissions

JSON array

Each entry includes the permission name and permission ID.

Get all FAPs

Method

URL

Description

Arguments

Outputs

GET

/faps

Retrieve all Fortinet APs

none

JSON array

Arguments

None.

Outputs

Parameter

Type

Description

fapName

String

Name of the Fortinet AP.

serialNumber

String

Serial Number of the Fortinet AP

osVersion

String

OS Version.

customerId

int

Customer ID.

fapId

int

ID of the Fortinet AP.

Get audit logs

Method

URL

Description

Arguments

Outputs

GET

/auditlogs?Start_date= "MM/dd/yyyy" &End_date= "MM/dd/yyyy" or /auditlogs?frequencyValue=<time>

Retrieve the audit logs for the specified time range or the specified number or days or hours.

See the next section.

JSON array

GET

/auditlogs?frequencyValue=<time>&pageStart=<row_number>&pageLength=<number_of_records>

Retrieve the specified number of records for the specified number of days or hours.

See the next section.

JSON array

Arguments (query parameters)

Parameter

Type

Description

frequencyValue

String

The number of hours or days of audit logs. If frequencyValue is not specified, the default is one day.

NOTE: Provide either the frequencyValue or the Start_date and End_date.

Start_date

datetime

Start date. The format is "MM/dd/yyyy". If the date range is not specified, the default is one day.

NOTE: Provide either the frequencyValue or the Start_date and End_date.

End_date

datetime

End date. The format is "MM/dd/yyyy". If the date range is not specified, the default is one day.

NOTE: Provide either the frequencyValue or the Start_date and End_date.

pageStart

int

The starting row number for the records to return. If pageStart is not specified, the default is 0.

pageLength

int

The number of records per page to return. If pageLength is not specified, the default is 100 records per page. The maximum value is 1000 records per page.

The following is the format for frequencyValue:

  • For 1 day: “1 00:00:00”
  • For 1 hour: “0 01:00:00”
  • For 1 week: “7 00:00:00”

To retrieve the first 10 records for one day:

fpc/api/auditlogs?frequencyValue="1 00:00:00"&pageStart=0&pageLength=10

To retrieve the first 1,000 records for seven days:

fpc/api/auditlogs?frequencyValue="7 00:00:00"&pageStart=0&pageLength=1000

Outputs

Parameter

Type

Description

dataForDate

int

Date.

level

String

Level

userName

String

Name of the user.

eventType

String

Type of event.

Client_ip_address

String

Client IP address

message

String

Message

Get alerts

Method

URL

Description

Arguments

Outputs

GET

/alerts

Retrieve list the alert logs for a given date range.
By default, returns Alerts for SP for 1 day range.

See the next table.

JSON array

Arguments (JSON payload)

Parameter

Type

Description

userType

String

SP – for service provider users
CUST – for customer users
Default or no query parameter – returns all users.

frequencyValue

String

Default in One day (“1 00:00:00”)

customerId

int

If alert related to customer is needed (userType has to be CUST)

Outputs

Parameter

Type

Description

alertReceiver

String

Name of the SP or customer that the receiver for this alert message.

alertType

String

Level of the alert (warn, info, and so on)

createdOn

date

Date the alert was received

contentId

String

Alert message content.

Get cloud usage

Method

URL

Description

Arguments

Outputs

GET

/cloudusage

Retrieve cloud usage for all customers

None

See the next table.

Outputs

Parameter

Type

Description

totalStorage

String

Total usage for all customers

allocatedStorage

String

Allocated storage

usedStorage

String

Storage in MB, GB, and so on

usedStorageinPercentage

String

Used storage in percentage

totalCustomers

String

Number of customers

Get cloud usage for a specific customer

Method

URL

Description

Arguments

Outputs

GET

/cloudusage/{cid}

Retrieve cloud usage for the specified customer.

cid

See the Outputs table.

Arguments

Parameter

Type

Description

cid

int

Customer ID.

Outputs

Parameter

Type

Description

totalStorage

String

Total usage for this customer

totalFreeStorage

String

Free storage

usedStorage

String

Storage in MB, GB, and so on

usedStorageinPercentage

String

Used storage in percentage

Get countries

Method

URL

Description

Arguments

Outputs

GET

/countries

Retrieve a list of all countries in the FortiPortal database.

None

See the next table.

Outputs

Parameter

Type

Description

country

int

Country ID

countryCode

String

Short code for the country (for example, “US”)

countryName

String

Country name

Get details for a specific country

Method

URL

Description

Arguments

Outputs

GET

/countries/{countryId}

Get details for the specified country.

countryId

See below.

Arguments

Parameter

Type

Description

countryId

int

Country ID.

Outputs

Parameter

Type

Description

country

int

Country ID

countryCode

String

Short code for the country (for example, “US”)

countryName

String

Country name

Get policy installations by all customers in a specified time range

Method

URL

Description

Arguments

Outputs

GET

/installs/?startdate=’yyyy-MM-dd HH:mm:ss’&enddate= ’yyyy- MM-dd HH:mm:ss

Get policy installations for all customers in a specified time range

startdate, enddate

See the following table.

Arguments

Parameter

Type

Description

Startdate (required)

string

Startdate: start of date range. Date format : ‘yyyy-MM-dd HH:mm:ss’

Enddate (required)

string

Enddate: end of date range. Date format : ‘yyyy-MM-dd HH:mm:ss’

Outputs

Parameter

Type

Description

country

int

Country ID

countryCode

String

Short code for the country (for example, “US”)

countryName

String

Country name

System provisioning

These API endpoints allow you to retrieve system-provisioning information.

Get all devices

Method

URL

Description

Arguments

Outputs

GET

/devices or /devices?status=

Retrieve all devices

none required

JSON array

GET

/devices?haRole=master and /devices?haRole=slave

Retrieve the primary devices or the secondary devices, depending on the value specified.

haRole

JSON array

GET

/devices?status=available

Retrieve the devices that can be assigned to customer sites

status

JSON array

Arguments

Parameter

Type

Description

haRole

string

If the value is primary, all primary devices are returned. If the value is secondary, all secondary devices are returned. NOTE: the values are case sensitive; use all lower-case letters for primary and secondary.

status

string

If no value is specified, all devices are returned. If the value is available, the devices that can be assigned to customer sites are returned.

Outputs

Parameter

Type

Description

deviceId

int

Device ID.

deviceName

String

Name of the device.

customerName

String

Customer name or empty.

serialNumber

String

The serial number of the device.

haRole

String

The role of the device, either primary or secondary.

version

String

The value is orignal, new, or old. Devices with a new or original version can be assigned to the customer if they are not associated with any other customer.

customerId

String

Customer ID if the device is assigned to a customer,
otherwise empty

Get all ADOMs

Method

URL

Description

Arguments

Outputs

GET

/adoms

Retrieve all ADOMs and the customers assigned to each one.

none

JSON array

Arguments

None.

Outputs

Parameter

Type

Description

customers

JSON object

List of customer ID and customer names assigned to the adom

adom

String

ADOM name

Get all roles

Method

URL

Description

Arguments

Outputs

GET

/roles

Retrieve all roles

none

JSON array

Arguments

None.

Outputs

Parameter

Type

Description

rolesId

int

Role ID.

rolesName

String

Name of the roles.

rolesType

String

Type of role, SP or CUST

roleCreateType

String

Default or custom.

Get information for a specified role

Method

URL

Description

Arguments

Outputs

GET

/roles/{roleId}

Retrieve the specified role

roleId

See the Outputs table.

Arguments

Parameter

Type

Description

roleId

int

Role ID.

Outputs

Parameter

Type

Description

roleId

int

Role ID.

roleName

String

Name of the roles.

roleType

String

Type of role, SP or CUST

roleCreateType

String

Default or custom.

Permissions

JSON array

Each entry includes the permission name and permission ID.

Get all FAPs

Method

URL

Description

Arguments

Outputs

GET

/faps

Retrieve all Fortinet APs

none

JSON array

Arguments

None.

Outputs

Parameter

Type

Description

fapName

String

Name of the Fortinet AP.

serialNumber

String

Serial Number of the Fortinet AP

osVersion

String

OS Version.

customerId

int

Customer ID.

fapId

int

ID of the Fortinet AP.

Get audit logs

Method

URL

Description

Arguments

Outputs

GET

/auditlogs?Start_date= "MM/dd/yyyy" &End_date= "MM/dd/yyyy" or /auditlogs?frequencyValue=<time>

Retrieve the audit logs for the specified time range or the specified number or days or hours.

See the next section.

JSON array

GET

/auditlogs?frequencyValue=<time>&pageStart=<row_number>&pageLength=<number_of_records>

Retrieve the specified number of records for the specified number of days or hours.

See the next section.

JSON array

Arguments (query parameters)

Parameter

Type

Description

frequencyValue

String

The number of hours or days of audit logs. If frequencyValue is not specified, the default is one day.

NOTE: Provide either the frequencyValue or the Start_date and End_date.

Start_date

datetime

Start date. The format is "MM/dd/yyyy". If the date range is not specified, the default is one day.

NOTE: Provide either the frequencyValue or the Start_date and End_date.

End_date

datetime

End date. The format is "MM/dd/yyyy". If the date range is not specified, the default is one day.

NOTE: Provide either the frequencyValue or the Start_date and End_date.

pageStart

int

The starting row number for the records to return. If pageStart is not specified, the default is 0.

pageLength

int

The number of records per page to return. If pageLength is not specified, the default is 100 records per page. The maximum value is 1000 records per page.

The following is the format for frequencyValue:

  • For 1 day: “1 00:00:00”
  • For 1 hour: “0 01:00:00”
  • For 1 week: “7 00:00:00”

To retrieve the first 10 records for one day:

fpc/api/auditlogs?frequencyValue="1 00:00:00"&pageStart=0&pageLength=10

To retrieve the first 1,000 records for seven days:

fpc/api/auditlogs?frequencyValue="7 00:00:00"&pageStart=0&pageLength=1000

Outputs

Parameter

Type

Description

dataForDate

int

Date.

level

String

Level

userName

String

Name of the user.

eventType

String

Type of event.

Client_ip_address

String

Client IP address

message

String

Message

Get alerts

Method

URL

Description

Arguments

Outputs

GET

/alerts

Retrieve list the alert logs for a given date range.
By default, returns Alerts for SP for 1 day range.

See the next table.

JSON array

Arguments (JSON payload)

Parameter

Type

Description

userType

String

SP – for service provider users
CUST – for customer users
Default or no query parameter – returns all users.

frequencyValue

String

Default in One day (“1 00:00:00”)

customerId

int

If alert related to customer is needed (userType has to be CUST)

Outputs

Parameter

Type

Description

alertReceiver

String

Name of the SP or customer that the receiver for this alert message.

alertType

String

Level of the alert (warn, info, and so on)

createdOn

date

Date the alert was received

contentId

String

Alert message content.

Get cloud usage

Method

URL

Description

Arguments

Outputs

GET

/cloudusage

Retrieve cloud usage for all customers

None

See the next table.

Outputs

Parameter

Type

Description

totalStorage

String

Total usage for all customers

allocatedStorage

String

Allocated storage

usedStorage

String

Storage in MB, GB, and so on

usedStorageinPercentage

String

Used storage in percentage

totalCustomers

String

Number of customers

Get cloud usage for a specific customer

Method

URL

Description

Arguments

Outputs

GET

/cloudusage/{cid}

Retrieve cloud usage for the specified customer.

cid

See the Outputs table.

Arguments

Parameter

Type

Description

cid

int

Customer ID.

Outputs

Parameter

Type

Description

totalStorage

String

Total usage for this customer

totalFreeStorage

String

Free storage

usedStorage

String

Storage in MB, GB, and so on

usedStorageinPercentage

String

Used storage in percentage

Get countries

Method

URL

Description

Arguments

Outputs

GET

/countries

Retrieve a list of all countries in the FortiPortal database.

None

See the next table.

Outputs

Parameter

Type

Description

country

int

Country ID

countryCode

String

Short code for the country (for example, “US”)

countryName

String

Country name

Get details for a specific country

Method

URL

Description

Arguments

Outputs

GET

/countries/{countryId}

Get details for the specified country.

countryId

See below.

Arguments

Parameter

Type

Description

countryId

int

Country ID.

Outputs

Parameter

Type

Description

country

int

Country ID

countryCode

String

Short code for the country (for example, “US”)

countryName

String

Country name

Get policy installations by all customers in a specified time range

Method

URL

Description

Arguments

Outputs

GET

/installs/?startdate=’yyyy-MM-dd HH:mm:ss’&enddate= ’yyyy- MM-dd HH:mm:ss

Get policy installations for all customers in a specified time range

startdate, enddate

See the following table.

Arguments

Parameter

Type

Description

Startdate (required)

string

Startdate: start of date range. Date format : ‘yyyy-MM-dd HH:mm:ss’

Enddate (required)

string

Enddate: end of date range. Date format : ‘yyyy-MM-dd HH:mm:ss’

Outputs

Parameter

Type

Description

country

int

Country ID

countryCode

String

Short code for the country (for example, “US”)

countryName

String

Country name