Fortinet white logo
Fortinet white logo

FortiWiFi and FortiAP Configuration Guide

FortiAP API

FortiAP API

FortiAP-S and FortiAP-W2 version 6.2.0 and later support REST API calls that allow you to see device information, apply configurations, reboot your devices, and more.

You can access the host at https://<FAP-IP> where <FAP-IP> is the IP address of the FortiAP.

API Schema and documentation

To see the full FortiAP API schema, you will need a Fortinet Developer Network account.

Once you have an account, you can access the FortiAP API documentation.

The following REST API calls are supported:

REST API call

HTTP

Path

Description

cfg-get

GET

/api/v1/cfg-get

List effective FortiAP variables.

To filter for specific parameters: /api/v1/cfg-get?names=parameter-name

Examples:

  • Get WTP_NAME: /api/v1/cfg-get?names=WTP_NAME
  • Get WTP_NAME and ADMIN_TIMEOUT: /api/v1/cfg-get?names=WTP_NAME,ADMIN_TIMEOUT

cfg-meta-get

GET

/api/v1/cfg-meta-get

List all variables.

cfg-set

POST

/api/v1/cfg-set

Add or change variables.

logincheck

POST

/logincheck

Log in to FortiAP with/without a password.

logout

POST

/logout

Log out from FortiAP.

radio-cfg

GET

/api/v1/radio-cfg

Get current radios configuration parameters of the control plane.

To get specific radio configuration parameters of the control plane:

  • rcfg info from radio 0: /api/v1/radio-cfg?rId=0
  • rcfg info from radio 1: /api/v1/radio-cfg?rId=1

reboot

POST

/api/v1/reboot

Reboot FortiAP.

sys-perf

GET

/api/v1/sys-perf

Get system performance values (CPU, memory).

sys-status

GET

/api/v1/sys-status

Get system status (fap-get-status).

vap-cfg

GET

/api/v1/vap-cfg

Get current SSIDs of the control plane.

To get the current SSIDs for each independent radios:

  • vcfg info from radio 0: /api/v1/vap-cfg?rId=0
  • vcfg info from radio-1: /api/v1/vap-cfg?rId=1

To get specific SSIDs from specific radios:

  • wlan 0 vcfg info from radio 0: /api/v1/vap-cfg?rId=0&wId=0
  • wlan 1 vcfg info from radio 0: /api/v1/vap-cfg?rId=0&wId=1

wtp-cfg

GET

/api/v1/wtp-cfg

Get current FortiAP configuration parameters of the control plane.

Example request
https://<FAP-IP>/api/v1/sys-perf
Example response
{
 "cpu_usage": 1,
 "memory_usage": 60
}

Enable API for Location Based Services station info

You can retrieve Location Based Services (LBS) information of associated and unassociated wireless stations through the FortiOS REST API. To enable this feature, configure the following:

  1. Configure the region on a managed FortiAP:

    config wireless-controller wtp

    edit "FP431FTF20012724"

    set uuid 882b4410-fac9-51eb-ab55-520bdbb17d52

    set admin enable

    set region "wifi"

    set region-x "0.2514256912442"

    set region-y "0.3601190476190"

    set wtp-profile "FAP431F-default"

    config radio-1

    end

    config radio-2

    end

    next

    end

  2. Enable station-location in an applied profile:

    FortiGate-101F (vdom1) # config wireless-controller wtp-profile

    FortiGate-101F (wtp-profile) # ed FAP431F-default

    FortiGate-101F (FAP431F-default) # config lbs

    FortiGate-101F (lbs) # set station-locate enable

    FortiGate-101F (lbs) # end

    FortiGate-101F (FAP431F-default) # end

    FortiGate-101F (vdom1) #

  3. Enable ble-scanning to detect BLE devices, if needed:

    FortiGate-101F (vdom1) # config wireless-controller ble-profile

    FortiGate-101F (ble-profile) # edit fortiap-discovery

    FortiGate-101F (fortiap-discovery) # set ble-scanning enable

    FortiGate-101F (fortiap-discovery) # en

    FortiGate-101F (vdom1) #

    FortiGate-101F (vdom1) # config wireless-controller wtp-profile

    FortiGate-101F (wtp-profile) # ed FAP431F-default

    FortiGate-101F (FAP431F-default) # set ble-profile fortiap-discovery

    FortiGate-101F (FAP431F-default) # end

    FortiGate-101F (vdom1) #

FortiAP API

FortiAP API

FortiAP-S and FortiAP-W2 version 6.2.0 and later support REST API calls that allow you to see device information, apply configurations, reboot your devices, and more.

You can access the host at https://<FAP-IP> where <FAP-IP> is the IP address of the FortiAP.

API Schema and documentation

To see the full FortiAP API schema, you will need a Fortinet Developer Network account.

Once you have an account, you can access the FortiAP API documentation.

The following REST API calls are supported:

REST API call

HTTP

Path

Description

cfg-get

GET

/api/v1/cfg-get

List effective FortiAP variables.

To filter for specific parameters: /api/v1/cfg-get?names=parameter-name

Examples:

  • Get WTP_NAME: /api/v1/cfg-get?names=WTP_NAME
  • Get WTP_NAME and ADMIN_TIMEOUT: /api/v1/cfg-get?names=WTP_NAME,ADMIN_TIMEOUT

cfg-meta-get

GET

/api/v1/cfg-meta-get

List all variables.

cfg-set

POST

/api/v1/cfg-set

Add or change variables.

logincheck

POST

/logincheck

Log in to FortiAP with/without a password.

logout

POST

/logout

Log out from FortiAP.

radio-cfg

GET

/api/v1/radio-cfg

Get current radios configuration parameters of the control plane.

To get specific radio configuration parameters of the control plane:

  • rcfg info from radio 0: /api/v1/radio-cfg?rId=0
  • rcfg info from radio 1: /api/v1/radio-cfg?rId=1

reboot

POST

/api/v1/reboot

Reboot FortiAP.

sys-perf

GET

/api/v1/sys-perf

Get system performance values (CPU, memory).

sys-status

GET

/api/v1/sys-status

Get system status (fap-get-status).

vap-cfg

GET

/api/v1/vap-cfg

Get current SSIDs of the control plane.

To get the current SSIDs for each independent radios:

  • vcfg info from radio 0: /api/v1/vap-cfg?rId=0
  • vcfg info from radio-1: /api/v1/vap-cfg?rId=1

To get specific SSIDs from specific radios:

  • wlan 0 vcfg info from radio 0: /api/v1/vap-cfg?rId=0&wId=0
  • wlan 1 vcfg info from radio 0: /api/v1/vap-cfg?rId=0&wId=1

wtp-cfg

GET

/api/v1/wtp-cfg

Get current FortiAP configuration parameters of the control plane.

Example request
https://<FAP-IP>/api/v1/sys-perf
Example response
{
 "cpu_usage": 1,
 "memory_usage": 60
}

Enable API for Location Based Services station info

You can retrieve Location Based Services (LBS) information of associated and unassociated wireless stations through the FortiOS REST API. To enable this feature, configure the following:

  1. Configure the region on a managed FortiAP:

    config wireless-controller wtp

    edit "FP431FTF20012724"

    set uuid 882b4410-fac9-51eb-ab55-520bdbb17d52

    set admin enable

    set region "wifi"

    set region-x "0.2514256912442"

    set region-y "0.3601190476190"

    set wtp-profile "FAP431F-default"

    config radio-1

    end

    config radio-2

    end

    next

    end

  2. Enable station-location in an applied profile:

    FortiGate-101F (vdom1) # config wireless-controller wtp-profile

    FortiGate-101F (wtp-profile) # ed FAP431F-default

    FortiGate-101F (FAP431F-default) # config lbs

    FortiGate-101F (lbs) # set station-locate enable

    FortiGate-101F (lbs) # end

    FortiGate-101F (FAP431F-default) # end

    FortiGate-101F (vdom1) #

  3. Enable ble-scanning to detect BLE devices, if needed:

    FortiGate-101F (vdom1) # config wireless-controller ble-profile

    FortiGate-101F (ble-profile) # edit fortiap-discovery

    FortiGate-101F (fortiap-discovery) # set ble-scanning enable

    FortiGate-101F (fortiap-discovery) # en

    FortiGate-101F (vdom1) #

    FortiGate-101F (vdom1) # config wireless-controller wtp-profile

    FortiGate-101F (wtp-profile) # ed FAP431F-default

    FortiGate-101F (FAP431F-default) # set ble-profile fortiap-discovery

    FortiGate-101F (FAP431F-default) # end

    FortiGate-101F (vdom1) #