FortiOS REST API
VERSION 5.2.3

FORTINET DOCUMENT LIBRARY
http://docs.fortinet.com
FORTINET VIDEO GUIDE
http://video.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
CUSTOMER SERVICE & SUPPORT
https://support.fortinet.com
FORTIGATE COOKBOOK
http://cookbook.fortinet.com
FORTINET TRAINING SERVICES
http://www.fortinet.com/training
FORTIGUARD CENTER
http://www.fortiguard.com
END USER LICENSE AGREEMENT
http://www.fortinet.com/doc/legal/EULA.pdf
FEEDBACK
Email: techdocs@fortinet.com

March 24, 2015
FortiOS 5.2.3 REST API
05-523-270937-201500324

TABLE OF CONTENTS
Change Log
Introduction
Authentication
CSRF Tokens
Setting Up an Authenticated Session
Supported HTTP methods
FortiOS REST API HTTP Response Codes

CMDB APIURL format
Parameters
List of Methods

collection
GET
Extra parameters
GET: default
GET: schema
DELETE
POST

resource
GET
Extra Parameters
PUT
PUT: move
Extra Parameters
POST: clone
Extra Parameters
DELETE

Monitor API
URL format
Parameters
List of Methods

firewallhealth: select

8
9
9
9
10
10
11

12
12
13
14

15
15
15
16
16
16
16

16
17
17
17
17
18
18
18
18

19
19
19
19

26
26

local-in: selectpolicy: selectpolicy: reset
policy: clear_counters
Extra parameters
policy6: selectpolicy6: reset
policy6: clear_counters
Extra parameters
session: select
Extra parameters
session-top: clear_all
session-top: closesession-top: select
Extra parameters
shaper: selectshaper: resetload-balance: select
Extra parameters

fortiview
statistics: select
Extra parameters

log

26
26
27
27
27
27
28
28
28
29
29
29
30
30
30
31
31
31
32

33
33
33

34
status: select
Extra parameters
status: resetrouter
ipv4: select
Extra parametersipv6: select
Extra parameters
statistics: select
Extra parameterssystemdashboard: reboot
dashboard: shutdown
resource: selectdhcp: select
Extra parameters
dhcp: revoke
Extra parametersfirmware: select

34
34
34

35
35
35
35
36
36
36

38
38
38
38
39
39
39
39
40

firmware: upgrade
modem: selectmodem: reset
modem: connect
modem: disconnect
3g-modem: selectsniffer: selectsniffer: restart
Extra parameterssniffer: start
Extra parameterssniffer: stop
Extra parameters
fsw:select
Extra parameters
fsw:update
interface:select
Extra parameters
fsw: update
interface:select
Extra parameters
debug:select
Extra parameters

40
40
40
41
41
41
42
42
42
43
43
43
43
44
44
44
44
45
45
45
45
46
46

extender: controller

47

extender: select
Extra parameters
extender: reset

47
47
47

user
firewall: selectfirewall: deauthbanned: selectbanned: clear_users
Extra parametersbanned: clear_all
fortitoken: activate
Extra parameters
fortitoken: refresh
Extra parameters
fortitoken: provision
Extra parametersutm
av: select

48
48
48
48
49
49
49
49
50
50
50
51
51

52
52

av: resetweb-cat: selectweb-cat: reset
email: selectemail: reset
dlp: selectdlp: reset
rating-lookup: select
Extra parametersapp: selectapp: reset
app-lookup: select
Extra parameterswebfilter
override: selectoverride: delete

visibility
device-type-dist: select
Extra parametersdevice-os-dist: select
Extra parametersdevice-list: select
Extra parametersvpn
ipsec:select
Extra parametersipsec: tunnel_up
Extra parametersipsec: tunnel_down
Extra parametersipsec: tunnel_reset_stats
Extra parameters
auto-ipsec: selectauto-ipsec: accept
auto-ipsec: rejectssl: selectssl: clean_tunnel
ssl: delete

wanoptpeer_stats: selectpeer_stats: reset

webcache

52
52
53
53
53
53
54
54
54
55
55
55
56

57
57
57

58
58
58
58
59
59
59

60
60
60
60
61
61
61
61
62
62
62
62
63
63
63

64
64
64

65

stats: select
Extra Parametersstats: resetwifi
client: select
Extra parameters
managed_ap: select
Extra Parameters
managed_ap: set_status
ap_status: selectinterfering_ap: select
Extra Parameters
euclid: selecteuclid: resetrogue_ap: select
Extra Parameters
rogue_ap: clear_all
rogue_ap: set_status
rogue_ap: restart
spectrum: select
Extra Parameters

65
65
65

66
66
66
66
67
67
67
67
68
68
68
68
69
69
69
70
70
70

Change Log
Date

Change Description

2015-03-05

Initial release.

2015-03-10

Updated for formatting and styling issues.

2015-03-24

Updated the authentication section.

8

REST API
Fortinet Inc.

Introduction
This document provides the REST API information supported in FortiOS version 5.2.3. This document covers theFortiOS GUI supported REST API reference only.
The following REST API's are supported:ll

CMDB APIl

RetrievelCreatelModifylDelete objectslConfiguration

Monitor APIlMonitor dynamic datalRefreshl

Reset stats

l

Reset

l

Restart FGT (FortiGate)

Authentication
When making requests to the FortiGate using REST APIs, you will need:

1. A valid authentication token.
2. Appropriate permissions for the requested object.
3. A valid CSRF token (for HTTP POST/PUT/DELETE methods (HTTP GET does not require CSRF token)).

CSRF Tokens
Cross-Site Request Forgery (CSRF) Tokens are alphanumeric values that are passed back-and-forth between clientand server to ensure that a user's form submission does not originate from an offsite document.
This is an important security measure; extra care is needed when submitting direct POST requests to the FortiGate.
The CSRF token must be included in the POST data with the name CSRF_TOKEN, or in the X-CSRFTOKEN HTTP
header.
The value for the token is included as a hidden input named csrftoken on any form rendered by the GUI. It's alsoavailable from the cookie variable ccsrftoken.

Please note that the ccsrftoken cookie variable is only used to pass the token value fromthe server to the client, it will not be used to authenticate the request. For authentication thetoken must be in the POST data or HTTP headers.

9

REST API
Fortinet Inc.

Supported HTTP methods

Introduction

Setting Up an Authenticated Session
To acquire a valid authentication token, you must make a POST request to the FortiOS login handler with youradministrative login and password.
To setup an authenticated session, make a request to the login request handler with your username and password.
The POST names for these fields are 'username' and 'secretkey' respectively.
Login URL

/logincheck

Username POST Variable

username

Password POST Variablesecretkey

If login is successful, the response will contain the authentication token in the APSCOOKIE cookie value. This cookie
value must be included in any further requests.

The permissions for the administrative account you use will affect which objects and operations you'll
have access to, so ensure the user has the permissions required for the actions you wish to perform.

Supported HTTP methods
FortiOS Rest APIs support the following HTTP methods:

HTTP Method

Description

GET

Retrieve a resource or collection of resources.

POST

Create a resource or execute actions.

PUT

Update a resource.

DELETE

Delete a resource or collection of resources.

For any action other than GET , a CSRF token must be provided to the API. If the request is submittedusing HTTP POST, the HTTP method can also be overridden using the X-HTTP-Method-Override
HTTP header.

REST API
Fortinet Inc.

10

Introduction

FortiOS REST API HTTP Response Codes

FortiOS REST API HTTP Response Codes
FortiOS REST APIs use well-defined HTTP status codes to indicate query results to the API.
Following are some of the HTTP status codes used:

HTTP Response CodeDescription

200-OK

API request successful.

400- Bad Request

Bad request.

403 - Forbidden

Request is missing CSRF token or administrato is missing acccess profile
permissions.

404- Not Found

Unable to find the specified resource.

405- Method Not Allowed

Specified HTTP method is not allowed for this resource.

413

Request Entity Too Large.

424

Failed Dependency.

500

Internal Server Error.

11

REST API
Fortinet Inc.

CMDB API
FortiOS supports retrieval and modification of CLI configuration using the CMDB API. The CMDB API can be accessedusing the following URL:
https://192.168.1.99/api/v2/cmdb

Example: CMDB API on firewall address and policy object
Request{"http_method":"GET"},Response{"type":"array"}},{"path":"firewall","name":"local-in","action":"select","access_group":"fwgrp.policy","summary":"List implicit and explicit local-in

URL format
The URL for CMDB REST API has the following URL format.

Resource path

Description

path

Collection "path" (Required)nameCollection "name" (Required)mkey

The unique name/ID of a specific resource to query

For example; to retrieve a list of all configured IPV4 firewall policies use the following URL:
https://192.168.1.99/api/v2/cmdb/firewall/policy/
Or else, you could also retrieve only firewall policy ID 1 using this URL:
https://192.168.1.99/api/v2/cmdb/firewall/policy/1/
The path & name values above directly map to the CLI syntax on FortiOS. The following table lists some of the url,
path, and name retrieved for a CMDB API:

12

REST API
Fortinet Inc.

CMDB API

Examples: CMDB API URL
CLI

URL

Path

Name

configure firewall policy/api/v2/cmdb/firewall/policy/

firewallpolicyconfigure firewall policy6/api/v2/cmdb/firewall/policy6/

firewallpolicy6/api/v2/cmdb/firewall/policy/api/v2/cmdb/firewall/policy/

firewallpolicyconfigure firewall schedule
recurring/api/v2/cmdb/firewall.schedule/recurring/

firewall schedule

recurringParameters
The following optional parameters can be specified for any of the supported APIs.

Additionally, each API may have a list of parameters that are specific to that API. These parameters will
be documented with the individual API methods.

Parameter

ExampleDescription

VDOM/api/v2/cmdb/firewall/policy/?vdom=root

Use the provided VDOM name for this request
only.
Administrator must have management rights forthe specified VDOM.

Action/api/v2/cmdb/firewall/policy/?action=schema

Perform a specific action on this resource.
Supported actions are listed in the resources
section.

REST API
Fortinet Inc.

13

CMDB API

List of Methods
Type

HTTP
Methods

Collection

GET

ActionSummary

Select all entries in a CLI table.

GET

default

Return the CLI default values for this object
type.

GET

schemaReturn the CLI schema for this object type.

POST

Resource

DELETE

Delete all objects in this table.

GET

Select a specific entry from a CLI table.

PUT

move

Move this specific resource.

POST

clone

Clone this specific resource.

DELETE

14

Delete this specific resource.

REST API
Fortinet Inc.

GET

collection

collection
GET
Summary

Select all entries in a CLI table.

HTTP Method

GET

Etag Caching

EnabledResponse Typearray

Extra parameters
Name

Type

Summary

datasourcebooleanEnable to include datasource
information for each linked object.

start

int

Starting entry index.

count

int

Maximum number of entries toreturn.

with_meta

booleanEnable to include meta information
about each object (type id,
references, etc).

skip

booleanEnable to call CLI skip operator tohide skipped properties.

formatboolean

List of property names to include in
results, separated by | (i.e.
policyid|srcintf).

key

stringIf present, objects will be filtered on
property with this name.

pattern

stringIf present, objects will be filtered on
property with this value.

REST API
Fortinet Inc.

15

resource

GET: default

GET: default
Summary

Return the CLI default values for this object type.

HTTP Method

GET

Actiondefault

ETag Caching

EnabledResponse Typeobject

GET: schema
Summary

Return the CLI schema for this object type.

HTTP Method

GET

ActionschemaETag Caching

EnabledResponse TypeobjectDELETE
Summary

Delete all objects in this table.

HTTP Method

DELETEPOST
HTTP Method

POST

resource

16

REST API
Fortinet Inc.

GET

resource

GET
Summary

Select a specific entry from a CLI table.

HTTP Method

GET

ETag Caching

EnabledResponse Typearray

Extra Parameters
Name

Type

Summary

datasourcebooleanEnable to include datasource
information for each linked object.

with_meta

booleanEnable to include meta information
about each object (type id,
references, etc).

skip

booleanEnable to call CLI skip operator tohide skipped properties.

formatboolean

List of property names to include in
results, separated by | (i.e.
policyid|srcintf).

PUT
HTTP Method

PUT

PUT: moveSummary

Move this specific resource.

HTTP Method

PUT

Actionmove

REST API
Fortinet Inc.

17

resource

POST: clone

Extra Parameters
Name

Type

Summary

beforestringThe ID of the resource that thisresource will be moved before.

after

stringThe ID of the resource that thisresource will be moved after.

POST: clone
Summary

Clone this specific resource.

HTTP Method

POST

Actionclone

Extra Parameters
Name

Type

Summarynkey

stringThe ID for the new resouce to becreated.

DELETE
Summary

Delete this specific resource.

HTTP Method

DELETE

18

REST API
Fortinet Inc.

Monitor API
FortiOS supports retrieval and control of dynamic data using the Monitor API. The monitor API can be accessed using
the following URL:
https://192.168.1.99/api/v2/monitor

URL format
The URL for API has the following format:

Resource Path

Description

path

Resource "path" (see list of resources)

nameResource "name" (see list of resources)

actionAction for specified resource (see list of resources).
(Optional: Defaults to "select")mkey

The name/ID of the resource to query. (Optional)

Parameters
The following optional parameters can be specified for any of the supported APIs.

Parameter Name

ExampleDescription

vdom/api/v2/monitor/firewall/policy/?vdom=root

Use the provided VDOM
name for this request only.
Administrator must havemanagement rights tospecified VDOM.

Additionally, each API may have a list of parameters that are specific to that API. These parameters will be
documented with the individual API methods.

List of Methods
URL

HTTP Method

Summary/firewall/health/

GET

List configured load balance
server health monitors.

19

REST API
Fortinet Inc.

Monitor API

URL

HTTP Method

Summary/firewall/local-in/

GET

List implicit and explicit local-infirewall policies.

/firewall/policy/

GET

List traffic statistics for all IPv4
policies.

/firewall/policy/reset/

POST

Reset traffic statistics for all IPv4
policies.

/firewall/policy/clear_counters/

POST

Reset traffic statistics for one ormore IPv4 policies by policy ID.

/firewall/policy6/

GET

List traffic statistics for all IPv6
policies.

/firewall/policy6/reset/

POST

Reset traffic statistics for all IPv6
policies.

/firewall/policy6/clear_counters/

POST

Reset traffic statistics for one ormore IPv6 policies by policy ID.

/firewall/session/

GET

List all active firewall sessions(optionally filtered).

/firewall/session/clear_all/

POST

Immediately clear all active IPv4
and IPv6 sessions.

/firewall/session/close/

POST/firewall/session-top/

GET

List of top sessions by specified
grouping criteria.

/firewall/shaper/

GET

List of statistics for configured
firewall shapers.

/firewall/shaper/reset/

POST

Reset statistics for all configured
traffic shapers.

/firewall/load-balance/

GET

List all firewall load balance
servers.

/fortiview/statistics/

GET

Retrieve drill-down and summary
data for FortiView (both realtime
and historical).

/log/stats/

GET

Return number of logs sent by
category per day for a specificlog device.

REST API
Fortinet Inc.

20

Monitor API

URL

HTTP Method

Summary/log/stats/reset/

POST

Reset logging statistics for all log
devices.

/router/ipv4/

GET

List all active IPv4 routing table
entries.

/router/ipv6/

GET

List all active IPv6 routing table
entries.

/router/statistics/

GET

Retrieve routing table statistics,
including number of matchedroutes.

/system/dashboard/reboot/

POST

Immediately reboot this device.

/system/dashboard/shutdown/

POST

Immediately shutdown thisdevice.

/system/resource/

GET

Retrieve system resource
information, including CPU andmemory usage.

/system/dhcp/

GET

Return a list of all DHCP leases,
grouped by interface.

/system/dhcp/revoke/

POST

Revoke a list of IPv4 leases.

/system/firmware/

GET

Retrieve a list of firmware
images available to use for
upgrade on this device.

/system/firmware/upgrade/

POST/system/modem/

GET

Retrieve statistics forinternal/external configured
modem.

/system/modem/reset/

POST

Reset statistics forinternal/external configured
modem.

/system/modem/connect/

POST

Trigger a connect for theconfigured modem.

/system/modem/disconnect/

POST

Trigger a disconnect for theconfigured modem.

21

REST API
Fortinet Inc.

Monitor API

URL

HTTP Method

Summary/system/3g-modem/

GET

List all 3G modems available via
FortiGuard .

/system/sniffer/

GET

Return a list of all configured
packet captures.

/system/sniffer/restart/

POST

Restart specified packet capture.

/system/sniffer/start/

POST

Start specified packet capture.

/system/sniffer/stop/

POST

Stop specified packet capture.

/system/fsw/

GET

Retrieve statistics for configured
FortiSwitches/system/fsw/update/

POST/system/interface/

GET

Retrieve statistics for all systeminterfaces.

/system/debug/

GET

Log debug messages to theconsole (if enabled).

/extender-controller/extender/

GET

Retrieve statistics for specificconfigured FortiExtender units.

/extender-controller/extender/reset/

POST/user/firewall/

GET

List authenticated firewall users.

/user/firewall/deauth/

POST

Deauthenticate all firewall users.

/user/banned/

GET

Return a list of all banned users
by IP.

/user/banned/clear_users/

POST

Immediately clear a list of
specific banned users by IP.

/user/banned/clear_all/

POST

Immediately clear all banned
users.

/user/fortitoken/activate/

POST

Activate a set of FortiTokens byserial number.

/user/fortitoken/refresh/

POST

Refresh a set of FortiTokens byserial number.

REST API
Fortinet Inc.

22

Monitor API

URL

HTTP Method

Summary/user/fortitoken/provision/

POST

Provision a set of FortiTokens byserial number.

/utm/av/

GET

Retrieve AntiVirus statistics.

/utm/av/reset/

POST

Reset AntiVirus statistics.

/utm/web/

GET

Retrieve WebFilter statistics.

/utm/web/reset/

POST

Reset WebFilter statistics.

/utm/web-cat/

GET

Retrieve WebFilter category
statistics.

/utm/web-cat/reset/

POST

Reset WebFilter category
statistics.

/utm/email/

GET

Retrieve Email Filter statistics.

/utm/email/reset/

POST

Reset Email Filter statistics.

/utm/dlp/

GET

Retrieve DLP statistics.

/utm/dlp/reset/

POST

Reset DLP statistics.

/utm/rating-lookup/

GET

Lookup FortiGuard rating for a
specific URL.

/utm/app/

GET

Retrieve application control
statistics.

/utm/app/reset/

POST

Reset application control
statistics.

/utm/app-lookup/

GET

Query remote FortiFlow
database to resolve hosts toapplication control entries.

/webfilter/override/

GET

List all administrative and user
initiated webfilter overrides.

/webfilter/override/delete/

POST/visibility/device-type-dist/

GET

23

Retrieve a breakdown ofdetected devices by type.

REST API
Fortinet Inc.

Monitor API

URL

HTTP Method

Summary/visibility/device-os-dist/

GET

Retrieve a breakdown ofdetected devices by operating
system.

/visibility/device-list/

GET

Retrieve a list of detected
devices.

/vpn/ipsec/

GET

Return an array of active IPsec
VPNs.

/vpn/ipsec/tunnel_up/

POST

Bring up a specific IPsec VPN
tunnel.

/vpn/ipsec/tunnel_down/

POST

Bring down a specific IPsec VPN
tunnel.

/vpn/ipsec/tunnel_reset_stats/

POST

Reset statistics for a specific
IPsec VPN tunnel.

/vpn/auto-ipsec/

GET

Retrieve a list of all auto-IPsec
tunnels.

/vpn/auto-ipsec/accept/

POST/vpn/auto-ipsec/reject/

POST/vpn/ssl/

GET/vpn/ssl/clean_tunnel/

POST/vpn/ssl/delete/

POST/wanopt/peer_stats/

GET

Retrieve a list of WAN opt peer
statistics.

/wanopt/peer_stats/reset/

POST

Reset WAN opt peer statistics.

/webcache/stats/

GET

Retrieve webcache statistics.

/webcache/stats/reset/

POST

Reset all webcache statistics.

/wifi/client/

GET

Retrieve a list of connected WiFi
clients.

/wifi/managed_ap/

GET

Retrieve a list of managed
FortiAPs .

REST API
Fortinet Inc.

Retrieve a list of all SSL-VPN
sessions and sub-sessions.

24Monitor API

URL

HTTP Method/wifi/managed_ap/set_status/

POST/wifi/ap_status/

GET

Retrieve statistics for all
managed FortiAPs .

/wifi/interfering_ap/

GET

Retrieve a list of interferring APs
for one FortiAP .

/wifi/euclid/

GET

Retrieve presence analytics
statistics.

/wifi/euclid/reset/

POST/wifi/rogue_ap/

GET/wifi/rogue_ap/clear_all/POST/wifi/rogue_ap/set_status/

POST/wifi/rogue_ap/restart/

POST/wifi/spectrum/

GET

25

Summary

Retrieve a list of detected rogue
APs.

Retrieve spectrum analysis
information for a specific
FortiAP.

REST API
Fortinet Inc.

health: selectfirewallfirewallhealth: selectSummary

List configured load balance server health monitors.

URL/firewall/health/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

local-in: selectSummary

List implicit and explicit local-in firewall policies.

URL/firewall/local-in/

HTTP Method

GET

ActionselectAccess Groupfwgrp.policy

Response Typearray

policy: selectSummary

List traffic statistics for all IPv4 policies.

URL/firewall/policy/

HTTP Method

GET

ActionselectREST API
Fortinet Inc.

26

firewall

policy: reset

Access Groupfwgrp.policy

policy: reset
Summary

Reset traffic statistics for all IPv4 policies.

URL/firewall/policy/reset/

HTTP Method

POST

Actionreset

Access Groupfwgrp.policy

policy: clear_counters
Summary

Reset traffic statistics for one or more IPv4 policies by policy
ID.

URL

/firewall/policy/clear_counters/

HTTP Method

POST

Actionclear_counters

Access Groupfwgrp.policy

Extra parameters
Name

Type

Summary

policyarray

Array of policy IDs to reset.

policyintSingle policy ID to reset.

policy6: selectSummary

27

List traffic statistics for all IPv6 policies.

REST API
Fortinet Inc.

policy6: reset

firewallURL/firewall/policy6/

HTTP Method

GET

ActionselectAccess Groupfwgrp.policy

policy6: reset
Summary

Reset traffic statistics for one or more IPv6 policies by policy
ID.

URL

/firewall/policy6/reset/

HTTP Method

POST

Actionreset

Access Groupfwgrp.policy

policy6: clear_counters
Summary

Reset traffic statistics for one or more IPv6 policies by policy
ID.

URL

/firewall/policy6/clear_counters/

HTTP Method

POST

Actionclear_counters

Access Groupfwgrp.policy

Extra parameters
Name

Type

Summary

policyarray

Array of policy IDs to reset.

policyintSingle policy ID to reset.

REST API
Fortinet Inc.

28

firewall

session: selectsession: selectSummary

List all active firewall sessions (optionally filtered).

URL/firewall/session/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse typearray

Extra parameters
Name

Type

Summaryip_version

stringIP version [*ipv4 | ipv6 | ipboth].

start

int

Starting entry index.

count

int

Maximum number of entries to return.

summarybooleanEnable/disable inclusion of session
summary (setup rate, total sessions, etc).

session-top: clear_all
Summary

Immediately clear all active IPv4 and IPv6 sessions.

URL/firewall/session/clear_all/

HTTP Method

POST

Actionclear_all

Access GroupsysgrpResponse type

int

29

REST API
Fortinet Inc.

session-top: close

firewallsession-top: close
URL/firewall/session/close/

HTTP Method

POST

Actionclose

Access Groupsysgrpsession-top: selectSummary

List of top sessions by specified grouping criteria.

URL/firewall/session-top/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summaryreport_bystringCriteria to group results by[source*|destination|application|web-category|webdomain].

sort_bystringCriteria to sort results by [bytes|msg-counts].

count

int

Maximum number of entries to return.

src_interface

stringFilter: by source interface name.

sourcestringFilter: by source IP.

dst_interface

stringFilter: by destination interface name.

destination

stringFilter: by destination IP.

REST API
Fortinet Inc.

30

firewallshaper: select

Name

Type

Summary

policy_id

int

Filter: by policy ID.

app_idint

Filter: by application ID.

web_category_id

stringFilter: by webfilter category name.

web_domain

stringFilter: by web domain name.

shaper: selectSummary

List of statistics for configured firewall shapers.

URL/firewall/shaper/

HTTP Method

GET

ActionselectAccess Groupfwgrp.others

Response Typearray

shaper: reset
Summary

Reset statistics for all configured traffic shapers.

URL/firewall/shaper/reset/

HTTP Method

POST

Actionreset

Access Groupfwgrp.others

load-balance: selectSummary

List all firewall load balance servers.

URL/firewall/load-balance/

31

REST API
Fortinet Inc.

load-balance: selectfirewallHTTP Method

GET

ActionselectAccess Groupfwgrp.others

Response Typearray

Extra parameters
Name

Type

Summary

start

int

Starting entry index.

count

int

Maximum number of entries to return.

REST API
Fortinet Inc.

32

fortiview

statistics: selectfortiview
statistics: selectSummary

Retrieve drill-down and summary data for FortiView (bothrealtime and historical).

URL/fortiview/statistics/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summary

realtimeboolean

Set to true to retrieve realtime results(from kernel).

33

REST API
Fortinet Inc.

status: select

log

log
status: selectSummary

Return number of logs sent by category per day for a
specific log device.

URL/log/stats/

HTTP Method

GET

ActionselectAccess Group

loggrp.data-accessResponse Typearray

Extra parameters
Name

Type

Summarydev

stringLog device [*memory | disk | fortianalyzer| fortiguard].

status: reset
Summary

Reset logging statistics for all log devices.

URL/log/stats/reset/

HTTP Method

POST

Actionreset

Access Group

loggrp.data-access

REST API
Fortinet Inc.

34

router

ipv4: selectrouter
ipv4: selectSummary

List all active IPv4 routing table entries.

URL/router/ipv4/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summary

start

int

Starting entry index.

count

int

Maximum number of entries to return.

ip_mask

stringFilter: IP/netmask.

gateway

stringFilter: gateway.

type

stringFilter: route type.

interfacestringFilter: interface name.

ipv6: selectSummary

List all active IPv6 routing table entries.

URL/router/ipv6/

HTTP Method

GET

35

REST API
Fortinet Inc.

statistics: selectrouterActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summary

start

int

Starting entry index.

count

int

Maximum number of entries to return.

ip_mask

stringFilter: IP/netmask.

gateway

stringFilter: gateway.

type

stringFilter: route type.

interfacestringFilter: interface name.

statistics: selectSummary

Retrieve routing table statistics, including number ofmatched routes.

URL/router/statistics/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse TypeobjectExtra parameters
Name

Type

Summary

start

int

Starting entry index.

count

int

Maximum number of entries to return.

REST API
Fortinet Inc.

36

routerstatistics: select

Name

Type

Summaryip_mask

stringFilter: IP/netmask.

gateway

stringFilter: gateway.

type

stringFilter: route type.

interfacestringFilter: interface name.

37

REST API
Fortinet Inc.

dashboard: reboot

systemsystemdashboard: reboot
Summary

Immediately reboot this device.

URL/system/dashboard/reboot/

HTTP Method

POST

ActionrebootAccess Groupsysgrpdashboard: shutdown
Summary

Immediately shutdown this device.

URL/system/dashboard/shutdown/

HTTP Method

POST

Actionshutdown

Access Groupsysgrpresource: selectSummary

Retrieve system resource information, including CPU andmemory usage.

URL/system/resource/

HTTP Method

GET

ActionselectAccess GroupsysgrpREST API
Fortinet Inc.

38

system

dhcp: selectdhcp: selectSummary

Return a list of all DHCP leases, grouped by interface.

URL/system/dhcp/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summary

ipv6

booleanInclude IPv6 DHCP leases in addition to
IPv4 leases.

dhcp: revoke
Summary

Revoke a list of IPv4 leases.

URL/system/dhcp/revoke/

HTTP Method

POST

ActionrevokeAccess GroupsysgrpExtra parameters
Name

Type

Summaryidarray

List of IPv4 addresses to revoke leases
for.

39

REST API
Fortinet Inc.

firmware: selectsystemfirmware: selectSummary

Retrieve a list of firmware images available to use for
upgrade on this device.

URL/system/firmware/

HTTP Method

GET

ActionselectAccess Groupsysgrpfirmware: upgrade
URL/system/firmware/upgrade/

HTTP Method

POST

ActionupgradeAccess Groupsysgrpmodem: selectSummary

Retrieve statistics for internal/external configured modem.

URL/system/modem/

HTTP Method

GET

ActionselectAccess Groupsysgrpmodem: reset
Summary

REST API
Fortinet Inc.

Reset statistics for internal/external configured modem.

40systemmodem: connect

URL/system/modem/reset

HTTP Method

POST

Actionreset

Access Groupsysgrpmodem: connect
Summary

Trigger a connect for the configured modem.

URL/system/modem/connect/

HTTP Method

POST

Actionconnect

Access Groupsysgrpmodem: disconnect
Summary

Trigger a disconnect for the configured modem.

URL/system/modem/disconnect/

HTTP Method

POST

Actiondisconnect

Access Groupsysgrp3g-modem: selectSummary

List all 3G modems available via FortiGuard

URL/system/3g-modem/

HTTP Method

GET

41

REST API
Fortinet Inc.

sniffer: selectsystemActionselectAccess Groupsysgrpsniffer: selectSummary

Return a list of all configured packet captures.

URL/system/sniffer/

HTTP Method

GET

ActionselectAccess Groupfwgrp.packet-capture

Response Typearray

sniffer: restart
Summary

Restart specified packet capture.

URL/system/sniffer/restart/

HTTP Method

POST

ActionrestartAccess Groupfwgrp.packet-capture

Response Typearray

Extra parameters
Name

Type

Summarymkey

int

ID of packet capture entry.

REST API
Fortinet Inc.

42

systemsniffer: startsniffer: start
Summary

Start specified packet capture.

URL/system/sniffer/start/

HTTP Method

POST

Actionstart

Access Groupfwgrp.packet-capture

Response Typearray

Extra parameters
Name

Type

Summarymkey

int

ID of packet capture entry.

sniffer: stop
Summary

Stop specified packet capture.

URL/system/sniffer/stop/

HTTP Method

POST

Actionstop

Access Groupfwgrp.packet-capture

Response Typearray

Extra parameters
Name

Type

Summarymkey

int

ID of packet capture entry.

43

REST API
Fortinet Inc.

fsw:selectsystemfsw:selectSummary

Retrieve statistics for configured FortiSwitches

URL/system/fsw/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summary

fsw_idstringFilter: FortiSwitch ID

fsw:update
URL/system/fsw/update/

HTTP Method

POST

ActionupdateAccess Groupsysgrpinterface:selectSummary

Retrieve statistics for all system interfaces.

URL/system/interface/

HTTP Method

GET

ActionselectREST API
Fortinet Inc.

44

systemfsw: update

Access Group

netgrpResponse Typearray

Extra parameters
Name

Type

Summaryinterface_name boolean

stringFilter: interface name.

include_vlan

booleanEnable to include VLANs in result list.

fsw: update
URL/system/fsw/update/

HTTP Method

POST

ActionupdateAccess Group

netgrpinterface:selectSummary

Retrieve statistics for all system interfaces.

URL/system/interface/

HTTP Method

GET

ActionselectAccess Group

netgrpResponse Typearray

Extra parameters
Name

Type

Summaryinterface_name boolean

stringFilter: interface name.

45

REST API
Fortinet Inc.

debug:selectsystemName

Type

Summary

include_vlan

booleanEnable to include VLANs in result list.

debug:selectSummary

Log debug messages to the console (if enabled).

URL/system/debug/

HTTP Method

GET

ActionselectExtra parameters
Name

Type

Summarytype

stringType of message.

msg

stringMessage content.

filestringFile name generating message.

line

stringLine number in file.

REST API
Fortinet Inc.

46

extender: controller

extender: selectextender: controller
extender: selectSummary

Retrieve statistics for specific configured FortiExtender units.

URL/extender-controller/extender/

HTTP Method

GET

ActionselectAccess Group

netgrpResponse Typearray

Extra parameters
Name

Type

Summaryidarray

List of FortiExtender IDs to query.

extender: reset
URL/extender-controller/extender/reset/

HTTP Method

POST

Actionreset

Access Group

netgrp

47

REST API
Fortinet Inc.

firewall: select

user

user
firewall: selectSummary

List authenticated firewall users.

URL/user/firewall/

HTTP Method

GET

ActionselectAccess Groupadmingrp

Response Typearray

firewall: deauth
Summary

Deauthenticate all firewall users.

URL/user/firewall/deauth/

HTTP Method

POST

ActiondeauthAccess Groupadmingrp

banned: selectSummary

Return a list of all banned users by IP.

URL/user/banned/

HTTP Method

GET

ActionselectAccess Groupadmingrp

REST API
Fortinet Inc.

48

user

banned: clear_users

banned: clear_users
Summary

Immediately clear a list of specific banned users by IP.

URL/user/banned/clear_users/

HTTP Method

POST

Actionclear_users

Access Groupadmingrp

Extra parameters
Name

Type

Summaryip_addresses

array

List of banned user IPs to clear. Each
entry in the array must be an object
with the 'ip' property set to the IP of thebanned user.

ipv6

boolean

IPv6 flag that can be set per IP address
listed in 'ip_addresses'.

banned: clear_all
Summary

Immediately clear all banned users.

URL/user/banned/clear_all/

HTTP Method

POST

Actionclear_all

Access Groupadmingrp

fortitoken: activate
Summary

49

Activate a set of FortiTokens by serial number.

REST API
Fortinet Inc.

fortitoken: refresh

user

URL

/user/fortitoken/activate/

HTTP Method

POST

Actionactivate

Access Groupauthgrp

Response Typearray

Extra parameters
Name

Type

Summary

tokensarray

List of FortiToken serial numbers toactivate. If omitted, all tokens will be
used.

fortitoken: refresh
Summary

Refresh a set of FortiTokens by serial number.

URL/user/fortitoken/refresh/

HTTP Method

POST

ActionrefreshAccess Groupauthgrp

ResponseType

array

Extra parameters
Name

Type

Summary

tokensarray

List of FortiToken serial numbers torefresh. If omitted, all tokens will be
used.

REST API
Fortinet Inc.

50

user

fortitoken: provision

fortitoken: provision
Summary

Provision a set of FortiTokens by serial number.

URL/user/fortitoken/provision/

HTTP Method

POST

ActionprovisionAccess Groupauthgrp

Response Typearray

Extra parameters
Name

Type

Summary

tokensarray

List of FortiToken serial numbers toprovision. If omitted, all tokens will be
used.

51

REST API
Fortinet Inc.

av: select

utm

utm
av: selectSummary

Retrieve AntiVirus statistics.

URL/utm/av/

HTTP Method

GET

ActionselectAccess Group

utmgrp.antivirus

av: reset
Summary

Retrieve AntiVirus statistics.

URL/utm/av/reset/

HTTP Method

POST

Actionreset

Access Group

utmgrp.antivirus

web-cat: selectSummary

Reset WebFilter statistics.

URL/utm/web/HTTP Method

GET

ActionselectAccess Group

utmgrp.webfilter

REST API
Fortinet Inc.

52

utm

web-cat: resetweb-cat: reset
Summary

Reset WebFilter statistics.

URL/utm/web/reset/

HTTP Method

POST

Actionreset

Access Group

utmgrp.webfilter

email: selectSummary

Reset Email Filter statistics.

URL/utm/email/

HTTP Method

GET

ActionselectAccess Group

utmgrp.spamfilter

email: reset
Summary

Reset Email Filter statistics.

URL/utm/email/reset/

HTTP Method

POST

Actionreset

Access Group

utmgrp.spamfilter

dlp: selectSummary

53

Reset DLP statistics.

REST API
Fortinet Inc.

dlp: reset

utm

URL

/utm/dlp/

HTTP Method

GEt

ActionselectAccess Group

utmgrp.data-loss-prevention.

dlp: reset
Summary

Reset DLP statistics.

URL/utm/dlp/reset/

HTTP Method

POST

Actionreset

Access Group

utmgrp.data-loss-prevention.

rating-lookup: selectSummary

Lookup FortiGuard rating for a specific URL.

URL

/utm/rating-lookup/

HTTP Method

GET

ActionselectAccess Group

utmgrp.application-control

Response TypeobjectExtra parameters
Name

Type

Summaryurlstring

URL to query.

url

array

List of URLs to query.

REST API
Fortinet Inc.

54

utm

app: selectapp: selectSummary

Retrieve application control statistics.

URL/utm/app/

HTTP Method

GET

ActionselectAccess Group

utmgrp.application-control

app: reset
Summary

Reset application control statistics.

URL/utm/app/reset/

HTTP Method

POST

Actionreset

Access Group

utmgrp.application-control

app-lookup: selectSummary

Query remote FortiFlow database to resolve hosts toapplication control entries.

URL/utm/app-lookup/

HTTP Method

GET

ActionselectAccess Groupany

Response Type

array

55

REST API
Fortinet Inc.

app-lookup: selectutm

Extra parameters
Name

Type

Summary

hosts

array

List of hosts to resolve.

address

stringDestination IP for one host entry.

dst_port

int

Destination port for one host entry.

protocolint

Protocol for one host entry.

REST API
Fortinet Inc.

56

webfilter

override: selectwebfilter
override: selectSummary

List all administrative and user initiated webfilter overrides.

URL/webfilter/override/

HTTP Method

GET

ActionselectAccess Group

utmgrp.webfilter

override: delete
URL/webfilter/override/

HTTP Method

POST

ActiondeleteAccess Group

utmgrp.webfilter

57

REST API
Fortinet Inc.

device-type-dist: selectvisibility

visibility
device-type-dist: selectSummary

Retrieve a breakdown of detected devices by type.

URL/visibility/device-type-dist/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summary

include_joined

stringInclude joined
devices (devices
with more than 1
MAC address).

device-os-dist: selectSummary

Retrieve a breakdown of detected devices by operating system.

URL/visibility/device-os-dist/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Type

array

REST API
Fortinet Inc.

58

visibility

device-list: select

Extra parameters
Name

Type

Summary

include_joined

stringInclude joined
devices (devices
with more than 1
MAC address).

device-list: selectSummary

Retrieve a list of detected devices.

URL/visibility/device-list/

HTTP Method

GET

ActionselectAccess GroupsysgrpResponse Typearray

Extra parameters
Name

Type

Summary

os_namestringFilter: operating
system name.

type_namestringFilter: device type
name.

include_joined

stringInclude joined
devices (devices
with more than 1
MAC address).

59

REST API
Fortinet Inc.

ipsec:select

vpn

vpn
ipsec:selectSummary

Return an array of active IPsec VPNs

URL

/vpn/ipsec/

HTTP Method

GET

ActionselectAccess Group

vpngrpResponse Typearray

Extra parameters
Name

Type

SummarytunnelstringFilter for a specific
IPsec tunnel name.

start

int

Starting entry index.

count

int

Maximum numberof entries to return.

ipsec: tunnel_up
Summary

Bring up a specific IPsec VPN tunnel.

URL/vpn/ipsec/tunnel_up/

HTTP Method

POST

Actiontunnel_up

Access Group

vpngrpREST API
Fortinet Inc.

60

vpn

ipsec: tunnel_down

Extra parameters
Name

Type

Summary

p1namestringIPsec phase1 name.

p2namestringIPsec phase2 name.

p2serial

stringIPsec phase2 serial.

ipsec: tunnel_down
Summary

Bring down a specific IPsec VPN tunnel.

URL/vpn/ipsec/tunnel_down/

HTTP Method

POST

Actiontunnel_down

Access Group

vpngrpExtra parameters
Name

Type

Summary

p1namestringIPsec phase1 name.

p2namestringIPsec phase2 name.

p2serial

stringIPsec phase2 serial.

ipsec: tunnel_reset_stats
Summary

Reset statistics for a specific IPsec VPN tunnel.

URL/vpn/ipsec/tunnel_reset_stats/

HTTP Method

POST

Actiontunnel_reset_stats

Access Group

vpngrp

61

REST API
Fortinet Inc.

auto-ipsec: selectvpn

Extra parameters
Name

Type

Summaryp2namestringIPsec phase2 name.

auto-ipsec: selectSummary

Retrieve a list of all auto-IPsec tunnels.

URL/vpn/auto-ipsec/

HTTP Method

GETw

ActionselectAccess Group

vpngrpauto-ipsec: accept
URL/vpn/auto-ipsec/accept/

HTTP Method

POST

ActionacceptAccess Group

vpngrpauto-ipsec: reject
URL/vpn/auto-ipsec/reject/

HTTP Method

POST

ActionrejectAccess Group

vpngrpREST API
Fortinet Inc.

62

vpn

ssl: selectssl: selectSummary

Retrieve a list of all SSL-VPN sessions and sub-sessions.

URI/vpn/ssl/

HTTP Method

GET

ActionselectAccess Group

vpngrpssl: clean_tunnel
URI/vpn/ssl/clean_tunnel/

HTTP Method

POST

Actionclean_tunnel

Access Group

vpngrpssl: delete
URL/vpn/ssl/delete/

HTTP Method

POST

ActiondeleteAccess Group

vpngrp

63

REST API
Fortinet Inc.

peer_stats: selectwanoptwanoptpeer_stats: selectSummary

Retrieve a list of WAN opt peer statistics.

URL/wanopt/peer_stats/

HTTP Method

GET

ActionselectAccess Groupwanoptgrp

peer_stats: reset
Summary

Reset WAN opt peer statistics.

URL/wanopt/peer_stats/reset/

HTTP Method

POST

Actionreset

Access Groupwanoptgrp

REST API
Fortinet Inc.

64

webcachestats: selectwebcachestats: selectSummary

Retrieve webcache statistics.

URL/webcache/stats/

HTTP Method

GET

Actionreset

Access Groupwanoptgrp

Response Typearray

Extra Parameters
Name

Type

Summary

periodstringStatistics period [10min|hour|day|month].

stats: reset
Summary

Reset all webcache statistics.

URL/webcache/stats/reset/

HTTP Method

POST

Actionreset

Access Groupwanoptgrp

65

REST API
Fortinet Inc.

client: select

wifi

wifi
client: selectSummary

Retrieve a list of connected WiFi clients.

URI/wifi/client/

HTTP Method

GET

ActionselectAccess Groupwifi

Response Typearray

Extra parameters
Name

Type

Summary

start

int

Starting entry index.

count

int

Maximum number of entries toreturn.

type

stringRequest type [all*|fail-login].

managed_ap: selectSummary

Retrieve a list of managed FortiAPs

URL/wifi/managed_ap/

HTTP Method

GET

Access Groupwifi

Response Type

array

REST API
Fortinet Inc.

66

wifi

managed_ap: set_status

Extra Parameters
Name

Type

Summarywtp_idstringFilter: single managed FortiAP by ID.

incl_local

booleanEnable to include the local FortiWiFi
device in the results.

managed_ap: set_status
Summary

Retrieve statistics for all managed FortiAPs.

URL/wifi/managed_ap/set_status/

HTTP Method

POST

Actionset_status

ap_status: selectSummary

Retrieve statistics for all managed FortiAPs

URL/wifi/ap_status/

HTTP Method

GET

ActionselectAccess Groupwifi

interfering_ap: selectSummary

Retrieve a list of interferring APs for one FortiAP.

URL/wifi/interfering_ap/

HTTP Method

GET

67

REST API
Fortinet Inc.

euclid: selectwifi

ActionselectAccess Groupwifi

Response Typearray

Extra Parameters
Name

Type

Summary

wtp

string

FortiAP ID to query.

radio_idintRadio ID.

euclid: selectSummary

Retrieve presence analytics statistics.

URL/wifi/euclid/

HTTP Method

GET

ActionselectAccess Groupwifi

euclid: reset
URL/wifi/euclid/reset/

HTTP Method

POST

Actionreset

Access Groupwifi

rogue_ap: selectSummary

REST API
Fortinet Inc.

Retrieve a list of detected rogue APs.

68

wifi

rogue_ap: clear_all

URL/wifi/rogue_ap/

HTTP Method

GET

ActionselectAccess Groupwifi

Response Typearray

Extra Parameters
Name

Type

Summary

start

int

Starting entry index.

count

int

Maximum number of entries toreturn.

rogue_ap: clear_all
URL/wifi/rogue_ap/clear_all

HTTP Method

POST

Actionclear_all

Access Groupwifi

rogue_ap: set_status
URL/wifi/rogue_ap/set_status/

HTTP Method

POST

Actionset_status

Access Group

wifi

69

REST API
Fortinet Inc.

rogue_ap: restartwifi

rogue_ap: restartURL/wifi/rogue_ap/restart/

HTTP Method

POST

ActionrestartAccess Groupwifi

spectrum: selectSummary

Retrieve spectrum analysis information for a specific
FortiAP .

URL/wifi/spectrum/

HTTP Method

GET

ActionselectAccess Groupwifi

Response TypeobjectExtra Parameters
Name

Type

Summarywtp_idstring

FortiAP ID to query

REST API
Fortinet Inc.

70

Copyright© 2015 Fortinet, Inc. All rights reserved. Fortinet®, FortiGate®, FortiCare® and FortiGuard®, and certain other marks are registered trademarks of Fortinet, Inc., in
the U.S. and other jurisdictions, and other Fortinet names herein may also be registered and/or common law trademarks of Fortinet. All other product or company names may be
trademarks of their respective owners. Performance and other metrics contained herein were attained in internal lab tests under ideal conditions, and actual performance andother results may vary. Network variables, different network environments and other conditions may affect performance results. Nothing herein represents any binding
commitment by Fortinet, and Fortinet disclaims all warranties, whether express or implied, except to the extent Fortinet enters a binding written contract, signed by Fortinet’s
General Counsel, with a purchaser that expressly warrants that the identified product will perform according to certain expressly-identified performance metrics and, in such
event, only the specific performance metrics expressly identified in such binding written contract shall be binding on Fortinet. For absolute clarity, any such warranty will belimited to performance in the same ideal conditions as in Fortinet’s internal lab tests. In no event does Fortinet make any commitment related to future deliverables, features, ordevelopment, and circumstances may change such that any forward-looking statements herein are not accurate. Fortinet disclaims in full any covenants, representations,andguarantees pursuant hereto, whether express or implied. Fortinet reserves the right to change, modify, transfer, or otherwise revise this publication without notice, and the mostcurrent version of the publication shall be applicable.