0% found this document useful (0 votes)
330 views

FortiOS 5.6.11 Rest API - Reference

Uploaded by

신용호
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
330 views

FortiOS 5.6.11 Rest API - Reference

Uploaded by

신용호
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 129

FortiOS - REST API Reference

Version 5.6.11
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com

FORTINET VIDEO GUIDE
https://video.fortinet.com

FORTINET BLOG
https://blog.fortinet.com

CUSTOMER SERVICE & SUPPORT
https://support.fortinet.com

FORTINET TRAINING & CERTIFICATION PROGRAM


https://www.fortinet.com/support-and-training/training.html

NSE INSTITUTE
https://training.fortinet.com

FORTIGUARD CENTER
https://fortiguard.com/

END USER LICENSE AGREEMENT


https://www.fortinet.com/doc/legal/EULA.pdf

FEEDBACK
Email: techdoc@fortinet.com

August 15, 2019


FortiOS 5.6.11 REST API Reference
01-5611-414177-20190815
TABLE OF CONTENTS

Change Log 5
Introduction 6
What's New in the REST API 6
Authentication 6
Session-based authentication 6
Token-based authentication 8
Authorization 11
Supported HTTP methods 11
Response codes 11
Debugging 12
CMDB API 14
URL path 14
URL parameters 14
Generic parameters 15
Specific parameters 15
Body data 16
Limitation 16
Filter with multiple key/value pairs 17
Filter Syntax 17
Filter Operators 17
Combining Filters 17
Reserved Characters 18
List of Methods 18
collection 19
resource 19
Examples 22
Retrieve table 22
Retrieve table schema 23
Retrieve table default 23
Purge table 23
Retrieve object 23
Create object 24
Edit object 24
Delete object 24
Clone object 24
Move object 25
Append child object 25
Edit child object 25
Delete child object 25
Purge child table 25
Retrieve complex table 26

FortiOS REST API Reference Fortinet Inc.


4

Edit complex table 26


Global requests (apply to all accessible vdoms) 26
Monitor API 27
URL path 27
URL parameters 27
Generic parameters 27
Specific parameters 28
Body data 28
File upload 28
File upload via JSON data 28
File upload via multi-part file 29
File download 29
File download via browser 29
File download via script 29
List of Methods 30
endpoint-control 39
firewall 44
fortiview 55
geoip 56
ips 57
license 57
log 59
router 63
system 66
switch-controller 82
vpn-certificate 99
extender-controller 103
user 104
utm 110
virtual-wan 112
webfilter 112
vpn 115
wanopt 118
webproxy 120
webcache 120
wifi 121
coverage 126
Examples 127

FortiOS REST API Reference Fortinet Inc.


Change Log

Date Change Description

2019-08-15 Initial release.

FortiOS REST API Reference Fortinet Inc.


Introduction

This document provides the REST API information supported in FortiOS 5.6.11. This document covers a reference of
the REST API supported by the FortiOS GUI.
FortiOS 5.6.11 supports the following REST APIs:
l CMDB API
l Retrieve object meta data (default, schema)
l Retrieve object/table (with filter, format, start, count, other flags)
l Create object
l Modify object
l Delete object
l Clone object
l Move object
l Monitor API
l Retrieve/Reset endpoint stats (with filter, start, count)
l Perform endpoint operations
l Upload/Download file
l Restore/Backup config
l Upgrade/Downgrade firmware
l Restart/Shutdown FGT

What's New in the REST API

No major change to the REST API endpoints.

Authentication

Starting in FortiOS 5.6.1, there are two ways that user can authenticate against the API:
l Session-based authentication (legacy)
l Token-based authentication (5.6.1 and newer)

Session-based authentication

As the name suggests, the authentication is valid per login session. The user needs to send a login request to obtain a
authentication cookie and CSRF token to be used for subsequent requests. The user then needs to send a logout
request to invalidate the authentication cookie and CSRF token.

FortiOS REST API Reference Fortinet Inc.


Introduction 7

Authentication Cookie

Authentication cookie (APSCOOKIE) is provided by the API after a successful login request. All subsequent requests
must include this cookie to be authorized by the API. Any request without the cookie or with mismatched cookie will be
denied access to the API (HTTP 401 error code).

CSRF Tokens

Cross-Site Request Forgery (CSRF) Tokens are alphanumeric values that are passed back-and-forth between client and
server to ensure that a user's form submission does not originate from an offsite document.
The CSRF token is available in the session ccsrftoken cookie, which must be included in the request header under
X-CSRFTOKEN. See test script sample for how to handle CSRF token.

Only write requests (HTTP POST/PUT/DELETE) need CSRF tokens. Read requests (HTTP
GET) do not require CSRF tokens.

Setting Up an Authenticated Session

To authenticate with the FortiGate and request a session, send a POST request to the log in request handler with your
username and password.

Login URL /logincheck

The request body must contain the following keys in URL form encoding:

Key Type Description

username String The admin username.

secretkey String The password for that admin.

ajax Int (1) Required: Format the response for easier parsing. Enable using 1.

Example:

POST /logincheck
username=AdminUser&secretkey=AdminPassword&ajax=1

Ensure that you're using the correct protocol. By default, a FortiGate? will redirect HTTP requests to HTTPS and your
login requests may fail. As well, FortiGate? 's will use a self-signed server certificate by default. Refer to the
documentation for the specific library or framework that you're using to validate the certificate manually.
The response to this request will be in the following format:
<status_code><javascript>

A successful login response would be:


1document.location="/ng/prompt?viewOnly&redir=%2Fng%2F";

For most uses, you only need to read the first character of the response body to get the response status code.

FortiOS REST API Reference Fortinet Inc.


Introduction 8

Code Description

0 Log in failure. Most likely an incorrect username/password combo.

1 Successful log in*

2 Admin is now locked out

3 Two-factor Authentication is needed**

* In some cases users may receive a successful login status but not be completely authenticated, such as when there is
a post-login-banner configured.
** For Two-Factor log in, make another POST request with the same username and password, but include the token_
code parameter with the value of the one-time-password.
Once you've received a successful login status, read each Set-Cookie header and retain the following Cookies:

Name Description

APSCOOKIE_<NUMBER> This cookie authenticates you with the FortiGate . You must present this cookie
with every subsequent request you make after logging in.

ccsrftoken This is the (c)CSRF token. As described in Authorization on page 11, you must
provide the value of this cookie as a X-CSRFTOKEN header. *

*There may be two ccsrftoken cookies, one with a number suffix that matches the APSCOOKIE. For simplicity, you
don't need to locate that cookie and can rely on the ccsrftoken cookie.

Logging out of an Authenticated Session

Authenticated sessions will remain active with the device until any of the following occurs:
l The admin logs out
l The session remains inactive for longer than the timeout specified by the admintimeout setting in config
system global
l The admin is disconnected by another admin
There are a limited number of admins that can have active sessions on the device, therefore it's recommended that you
log out when you're finished using the device.
To log out, a POST request to the /logout URL will remove the current session.

Logout URL /logout

Body data none needed

Token-based authentication

The authentication is done via a single API token. This token is only generated once when creating an API admin. The
user must store this token in a safe place because it cannot be retrieved again. The user can however regenerate the
token at any time. Each API request must include the token in order to be authenticated as the associated API admin.

FortiOS REST API Reference Fortinet Inc.


Introduction 9

Only HTTPS access is allowed with token-based authentication to ensure maximum security.

Create API admin

In order to use the token-based authentication, user must first create a special API admin. The user can assign vdom
provision and admin profile to this API admin which defines the admin's privileges.

Only Super admin can create or modify API admin.

config system api-user


edit "api-admin"
set comments "admin for API access only"
set api-key ENC SH23sQt? +/9D9/mKb1oQoDvlP32ggn/cpQeGcY/VGUe5S5WIr5nqU20xcNMYDQE=
set accprofile "API profile"
set vdom "root"
config trusthost
edit 1
set ipv4-trusthost 192.168.10.0 255.255.255.0
next
end
next
end

GUI does not allow user to pick super admin or prof_admin profile for API admin to
encourage user to use a special profile.

Trusted host

At least one trusted host must be configured for the API admin. The user can define multiple trusted host/subnet. IPv6
hosts are also supported.

PKI Certificate

Token-based also supports certificate matching as an extra layer of security (set PKI group in api-user). Both client
certificate and token must match to be granted access to the API. PKI option is enabled by default.

CORS permission

Token-based also supports Cross Origin Resource Sharing (CORS) allowing third-party web apps to make API requests
to FGT using the token. CORS is disabled by default.

FortiOS REST API Reference Fortinet Inc.


Introduction 10

Generate API token

After creating the api-user, user can generate new token via CLI command, GUI, or REST API. The token is only shown
once and cannot be retrieved after. The user needs to generate new token if they forget.
CLI command:
execute api-user generate-key [API user name]

New API key: fccys3cfbhyhqbqghkyzm1QGNnm31r

The bearer of this API key will be granted all access privileges assigned to the api-user api-
admin.

REST API

Request Body data Description

POST /api/v2/monitor/system/api- {'api-user':"api- "Generate a new api-key for the specified


user/generate-key?vdom=root admin"} api-key-auth admin. The old api-key will be
replaced. The response contains the only
chance to read the new api-key plaintext in
the access_token field."

Use the API token

The API token can be included in any REST API request via either request header or URL parameter

Passing API token via request header

The user needs to explicitly add the following field to the request header: 'Authorization': 'Bearer ' +
[api_token]
Authorization: Bearer fccys3cfbhyhqbqghkyzm1QGNnm31r

Passing API token via request URL parameter

The user needs to explicitly include the following field in the request URL parameter: access_token=[api_token]

Method URL Body Description


data

GET /api/v2/cmdb/firewall/address ?vdom=root&access_ Retrieve all IPv4


token=fccys3cfbhyhqbqghkyzm1QGNnm31r firewall
addresses,
vdom root

FortiOS REST API Reference Fortinet Inc.


Introduction 11

Authorization

After the request is authenticated, the API will check if the associated admin has the permission to perform the
operation. Each admin or API admin has an admin profile and vdom scope which define the privileges of the admin. For
example, if the admin has vdom scope set to "vdom1" and a profile that only has read-only permission to Firewall
objects access group, the admin can only access vdom1 resource, and cannot make change to Firewall objects (policy,
address, etc).
Each endpoint requires specific group permission defined in 'Access Group' of the endpoint summary table. Request to
the endpoint will be checked against this access group to ensure the admin has proper permission to access the
resource. Make sure the administrative account you login with has the permissions required to perform the intended
actions.
Admin with read-only permission to the resource can only send read requests (HTTP GET) to the resource. Admin with
write permission to the resource can send read/write requests (HTTP GET/POST/PUT/DELETE) to the resource. Admin
with no permission to the resource cannot access the resource.
Request with insufficient profile permission will return 403 error.

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, you must provide the X-CSRFTOKEN header in the request. The value of this header is
the value of the ccsrftoken cookie that is provided by the FortiGate when you log in.
If the request is submitted using HTTP POST , the HTTP method can also be overridden using the "X-HTTP-Method-
Override" HTTP header.

Response codes

FortiOS APIs use well-defined HTTP status codes to indicate the results of queries to the API.
The following table shows how some of the HTTP status codes are used in the context of FortiOS REST APIs.

FortiOS REST API Reference Fortinet Inc.


Introduction 12

HTTP Response Code Description

200 - OK Request returns successful.

400 - Bad Request Request cannot be processed by the API.

401 - Not Authorized Request without successful login session.

403 - Forbidden Request is missing CSRF token or administrator is missing access profile
permissions.

404 - Resource 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 Request cannot be processed due to large entity.

424 - Failed Dependency Fail dependency can be duplicate resource, missing required parameter, missing
required attribute, invalid attribute value.

429 - Too many requests The request is actively blocked by FGT due to a rate limit. For example, if an
admin uses invalid credentials too many times, there will be a timeout before
they can try again.

500 - Internal Server Error Internal error when processing the request.

Debugging

Verbose debug output can be enabled in the FortiGate CLI with the following commands:
diagnose debug enable
diagnose debug application httpsd -1

This will produce the following output when the REST API for IPv4 policy statistics is queried:
[httpsd 228 - 1418751787] http_config.c[558] ap_invoke_handler -- new request (handler='api_
monitor_v2-handler', uri='/api/v2/monitor/firewall/policy', method='GET')
[httpsd 228 - 1418751787] http_config.c[562] ap_invoke_handler -- User-Agent: Mozilla/5.0
(Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/39.0.2171.71 Safari/537.36
[httpsd 228 - 1418751787] http_config.c[565] ap_invoke_handler -- Source: 192.168.1.100:56256
Destination: 192.168.1.99:443
[httpsd 228 - 1418751787] api_monitor.c[1427] api_monitor_v2_handler -- received api_monitor_
v2_request from '192.168.1.100'
[httpsd 228 - 1418751787] aps_access.c[3652] aps_chk_rolebased_perm -- truncated URI
(/api/v2/monitor/firewall/policy) to (/api/v2/monitor) for permission check
[httpsd 228 - 1418751787] api_monitor.c[1265] handle_req_v2_vdom -- attempting to change from
vdom "root" to vdom "root"
[httpsd 228 - 1418751787] api_monitor.c[1280] handle_req_v2_vdom -- new API request
(action='select',path='firewall',name='policy',vdom='root',user='admin')
[httpsd 228 - 1418751787] api_monitor.c[1286] handle_req_v2_vdom -- returning to original vdom
"root"
[httpsd 228 - 1418751787] http_config.c[581] ap_invoke_handler -- request completed
(handler='api_monitor_v2-handler' result==0)

FortiOS REST API Reference Fortinet Inc.


Introduction 13

This debug will also include all requests to/from the FortiOS web interface, in addition to
REST API requests.

FortiOS REST API Reference Fortinet Inc.


CMDB API

CMDB API is used to retrieve and modify CLI configurations. For example, create/edit/delete firewall policy.

URL path

All CMDB requests start with '/api/v2/cmdb/'. Below is the format of CMDB URL path.
/api/v2/cmdb/<path>/<name>/<mkey>(optional)/<child_name>(optional)/<child_mkey>(optional)/

CMDB URL path follows CLI commands syntax with an exception of vdom configuration.

CLI path name mkey child_ child_ Full URL


Command name mkey

configure vdom system vdom /api/v2/cmdb/system/vdom/

configure vdom, edit vdom1 system vdom vdom1 /api/v2/cmdb/system/


vdom/vdom1/

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


recurring schedule firewall.schedule/recurring/

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

configure firewall policy, firewall policy 1 /api/v2/cmdb/firewall/policy/1/


edit 1

configure firewall policy, firewall policy 1 srcintf /api/v2/cmdb/firewall/


edit 1, set srcintf policy/1/srcintf/

configure firewall policy, firewall policy 1 srcintf lan /api/v2/cmdb/firewall/


edit 1, delete srcintf lan policy/1/srcintf/lan/

For operations on the entire table, mkey is not needed. For instance, add new entry, get all entries, purge table.
For operations on a specific resource, mkey is required. For example, edit/delete/clone/move a firewall policy.
For operations on the child table, child_name is required. For example, retrieve child table, purge child table, add new
entry to child table.
For operations on the child table entry, child_mkey is required. For example, delete/move child object.

URL parameters

In addition to the URL path, user can specify URL parameters which are appended to the URL path.

FortiOS REST API Reference Fortinet Inc.


CMDB API 15

Generic parameters

The following URL parameters are generic to all CMDB requests.

URL parameter Example Description

vdom=root GET Return result/apply changes on the specified


/api/v2/cmdb/firewall/address/?vdom=root vdom. If vdom parameter is not provided, use
current vdom instead. If admin does not have
access to the vdom, return permission error.

global=1 GET Return a list of results/apply changes on all


/api/v2/cmdb/firewall/address/?global=1 provisioned vdoms. The request is only
applicable to vdoms that the admin has access
to.

Specific parameters

Each CMDB method may require extra URL parameters which are unique to the method. Those extra parameters are
documented in the "Extra Parameters" section of each CMDB method.
Below are some examples.

URL parameter Example Description

action=schema GET /api/v2/cmdb/firewall/policy Return schema of the resource table


/?action=schema

action=default GET /api/v2/cmdb/firewall/policy Return default attributes of the resource


/?action=default

action=move PUT /api/v2/cmdb/firewall/policy/1 Move policy 1 to after policy 2


/?action=move&after=2

action=clone POST Clone 'address1' to 'address1_clone'


/api/v2/cmdb/firewall/address/address1
/?action=clone&nkey=address1_clone

skip=1 GET Return a list of all firewall policy but only show
/api/v2/cmdb/firewall/policy/?skip=1 relevant attributes

skip=1 GET Return firewall policy 1 but only show relevant


/api/v2/cmdb/firewall/policy/1/?skip=1 attributes

format=policyid|action GET /api/v2/cmdb/firewall/policy Return a list of all firewall policy, however,


/?format=policyid|action only show policyid and action for each policy

format=policyid|action GET /api/v2/cmdb/firewall/policy Return firewall policy 1, however, only show


/1?format=policyid|action policyid and action

start=0&count=10 GET /api/v2/cmdb/firewall/address Return the first 10 firewall addresses


/?start=0&count=10

FortiOS REST API Reference Fortinet Inc.


CMDB API 16

URL parameter Example Description

key=type&pattern=fqdn GET /api/v2/cmdb/firewall/address Return all addresses with type fqdn


/?key=type&pattern=fqdn

filter=type==fqdn GET /api/v2/cmdb/firewall/address Return all addresses with type fqdn


/?filter=type==fqdn

filter=type== GET /api/v2/cmdb/firewall/address Return all addresses with type fqdn or ipmask
fqdn,type==ipmask&filter= /?filter=type==fqdn,type== which has visibility enabled
visibility==enable ipmask&filter=visibility==enable

Body data

Beside URL parameters, some POST/PUT requests also require body data, which must be included in the HTTP body.
For example, to create/edit firewall address object, user needs to specify the new/edit object data.
GET/DELETE requests do not accept body data.

Request Body data Description

POST /api/v2/cmdb/firewall/address?vdom=root {'name':"address1", 'type': create new firewall address


"ipmask", 'subnet': "1.1.1.0 with the specified data
255.255.255.0"}

PUT {'subnet': "2.2.2.0 edit firewall address with the


/api/v2/cmdb/firewall/address/address1?vdom=root 255.255.255.0"} specified data

Limitation

If the body data has the same name as some reserved URL parameters, such as name, path, or action, the request
would fail due to the conflict. For example, firewall policy has 'name' and 'action' attribute which conflict with the
reserved URL parameter 'name' and 'action'. POST/PUT with normal method would fail with 405 error. A workaround is
to enclosed all object data in a 'json' keyword so the API can correctly identify object data. For example:

Request Body data Descripti


on

POST {'name':"test_policy", 'srcintf': [{"name":"port1"}], 'dstintf': This


/api/v2/cmdb/firewall/policy?vdom [{"name":"port2"}],'srcaddr': [{"name":"all"}],'dstaddr': would fail
=root [{"name":"all"}],'action':"accept",'status':"enable",'schedule':"always with 405
",'service':[{'name':"ALL"}],'nat':"disable"} error

POST {'json':{'name':"test_policy", 'srcintf': [{"name":"port1"}], 'dstintf': This


/api/v2/cmdb/firewall/policy?vdom [{"name":"port2"}],'srcaddr': [{"name":"all"}],'dstaddr': would
=root [{"name":"all"}],'action':"accept",'status':"enable",'schedule':"always work
",'service':[{'name':"ALL"}],'nat':"disable"}}

FortiOS REST API Reference Fortinet Inc.


CMDB API 17

Filter with multiple key/value pairs

Filtering multiple key/value pairs are also supported for all CMDB retrieval requests via 'filter' URL parameter.

Filter Syntax

Filters are defined in the following syntax: key operator pattern

Key Operator Pattern Full Request Description

schedule == always GET Only return firewall policy with


/api/v2/cmdb/firewall/policy/?filter= schedule 'always'
schedule==always

schedule != always GET Return all firewall policy with


/api/v2/cmdb/firewall/policy/?filter= schedule other than 'always'
schedule!=always

Filter Operators

Operator Description

== Case insensitive match with pattern.

!= Does not match with pattern (case insensitive).

=@ Pattern found in object value (case insensitive).

!@ Pattern not found in object value (case insensitive).

<= Value must be less than or equal to pattern.

< Value must be less than pattern.

>= Value must be greater than or equal to pattern.

> Value must be greater than pattern.

Combining Filters

Filters can be combined to create complex queries.

Combination Description Example

Logical OR Separate filters using commas ",". The GET /api/v2/cmdb/firewall/policy?filter=


following example returns all policies schedule==always,schedule==once
using the always schedule or the once
schedule.

FortiOS REST API Reference Fortinet Inc.


CMDB API 18

Combination Description Example

Logical AND Filter strings can be combined to create GET /api/v2/cmdb/firewall/policy/?filter=


logical AND queries by including multiple schedule==always&filter=action==accept
filters in the request. This example
includes all policies using schedule
always AND action accept.

Combining You can combine AND and OR filters GET /api/v2/cmdb/firewall/policy/?filter=


AND and OR together to create more complex filters. schedule==always&filter=action==accept,action==deny
This example includes all policies using
schedule always AND action accept OR
action deny.

Reserved Characters

The following characters need to be escaped if they are part of a filter pattern.

Character Escaped Value

, \,

\ \\

List of Methods

Type HTTP Method Action Summary

collection GET Select all entries in a CLI table.

resource GET default Return the CLI default values for this object type.

resource GET default Return the CLI default values for entire CLI tree.

resource GET schema Return the CLI schema for this object type.

resource GET schema Return schema for entire CLI tree.

collection DELETE Delete all objects in this table.

collection POST Create an object in this table.

resource GET Select a specific entry from a CLI table.

resource PUT Update this specific resource.

resource PUT move Move this specific resource.

resource POST clone Clone this specific resource.

FortiOS REST API Reference Fortinet Inc.


CMDB API 19

Type HTTP Method Action Summary

resource DELETE Delete this specific resource.

resource GET Build API directory.

collection

GET

Summary Select all entries in a CLI table.

HTTP Method GET

ETag Caching Enabled

Response Type array

Extra parameters

Name Type Summary Required

datasource boolean Enable to include datasource information for each linked object. No

start int Starting entry index. No

count int Maximum number of entries to return. No

with_meta boolean Enable to include meta information about each object (type id, No
references, etc).

skip boolean Enable to call CLI skip operator to hide skipped properties. No

format string List of property names to include in results, separated by | (i.e. No


policyid|srcintf).

filter string Comma separated list of key value pairs to filter on. Filters will be No
logically OR'd together.

key string If present, objects will be filtered on property with this name. No

pattern string If present, objects will be filtered on property with this value. No

resource

GET: default

Summary Return the CLI default values for this object type.

FortiOS REST API Reference Fortinet Inc.


CMDB API 20

HTTP Method GET

ETag Caching Enabled

Response Type object

GET: default

Summary Return the CLI default values for entire CLI tree.

HTTP Method GET

Response Type object

GET: schema

Summary Return the CLI schema for this object type.

HTTP Method GET

ETag Caching Enabled

Response Type object

GET: schema

Summary Return schema for entire CLI tree.

HTTP Method GET

Response Type object

DELETE

Summary Delete all objects in this table.

HTTP Method DELETE

POST

Summary Create an object in this table.

HTTP Method POST

FortiOS REST API Reference Fortinet Inc.


CMDB API 21

GET

Summary Select a specific entry from a CLI table.

HTTP Method GET

ETag Caching Enabled

Response Type array

Extra parameters

Name Type Summary Required

datasource boolean Enable to include datasource information for each linked object. No

with_meta boolean Enable to include meta information about each object (type id, No
references, etc).

skip boolean Enable to call CLI skip operator to hide skipped properties. No

format string List of property names to include in results, separated by | (i.e. No


policyid|srcintf).

PUT

Summary Update this specific resource.

HTTP Method PUT

PUT: move

Summary Move this specific resource.

HTTP Method PUT

Extra parameters

Name Type Summary Required

before string The ID of the resource that this resource will be moved before. No

after string The ID of the resource that this resource will be moved after. No

FortiOS REST API Reference Fortinet Inc.


CMDB API 22

POST: clone

Summary Clone this specific resource.

HTTP Method POST

Extra parameters

Name Type Summary Required

nkey string The ID for the new resouce to be created. No

DELETE

Summary Delete this specific resource.

HTTP Method DELETE

GET

Summary Build API directory.

HTTP Method GET

Examples

Retrieve table

Method URL URL Parameters Body Description


Data

GET /api/v2/cmdb/ ?vdom=root Retrieve all IPv4 firewall addresses,


firewall/address vdom root

GET /api/v2/cmdb/ ?vdom=root&start= Retrieve the first 10 firewall


firewall/address 0&count=10&skip=1 addresses, skip inapplicable
attributes, vdom root

GET /api/v2/cmdb/ ?vdom=root&format=name|type Retrieve all firewall addresses but only


firewall/address show name and type, vdom root

GET /api/v2/cmdb/ ?vdom=root&key= Retrieve all fqdn firewall addresses,


firewall/address type&pattern=fqdn vdom root

FortiOS REST API Reference Fortinet Inc.


CMDB API 23

Method URL URL Parameters Body Description


Data

GET /api/v2/cmdb/ ?vdom=root&filter=type==fqdn Retrieve all fqdn firewall addresses,


firewall/address vdom root

GET /api/v2/cmdb/ ?vdom=root&filter= Retrieve all fqdn or iprange firewall


firewall/address type==fqdn,type==iprange addresses, vdom root

GET /api/v2/cmdb/ ?vdom=root&filter=type== Retrieve all fqdn firewall addresses


firewall/address fqdn&filter=associated- that belong to lan interface, vdom root
interface==lan

Retrieve table schema

Method URL URL Parameters Body Description


Data

GET /api/v2/cmdb/firewall/address ?action=schema Retrieve firewall address object's schema

Retrieve table default

Method URL URL Parameters Body Description


Data

GET /api/v2/cmdb/firewall/address ?action=default Retrieve firewall address object's default

Purge table

Method URL URL Parameters Body Description


Data

DELETE /api/v2/cmdb/firewall/address ?vdom=root Purge all firewall addresses, vdom root

Retrieve object

Method URL URL Parameters Body Description


Data

GET /api/v2/cmdb/ ?action=select&vdom=root Retrieve only firewall address


firewall/address/address1 'address1', vdom root

FortiOS REST API Reference Fortinet Inc.


CMDB API 24

Create object

Method URL URL Body Data Description


Parameters

POST /api/v2/cmdb/firewall/address ?vdom=root {"name":"address1"} Create firewall address


'address1', root vdom

POST /api/v2/cmdb/application/list ?vdom=root {"name":"profile1"} Create application list profile1,


vdom root

Edit object

Method URL URL Parameters Body Data Description

PUT /api/v2/cmdb/firewall/ ?vdom=root {"name":"address2"} Rename 'address1' to 'address2',


address/address1 vdom root

PUT /api/v2/cmdb/firewall/ ?vdom=root {"comment":"test Edit 'address1' to update comment


address/address1 comment"} 'test comment', vdom root

PUT /api/v2/cmdb/ ?vdom=root {"entries":[{"id":1, Edit profile1 to add child object '1'
application/list/profile1 "application": which has child table 'applications',
[{"id":31236}, vdom root
{"id":31237}]}]}

Delete object

Method URL URL Body Description


Parameters Data

DELETE /api/v2/cmdb/firewall/address/address1 ?vdom=root Delete firewall address 'address1',


root vdom

Clone object

Method URL URL Parameters Body Description


Data

POST /api/v2/cmdb/ ?vdom=root&action= Clone 'address1' to 'address1_clone', root


firewall/address/address1 clone&nkey=address1_ vdom
clone

FortiOS REST API Reference Fortinet Inc.


CMDB API 25

Move object

Method URL URL Parameters Body Description


Data

PUT /api/v2/cmdb/ ?vdom=root&action= Move policy 1 to after policy 2, root vdom


firewall/policy/1 move&after=2

Append child object

Method URL URL Parameters Body Description


Data

POST /api/v2/cmdb/application ?vdom=root {"id":3} Add 3 to application profile1 child table


/list/profile1/entries entries, vdom root

Edit child object

Method URL URL Parameters Body Data Description

PUT /api/v2/cmdb/application ?vdom=root {"application": Edit child entry 3 to update child


/list/profile1/entries/3 [{"id":31236}, application list, vdom root
{"id":31237}]}

Delete child object

Method URL URL Parameters Body Description


Data

DELETE /api/v2/cmdb/application ?vdom=root Delete 3 from application profile1 child


/list/profile1/entries/3 table entries, vdom root

Purge child table

Method URL URL Parameters Body Description


Data

DELETE /api/v2/cmdb/application ?vdom=root Purge application profile1 child table


/list/profile1/entries entries, vdom root

FortiOS REST API Reference Fortinet Inc.


CMDB API 26

Retrieve complex table

Method URL URL Parameters Body Description


Data

GET /api/v2/cmdb/vpn.ssl/settings ?action=select Retrieve vpn ssl settings object

Edit complex table

Method URL URL Parameters Body Data Description

PUT /api/v2/cmdb/ ?vdom=root {"authentication- Edit complex object vpn.ssl.settings to


vpn.ssl/settings rule":[{"id":"1"}, create/modify child table, vdom root
{"id":"2"}]}

Global requests (apply to all accessible vdoms)

Method URL URL Parameters Body Data Description

GET /api/v2/cmdb/ ?global=1 Retrieve all IPv4 firewall addresses,


firewall/address all accessible vdoms

POST /api/v2/cmdb/ ?global=1 {"name":"address1"} Create firewall address 'address1' for


firewall/address all accessible vdoms

DELETE /api/v2/cmdb/firewall/ ?global=1 Delete firewall address 'address1' for


address/address1 all accessible vdoms

FortiOS REST API Reference Fortinet Inc.


Monitor API

Monitor API is used to perform specific actions on endpoint resources. For example, retrieve/close firewall sessions,
restart/shutdown FGT, backup/restore config file.

URL path

All Monitor API requests start with '/api/v2/monitor/'. Below is the format of Monitor URL path:
/api/v2/monitor/<uri>/

Each Monitor endpoint has a specific URI, which are provided by the URI field of each endpoint.

URI Full URL Description

/firewall/policy/ GET List traffic statistics for all IPv4 policies


/api/v2/monitor/firewall/policy/

/firewall/policy/reset POST Reset traffic statistics for all IPv4 policies


/api/v2/monitor/firewall/policy/reset

URL parameters

In addition to the URL path, user can specify URL parameters which are appended to the URL path.

Generic parameters

The following URL parameters are generic to all Monitor requests.

URL parameter Example Description

vdom=root GET /api/v2/monitor/ Return result/apply changes on the specified vdom. If


firewall/policy/?vdom=root vdom parameter is not provided, use current vdom
instead. If admin does not have access to the vdom,
return permission error.

global=1 GET /api/v2/monitor/ Return a list of results/apply changes on all provisioned


firewall/policy/?global=1 vdoms. The request is only applicable to vdoms that the
admin has access to.

FortiOS REST API Reference Fortinet Inc.


Monitor API 28

Specific parameters

Each Monitor endpoint may require extra URL parameters which are unique to the endpoint. Those extra parameters
are documented in the "Extra Parameters" section of each endpoint.
Required parameters are marked with "required: true" flag.
Below are some examples.

URL parameter Example Description

count=-1 GET Return all ipv4 firewall sessions


/api/v2/monitor/firewall/session?count=1

ip_version=ipv6&count=10 GET /api/v2/monitor/firewall/ Return the first 10 ipv6 firewall


session?ip_version=ipv6&count=10 sessions

Body data

Beside URL parameters, some POST requests also require body data, which must be included in the HTTP body. The
extra body data are documented in "Extra Parameters" section of each endpoint.
GET requests do not accept body data.
Required body data are marked with "required: true" flag.
Below are some examples.

Request Body Data Description

POST /api/v2/monitor/firewall/ {'pro': "udp", 'saddr': "192.168.100.110", Close the specific ipv4 firewall
session/close?vdom=root 'daddr': "96.45.33.73", 'sport': 55933, sessions
'dport': 8888}

File upload

File upload is supported for some endpoints. For example, upload VM license, restore config file. The upload file must
be stored in the HTTP body. There are two different methods to do so: via JSON data or multi-part file.

File upload via JSON data

The upload file can be encoded directly into the HTTP body as JSON data using the 'file_content' field.

The JSON data must be encoded in base64 format.


For instance, below is how you can upload/restore config file via JSON data using Python Requests module.
self.session.post(url='/api/v2/monitor/system/config/restore',
params={"vdom": "vdom1"},

FortiOS REST API Reference Fortinet Inc.


Monitor API 29

data={"source": "upload",
"scope": "vdom",
"file_content": b64encode(open("vd1.conf.txt", "r").read())})

File upload via multi-part file

Another way to store upload file in HTTP body is to include it as a multi-part file.
The multi-part file does not need to be encoded in base64 format.
For instance, below is how you can upload/restore config file via multi-part file using Python Requests module.
self.session.post(url='/api/v2/monitor/system/config/restore',
params={"vdom": "vdom1"},
data={"source": "upload",
"scope": "vdom"},
files=[('random_name',
('random_conf.conf', open("vd1.conf.txt", "r"), 'text/plain'))])

File download

File download is also supported in some endpoints. For example, download CA certificate, backup config file.
The downloaded file is stored in the response's raw content, not JSON data.
For example, here is the request to download global certificate name Fortinet_Factory, type local, scope
global:
GET /api/v2/monitor/system/certificate/download?mkey=Fortinet_Factory&type=local&scope=global

File download via browser

When sending file download request via a browser, the browser automatically checks the response's header for
'Content-Disposition': attachment. If present, the browser will download the file to local directory using the
name.

File download via script

When sending file download request via a script, the script will need to manually perform the above steps to convert the
response's content into a file. For example, the script needs to check the response header for 'Content-
Disposition': attachment, and write the content into a local file with the given name.

FortiOS REST API Reference Fortinet Inc.


Monitor API 30

List of Methods

URI HTTP Method Summary

endpoint-control/profile/xml/ GET List XML representation for each endpoint-control profile.

endpoint-control/registration- POST Check if provided registration password is valid for current


password/check/ VDOM.

endpoint-control/record- GET List endpoint records.


list/select/

endpoint- GET Summary of FortiClient registrations.


control/registration/summary/

endpoint- POST Quarantine endpoint by FortiClient UID or MAC.


control/registration/quarantine/

endpoint- POST Unquarantine endpoint by FortiClient UID or MAC.


control/registration/unquarantine/

endpoint- POST Block endpoint by FortiClient UID or MAC.


control/registration/block/

endpoint- POST Unblock endpoint by FortiClient UID or MAC.


control/registration/unblock/

endpoint- POST Deregister endpoint by FortiClient UID or MAC.


control/registration/deregister/

endpoint-control/installer/select/ GET List available FortiClient installers.

endpoint- GET Download a FortiClient installer via FortiGuard.


control/installer/download/

endpoint- GET Download an endpoint avatar image.


control/avatar/download/

firewall/health/select/ GET List configured load balance server health monitors.

firewall/local-in/select/ GET List implicit and explicit local-in firewall policies.

firewall/acl/select/ GET List counters for all IPv4 ACL.

firewall/acl/clear_counters/ POST Reset counters for one or more IPv4 ACLs by policy ID.

firewall/acl6/select/ GET List counters for all IPv6 ACL.

firewall/acl6/clear_counters/ POST Reset counters for one or more IPv6 ACLs by policy ID.

firewall/internet-service- GET List internet services that exist at a given IP or Subnet.


match/select/

firewall/policy/select/ GET List traffic statistics for all IPv4 policies.

FortiOS REST API Reference Fortinet Inc.


Monitor API 31

URI HTTP Method Summary

firewall/policy/reset/ POST Reset traffic statistics for all IPv4 policies.

firewall/policy/clear_counters/ POST Reset traffic statistics for one or more IPv4 policies by policy
ID.

firewall/policy6/select/ 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 or more IPv6 policies by policy
ID.

firewall/proxy-policy/select/ GET List traffic statistics for all explicit proxy policies.

firewall/proxy-policy/clear_ POST Reset traffic statistics for one or more explicit proxy policies by
counters/ policy ID.

firewall/policy-lookup/select/ GET Performs a policy lookup by creating a dummy packet and


asking the kernel which policy would be hit.

firewall/session/select/ GET List all active firewall sessions (optionally filtered).

firewall/session/clear_all/ POST Immediately clear all active IPv4 and IPv6 sessions and IPS
sessions of current VDOM.

firewall/session/close/ POST Close a specific firewall session that matches all provided
criteria.

firewall/session-top/select/ GET List of top sessions by specified grouping criteria.

firewall/shaper/select/ GET List of statistics for configured firewall shapers.

firewall/shaper/reset/ POST Reset statistics for all configured traffic shapers.

firewall/load-balance/select/ GET List all firewall load balance servers.

firewall/address-fqdns/select/ GET List of FQDN address objects and the IPs they resolved to.

firewall/ippool/select/ GET List IPv4 pool statistics.

firewall/address-dynamic/select/ GET List of Dynamic SDN address objects and the IPs they resolve
to.

firewall/address6-dynamic/select/ GET List of IPv6 Dynamic SDN address objects and the IPs they
resolve to.

fortiview/statistics/select/ GET Retrieve drill-down and summary data for FortiView (both
realtime and historical).

fortiview/session/cancel/ POST Cancel a FortiView request session.

fortiview/sandbox-file- GET Retrieve FortiSandbox analysis details for a specific file


details/select/ checksum.

FortiOS REST API Reference Fortinet Inc.


Monitor API 32

URI HTTP Method Summary

geoip/geoip-query/select/ GET Retrieve location details for IPs queried against FortiGuard's
geoip service.

ips/rate-based/select/ GET Returns a list of rate-based signatures in IPS package.

license/status/select/ GET Get current license & registration status.

license/database/upgrade/ POST Upgrade IPS database on this device using uploaded file.

license/forticare-resellers/select/ GET Get current FortiCare resellers for the requested country.

license/forticare-org-list/select/ GET Get FortiCare organization size and industry lists.

log/current-disk-usage/select/ GET Return current used, free and total disk bytes.

log/device/state/ GET Retrieve information on state of log devices.

log/forticloud/select/ GET Return FortiCloud log status.

log/fortianalyzer/select/ GET Return FortiAnalyzer/FortiManager log status.

log/fortianalyzer-queue/select/ GET Retrieve information on FortiAnalyzer's queue state. Note:-


FortiAnalyzer logs are queued only if upload-option is realtime.

log/hourly-disk-usage/select/ GET Return historic hourly disk usage in bytes.

log/historic-daily-remote- GET Returns the amount of logs in bytes sent daily to a remote
logs/select/ logging service (FortiCloud or FortiAnalyzer).

log/stats/select/ GET Return number of logs sent by category per day for a specific
log device.

log/stats/reset/ POST Reset logging statistics for all log devices.

log/forticloud-report/download/ GET Download PDF report from FortiCloud.

log/ips-archive/download/ GET Download IPS/application control packet capture files. Uses


configured log display device.

log/policy-archive/download/ GET Download policy-based packet capture archive.

log/av-archive/download/ GET Download file quarantined by AntiVirus.

router/ipv4/select/ GET List all active IPv4 routing table entries.

router/ipv6/select/ GET List all active IPv6 routing table entries.

router/statistics/select/ GET Retrieve routing table statistics, including number of matched


routes.

router/lookup/select/ GET Performs a route lookup by querying the routing table.

router/policy/select/ GET Retrieve a list of active IPv4 policy routes.

router/policy6/select/ GET Retrieve a list of active IPv6 policy routes.

FortiOS REST API Reference Fortinet Inc.


Monitor API 33

URI HTTP Method Summary

system/admin/toggle-vdom- POST Toggles VDOM mode on/off. Enables or disables VDOM mode
mode/ if it is disabled or enabled respectively.

system/api-user/generate-key/ POST Generate a new api-key for the specified api-key-auth admin.
The old api-key will be replaced. The response contains the
only chance to read the new api-key plaintext in the api_key
field.

system/config-revision/select/ GET Returns a list of system configuration revisions.

system/config-revision/update- POST Updates comments for a system configuration file.


comments/

system/config-revision/delete/ POST Deletes one or more system configuration revisions.

system/config-revision/file/ GET Download a specific configuration revision.

system/config-revision/info/ GET Retrieve meta information for a specific configuration revision.

system/config-revision/save/ POST Create a new config revision checkpoint.

system/current-admins/select/ GET Return a list of currently logged in administrators.

system/disconnect- POST Disconnects logged in administrators.


admins/select/

system/time/set/ POST Sets current system time stamp.

system/time/select/ GET Gets current system time stamp.

system/os/reboot/ POST Immediately reboot this device.

system/os/shutdown/ POST Immediately shutdown this device.

system/global-resources/select/ GET Retrieve current usage of global resources as well as both the
default and user configured maximum values.

system/vdom-resource/select/ GET Retrieve VDOM resource information, including CPU and


memory usage.

system/dhcp/select/ GET Returns a list of all DHCP IPv4 and IPv6 DHCP leases.

system/dhcp/revoke/ POST Revoke IPv4 DHCP leases.

system/dhcp6/revoke/ POST Revoke IPv6 DHCP leases.

system/firmware/select/ GET Retrieve a list of firmware images available to use for upgrade
on this device.

system/firmware/upgrade/ POST Upgrade firmware image on this device using uploaded file.

system/firmware/upgrade-paths/ GET Retrieve a list of supported firmware upgrade paths.

FortiOS REST API Reference Fortinet Inc.


Monitor API 34

URI HTTP Method Summary

system/fsck/start/ POST Set file system check flag so that it will be executed on next
device reboot.

system/storage/select/ GET Retrieve information for the non-boot disk.

system/change-password/select/ POST Save admin and guest-admin passwords.

system/password-policy- POST Check whether password conforms to the password policy.


conform/select/

system/csf/select/ GET Retrieve a full tree of downstream FortiGates registered to the


Security Fabric.

system/modem/select/ GET Retrieve statistics for internal/external configured modem.

system/modem/reset/ POST Reset statistics for internal/external configured modem.

system/modem/connect/ POST Trigger a connect for the configured modem.

system/modem/disconnect/ POST Trigger a disconnect for the configured modem.

system/modem/update/ POST Update supported modem list from FortiGuard.

system/3g-modem/select/ GET List all 3G modems available via FortiGuard.

system/resource/usage/ GET Retreive current and historical usage data for a provided
resource.

system/sniffer/select/ 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/sniffer/download/ GET Download a stored packet capture.

system/fsw/select/ GET Retrieve statistics for configured FortiSwitches

system/fsw/update/ POST Update administrative state for a given FortiSwitch (enable or


disable authorization).

system/fsw/restart/ POST Restart a given FortiSwitch.

system/fsw/upgrade/ POST Upgrade firmware image on the given FortiSwitch using


uploaded file.

system/fsw/poe-reset/ POST Reset PoE on a given FortiSwitch's port.

system/fsw-firmware/select/ GET Retrieve a list of recommended firmware for managed


FortiSwitches.

switch-controller/managed- GET Retrieve DHCP servers monitored by FortiSwitches.


switch/dhcp-snooping/

FortiOS REST API Reference Fortinet Inc.


Monitor API 35

URI HTTP Method Summary

switch-controller/managed- GET Retrieve XML for rendering FortiSwitch faceplate widget.


switch/faceplate-xml/

switch-controller/validate-switch- GET Validate a FortiSwitch serial number prefix.


prefix/select/

system/interface/select/ GET Retrieve statistics for all system interfaces.

system/available- GET Retrieve a list of all interfaces along with some meta
interfaces/select/ information regarding their availability.

system/acquired-dns/select/ GET Retrieve a list of interfaces and their acquired DNS servers.

system/resolve-fqdn/select/ GET Resolves the provided FQDNs to FQDN -> IP mappings.

system/usb-log/select/ GET Retrieve information about connected USB drives, including


estimated log sizes.

system/usb-log/start/ POST Start backup of logs from current VDOM to USB drive.

system/usb-log/stop/ POST Stop backup of logs to USB drive.

system/ipconf/select/ GET Determine if there is an IP conflict for a specific IP using ARP.

system/fortiguard/update/ POST Immediately update status for FortiGuard services.

system/fortiguard/clear-cache/ POST Immediately clear all FortiGuard statistics.

system/fortiguard/test- POST Test availability of FortiGuard services.


availability/

system/fortiguard/server-info/ GET Get FortiGuard server list and information.

system/fortimanager/status/ GET Get FortiManager status.

system/fortimanager/config/ POST Configure FortiManager address.

system/available- GET Get available certificates.


certificates/select/

system/certificate/download/ GET Download certificate.

system/debug/select/ POST Log debug messages to the console (if enabled).

system/debug/download/ GET Download debug report for technical support.

system/com-log/dump/ POST Dump system com-log to file.

system/com-log/update/ GET Fetch system com-log file dump progress.

system/com-log/download/ GET Download com-log file (after file dump is complete).

system/botnet/stat/ GET Retrieve statistics for FortiGuard botnet database.

FortiOS REST API Reference Fortinet Inc.


Monitor API 36

URI HTTP Method Summary

system/botnet/select/ GET List all known IP-based botnet entries in FortiGuard botnet
database.

system/botnet-domains/select/ GET List all known domain-based botnet entries in FortiGuard


botnet database.

system/botnet-domains/stat/ GET List statistics on domain-based botnet entries in FortiGuard


botnet database.

system/ha-statistics/select/ GET List of statistics for members of HA cluster.

system/ha-history/select/ GET Get HA cluster historical logs.

system/ha-checksums/select/ GET List of checksums for members of HA cluster.

system/ha-peer/select/ GET Get configuration of peer(s) in HA cluster. Uptime is expressed


in seconds.

system/ha-peer/update/ POST Update configuration of peer in HA cluster.

system/ha-peer/disconnect/ POST Update configuration of peer in HA cluster.

system/link-monitor/select/ GET Retrieve per-interface statistics for active link monitors.

system/compliance/run/ POST Immediately run compliance checks for the selected VDOM.

system/config/restore/ POST Restore system configuration from uploaded file or from USB.

system/config/backup/ GET Backup system config

system/config/usb-filelist/ GET List configuration files available on connected USB drive.

system/sandbox/status/ GET Retrieve sandbox status.

system/sandbox/stats/ GET Retrieve sandbox statistics.

system/object/usage/ GET Retrieve all objects that are currently using as well as objects
that can use the given object.

system/timezone/select/ GET Get world timezone and daylight saving time.

system/vmlicense/upload/ POST Update VM license using uploaded file. Reboots immediately if


successful.

system/sensor-info/select/ GET Retrieve system sensor status.

system/audit/select/ GET Retrieve Security Fabric audit results.

system/fortiguard- GET Retrieve blacklist information for a specified IP.


blacklist/select/

vpn-certificate/ca/import/ POST Import CA certificate.

vpn-certificate/crl/import/ POST Import certificate revocation lists (CRL) from file content.

FortiOS REST API Reference Fortinet Inc.


Monitor API 37

URI HTTP Method Summary

vpn-certificate/local/import/ POST Import local certificate.

vpn-certificate/remote/import/ POST Import remote certificate.

vpn-certificate/csr/generate/ POST Generate a certificate signing request (CSR) and a private key.
The CSR can be retrieved / downloaded from CLI, GUI and
REST API.

system/check-port- GET Check whether a list of TCP port ranges is available for a
availability/select/ certain service.

extender- GET Retrieve statistics for specific configured FortiExtender units.


controller/extender/select/

extender- POST Reset a specific FortiExtender unit.


controller/extender/reset/

user/firewall/select/ GET List authenticated firewall users.

user/firewall/deauth/ POST Deauthenticate single, multiple, or all firewall users.

user/banned/select/ 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/add_users/ POST Immediately add one or more users to the banned list.

user/banned/clear_all/ POST Immediately clear all banned users.

user/fortitoken/select/ GET Retrieve a map of FortiTokens and their status.

user/fortitoken/activate/ POST Activate a set of FortiTokens by serial number.

user/device/select/ GET Retrieve a list of detected devices.

user/fortitoken/refresh/ POST Refresh a set of FortiTokens by serial number.

user/fortitoken/provision/ POST Provision a set of FortiTokens by serial number.

user/fortitoken/send-activation/ POST Send a FortiToken activation code to a user via SMS or Email.

user/fsso/refresh-server/ POST Refresh remote agent group list for all fsso agents.

user/fsso/select/ GET Get a list of fsso and fsso polling status.

utm/rating-lookup/select/ GET Lookup FortiGuard rating for a specific URL.

utm/app-lookup/select/ GET Query remote FortiFlow database to resolve hosts to


application control entries.

utm/application- GET Retrieve a list of application control categories.


categories/select/

utm/antivirus/stats/ GET Retrieve antivirus scanning statistics.

FortiOS REST API Reference Fortinet Inc.


Monitor API 38

URI HTTP Method Summary

virtual-wan/health-check/select/ GET Retrieve health-check statistics for each SD-WAN link.

virtual-wan/members/select/ GET Retrieve interface statistics for each SD-WAN link.

webfilter/override/select/ GET List all administrative and user initiated webfilter overrides.

webfilter/override/delete/ POST Delete a configured webfilter override.

webfilter/malicious-urls/select/ GET List all URLs in FortiSandbox malicious URL database.

webfilter/malicious-urls/stat/ GET Retrieve statistics for the FortiSandbox malicious URL


database.

webfilter/category-quota/select/ GET Retrieve quota usage statistics for webfilter categories.

webfilter/category-quota/reset/ POST Reset webfilter quota for user or IP.

webfilter/fortiguard- GET Return FortiGuard web filter categories.


categories/select/

webfilter/trusted-urls/select/ GET List all URLs in FortiGuard trusted URL database.

vpn/ipsec/select/ 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/ssl/select/ GET Retrieve a list of all SSL-VPN sessions and sub-sessions.

vpn/ssl/clear_tunnel/ POST Remove all active tunnel sessions in current virtual domain.

vpn/ssl/delete/ POST Terminate the provided SSL-VPN session.

vpn/ssl/stats/ GET Return statistics about the SSL-VPN.

wanopt/history/select/ GET Retrieve WAN opt. statistics history.

wanopt/history/reset/ POST Reset WAN opt. statistics.

wanopt/webcache/select/ GET Retrieve webcache statistics history.

wanopt/webcache/reset/ POST Reset webcache statistics.

wanopt/peer_stats/select/ GET Retrieve a list of WAN opt peer statistics.

wanopt/peer_stats/reset/ POST Reset WAN opt peer statistics.

webproxy/pacfile/download/ GET Download webproxy PAC file.

webcache/stats/select/ GET Retrieve webcache statistics.

webcache/stats/reset/ POST Reset all webcache statistics.

wifi/client/select/ GET Retrieve a list of connected WiFi clients.

FortiOS REST API Reference Fortinet Inc.


Monitor API 39

URI HTTP Method Summary

wifi/managed_ap/select/ GET Retrieve a list of managed FortiAPs.

wifi/managed_ap/set_status/ POST Update administrative state for a given FortiAP (enable or


disable authorization).

wifi/firmware/select/ GET Retrieve a list of current and recommended firmware for


FortiAPs in use.

wifi/managed_ap/restart/ POST Restart a given FortiAP.

wifi/managed_ap/upgrade/ POST Upgrade firmware image on the given FortiAP using uploaded
file.

wifi/ap_status/select/ GET Retrieve statistics for all managed FortiAPs.

wifi/interfering_ap/select/ GET Retrieve a list of interfering APs for one FortiAP radio.

wifi/euclid/select/ GET Retrieve presence analytics statistics.

wifi/euclid/reset/ POST Reset presence analytics statistics.

wifi/rogue_ap/select/ GET Retrieve a list of detected rogue APs.

wifi/rogue_ap/clear_all/ POST Clear all detected rogue APs.

wifi/rogue_ap/set_status/ POST Mark detected APs as rogue APs.

wifi/spectrum/select/ GET Retrieve spectrum analysis information for a specific FortiAP.

coverage/download/select/ GET Download code coverage.

endpoint-control

profile: xml

Summary List XML representation for each endpoint-control profile.

URI endpoint-control/profile/xml/

HTTP Method GET

Action xml

Access Group endpoint-control-grp

Response Type array

Extra parameters

Name Type Summary Required

mkey string Name of endpoint-control profile. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 40

registration-password: check

Summary Check if provided registration password is valid for current VDOM.

URI endpoint-control/registration-password/check/

HTTP Method POST

Action check

Access Group endpoint-control-grp

Response Type boolean

Extra parameters

Name Type Summary Required

password string Registration password to test. Yes

record-list: select

Summary List endpoint records.

URI endpoint-control/record-list/select/

HTTP Method GET

Action select

Access Group endpoint-control-grp

Response Type array

Extra parameters

Name Type Summary Required

intf_name string Filter: Name of interface where the endpoint was detected. No

registration: summary

Summary Summary of FortiClient registrations.

URI endpoint-control/registration/summary/

HTTP Method GET

Action summary

Access Group endpoint-control-grp

FortiOS REST API Reference Fortinet Inc.


Monitor API 41

registration: quarantine

Summary Quarantine endpoint by FortiClient UID or MAC.

URI endpoint-control/registration/quarantine/

HTTP Method POST

Action quarantine

Access Group endpoint-control-grp

Extra parameters

Name Type Summary Required

uid array Array of FortiClient UIDs to quarantine. No

uid string Single FortiClient UID to quarantine. No

mac array Array of MACs to quarantine. No

mac string Single MAC to quarantine. No

registration: unquarantine

Summary Unquarantine endpoint by FortiClient UID or MAC.

URI endpoint-control/registration/unquarantine/

HTTP Method POST

Action unquarantine

Access Group endpoint-control-grp

Extra parameters

Name Type Summary Required

uid array Array of FortiClient UIDs to unquarantine. No

uid string Single FortiClient UID to unquarantine. No

mac array Array of MACs to unquarantine. No

mac string Single MAC to unquarantine. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 42

registration: block

Summary Block endpoint by FortiClient UID or MAC.

URI endpoint-control/registration/block/

HTTP Method POST

Action block

Access Group endpoint-control-grp

Extra parameters

Name Type Summary Required

uid array Array of FortiClient UIDs to block. No

uid string Single FortiClient UID to block. No

mac array Array of MACs to block. No

mac string Single MAC to block. No

registration: unblock

Summary Unblock endpoint by FortiClient UID or MAC.

URI endpoint-control/registration/unblock/

HTTP Method POST

Action unblock

Access Group endpoint-control-grp

Extra parameters

Name Type Summary Required

uid array Array of FortiClient UIDs to unblock. No

uid string Single FortiClient UID to unblock. No

mac array Array of MACs to unblock. No

mac string Single MAC to unblock. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 43

registration: deregister

Summary Deregister endpoint by FortiClient UID or MAC.

URI endpoint-control/registration/deregister/

HTTP Method POST

Action deregister

Access Group endpoint-control-grp

Extra parameters

Name Type Summary Required

uid array Array of FortiClient UIDs to deregister. No

uid string Single FortiClient UID to deregister. No

mac array Array of MACs to deregister. No

mac string Single MAC to deregister. No

installer: select

Summary List available FortiClient installers.

URI endpoint-control/installer/select/

HTTP Method GET

Action select

Access Group endpoint-control-grp

Extra parameters

Name Type Summary Required

min_version string Filter: Minimum installer version. (String of the format n[.n[.n]]). No

installer: download

Summary Download a FortiClient installer via FortiGuard.

URI endpoint-control/installer/download/

HTTP Method GET

FortiOS REST API Reference Fortinet Inc.


Monitor API 44

Action download

Access Group endpoint-control-grp

Response Type object

Extra parameters

Name Type Summary Required

mkey string Name of installer (image_id). Yes

avatar: download

Summary Download an endpoint avatar image.

URI endpoint-control/avatar/download/

HTTP Method GET

Action download

Access Group endpoint-control-grp

ETag Caching Enabled

Response Type object

Extra parameters

Name Type Summary Required

uid string Single FortiClient UID. No

user string User name of the endpoint. No

alias string Alias of the device. Used to lookup device avatar when endpoint No
avatar is not available.

default string Default avatar name ['authuser'|'unauthuser'|'authuser_ No


72'|'unauthuser_72']. Default avatar when endpoint / device avatar is
not available. If default is not set, Not found 404 is returned.

firewall

health: select

Summary List configured load balance server health monitors.

FortiOS REST API Reference Fortinet Inc.


Monitor API 45

URI firewall/health/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

local-in: select

Summary List implicit and explicit local-in firewall policies.

URI firewall/local-in/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

Response Type array

acl: select

Summary List counters for all IPv4 ACL.

URI firewall/acl/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

acl: clear_counters

Summary Reset counters for one or more IPv4 ACLs by policy ID.

URI firewall/acl/clear_counters/

HTTP Method POST

Action clear_counters

Access Group fwgrp.policy

FortiOS REST API Reference Fortinet Inc.


Monitor API 46

Extra parameters

Name Type Summary Required

policy array Array of policy IDs to reset. No

policy int Single policy ID to reset. No

acl6: select

Summary List counters for all IPv6 ACL.

URI firewall/acl6/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

acl6: clear_counters

Summary Reset counters for one or more IPv6 ACLs by policy ID.

URI firewall/acl6/clear_counters/

HTTP Method POST

Action clear_counters

Access Group fwgrp.policy

Extra parameters

Name Type Summary Required

policy array Array of policy IDs to reset. No

policy int Single policy ID to reset. No

internet-service-match: select

Summary List internet services that exist at a given IP or Subnet.

URI firewall/internet-service-match/select/

HTTP Method GET

Action select

FortiOS REST API Reference Fortinet Inc.


Monitor API 47

Access Group fwgrp.address

Response Type array

Extra parameters

Name Type Summary Required

ip string IP (in dot-decimal notation). Yes

mask string IP Mask (in dot-decimal notation). Yes

policy: select

Summary List traffic statistics for all IPv4 policies.

URI firewall/policy/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

policy: reset

Summary Reset traffic statistics for all IPv4 policies.

URI firewall/policy/reset/

HTTP Method POST

Action reset

Access Group fwgrp.policy

policy: clear_counters

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

URI firewall/policy/clear_counters/

HTTP Method POST

Action clear_counters

Access Group fwgrp.policy

FortiOS REST API Reference Fortinet Inc.


Monitor API 48

Extra parameters

Name Type Summary Required

policy array Array of policy IDs to reset. No

policy int Single policy ID to reset. No

policy6: select

Summary List traffic statistics for all IPv6 policies.

URI firewall/policy6/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

policy6: reset

Summary Reset traffic statistics for all IPv6 policies.

URI firewall/policy6/reset/

HTTP Method POST

Action reset

Access Group fwgrp.policy

policy6: clear_counters

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

URI firewall/policy6/clear_counters/

HTTP Method POST

Action clear_counters

Access Group fwgrp.policy

Extra parameters

Name Type Summary Required

policy array Array of policy IDs to reset. No

policy int Single policy ID to reset. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 49

proxy-policy: select

Summary List traffic statistics for all explicit proxy policies.

URI firewall/proxy-policy/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

proxy-policy: clear_counters

Summary Reset traffic statistics for one or more explicit proxy policies by policy ID.

URI firewall/proxy-policy/clear_counters/

HTTP Method POST

Action clear_counters

Access Group fwgrp.policy

Extra parameters

Name Type Summary Required

policy array Array of policy IDs to reset. No

policy int Single policy ID to reset. No

policy-lookup: select

Summary Performs a policy lookup by creating a dummy packet and asking the kernel which
policy would be hit.

URI firewall/policy-lookup/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 50

Extra parameters

Name Type Summary Required

ipv6 boolean Perform an IPv6 lookup? No

srcintf string Source interface. Yes

sourceport int Source port. No

sourceip string Source IP. No

protocol string Protocol. Yes

dest string Destination IP/FQDN. Yes

destport int Destination port. Yes

icmptype int ICMP type. No

icmpcode int ICMP code. No

session: select

Summary List all active firewall sessions (optionally filtered).

URI firewall/session/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

Extra parameters

Name Type Summary Required

ip_version string IP version [*ipv4 | ipv6 | ipboth]. No

start int Starting entry index. No

count int Maximum number of entries to return. Yes

summary boolean Enable/disable inclusion of session summary (setup rate, total No


sessions, etc).

sourceport int Filter: Source port. No

policyid int Filter: Policy ID. No

application int Filter: Application ID. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 51

Name Type Summary Required

application string Filter: Application PROTO/PORT. (e.g. "TCP/443") No

protocol int Filter: Protocol name [all|igmp|tcp|udp|icmp|etc]. No

destport int Filter: Destination port. No

srcintf string Filter: Source interface name. No

dstintf string Filter: Destination interface name. No

srcintfrole array Filter: Source interface roles. No

dstintfrole array Filter: Destination interface roles. No

source string Filter: Source IP address. No

destination string Filter: Destination IP address. No

username string Filter: Authenticated username. No

shaper string Filter: Forward traffic shaper name. No

country string Filter: Destination country name. No

natsourceaddress string Filter: NAT source address. No

natsourceport string Filter: NAT source port. No

session: clear_all

Summary Immediately clear all active IPv4 and IPv6 sessions and IPS sessions of current
VDOM.

URI firewall/session/clear_all/

HTTP Method POST

Action clear_all

Access Group sysgrp

Response Type int

session: close

Summary Close a specific firewall session that matches all provided criteria.

URI firewall/session/close/

HTTP Method POST

FortiOS REST API Reference Fortinet Inc.


Monitor API 52

Action close

Access Group sysgrp

Extra parameters

Name Type Summary Required

pro string Protocol name [tcp|udp|icmp|...]. Yes

saddr string Source address. Yes

daddr string Destination address. Yes

sport string Source port. Yes

dport string Destination port. Yes

session-top: select

Summary List of top sessions by specified grouping criteria.

URI firewall/session-top/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

Extra parameters

Name Type Summary Required

report_by string Criteria to group results by [source*|destination|application|web- No


category|web-domain|srcintf|dstintf|policy|country].

sort_by string Criteria to sort results by [bytes|msg-counts]. No

count int Maximum number of entries to return. No

filter object A map of filter keys to string values. The key(s) may be srcintf, No
source, dstintf, srcintfrole, dstintfrole, destination, policyid,
application, web_category_id, web_domain, country.

shaper: select

Summary List of statistics for configured firewall shapers.

FortiOS REST API Reference Fortinet Inc.


Monitor API 53

URI firewall/shaper/select/

HTTP Method GET

Action select

Access Group fwgrp.others

Response Type array

shaper: reset

Summary Reset statistics for all configured traffic shapers.

URI firewall/shaper/reset/

HTTP Method POST

Action reset

Access Group fwgrp.others

load-balance: select

Summary List all firewall load balance servers.

URI firewall/load-balance/select/

HTTP Method GET

Action select

Access Group fwgrp.others

Response Type array

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return. Yes

address-fqdns: select

Summary List of FQDN address objects and the IPs they resolved to.

URI firewall/address-fqdns/select/

FortiOS REST API Reference Fortinet Inc.


Monitor API 54

HTTP Method GET

Action select

Access Group fwgrp.address

Response Type object

ippool: select

Summary List IPv4 pool statistics.

URI firewall/ippool/select/

HTTP Method GET

Action select

Access Group fwgrp.policy

Response Type object

address-dynamic: select

Summary List of Dynamic SDN address objects and the IPs they resolve to.

URI firewall/address-dynamic/select/

HTTP Method GET

Action select

Access Group fwgrp.address

Response Type object

address6-dynamic: select

Summary List of IPv6 Dynamic SDN address objects and the IPs they resolve to.

URI firewall/address6-dynamic/select/

HTTP Method GET

Action select

Access Group fwgrp.address

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 55

fortiview

statistics: select

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

URI fortiview/statistics/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

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

filter object A map of filter keys to arrays of values. No

session: cancel

Summary Cancel a FortiView request session.

URI fortiview/session/cancel/

HTTP Method POST

Action cancel

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

sessionid int Session ID to cancel. No

device int FortiView request session's device. [disk|faz] No

report_by int Report by field. No

view_level int FortiView View level. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 56

sandbox-file-details: select

Summary Retrieve FortiSandbox analysis details for a specific file checksum.

URI fortiview/sandbox-file-details/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

checksum string Checksum of a specific file that has been analyzed by the connected Yes
FortiSandbox.

geoip

geoip-query: select

Summary Retrieve location details for IPs queried against FortiGuard's geoip service.

URI geoip/geoip-query/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

ip_addresses string One or more IP address strings to query for location details. Yes

FortiOS REST API Reference Fortinet Inc.


Monitor API 57

ips

rate-based: select

Summary Returns a list of rate-based signatures in IPS package.

URI ips/rate-based/select/

HTTP Method GET

Action select

Access Group utmgrp.ips

Response Type array

license

status: select

Summary Get current license & registration status.

URI license/status/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

database: upgrade

Summary Upgrade IPS database on this device using uploaded file.

URI license/database/upgrade/

HTTP Method POST

Action upgrade

Access Group updategrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 58

Extra parameters

Name Type Summary Required

db_name string Security service database name [ips_appctrl|antivirus|...] No

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

forticare-resellers: select

Summary Get current FortiCare resellers for the requested country.

URI license/forticare-resellers/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

country_code int FortiGuard country code No

forticare-org-list: select

Summary Get FortiCare organization size and industry lists.

URI license/forticare-org-list/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 59

log

current-disk-usage: select

Summary Return current used, free and total disk bytes.

URI log/current-disk-usage/select/

HTTP Method GET

Action select

Access Group loggrp.data-access

device: state

Summary Retrieve information on state of log devices.

URI log/device/state/

HTTP Method GET

Action state

Access Group loggrp.data-access

Response Type object

forticloud: select

Summary Return FortiCloud log status.

URI log/forticloud/select/

HTTP Method GET

Action select

Access Group loggrp.config

fortianalyzer: select

Summary Return FortiAnalyzer/FortiManager log status.

URI log/fortianalyzer/select/

HTTP Method GET

Action select

Access Group loggrp.config

FortiOS REST API Reference Fortinet Inc.


Monitor API 60

Extra parameters

Name Type Summary Required

server string FortiAnalyzer/FortiManager address. No

fortianalyzer-queue: select

Summary Retrieve information on FortiAnalyzer's queue state. Note:- FortiAnalyzer logs are
queued only if upload-option is realtime.

URI log/fortianalyzer-queue/select/

HTTP Method GET

Action select

Access Group loggrp.config

Response Type object

Extra parameters

Name Type Summary Required

scope string Scope from which to retrieve FortiAnalyzer's queue state No


[vdom*|global].

hourly-disk-usage: select

Summary Return historic hourly disk usage in bytes.

URI log/hourly-disk-usage/select/

HTTP Method GET

Action select

Access Group loggrp.data-access

historic-daily-remote-logs: select

Summary Returns the amount of logs in bytes sent daily to a remote logging service
(FortiCloud or FortiAnalyzer).

URI log/historic-daily-remote-logs/select/

HTTP Method GET

FortiOS REST API Reference Fortinet Inc.


Monitor API 61

Action select

Access Group loggrp.data-access

stats: select

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

URI log/stats/select/

HTTP Method GET

Action select

Access Group loggrp.data-access

Response Type array

Extra parameters

Name Type Summary Required

dev string Log device [*memory | disk | fortianalyzer | forticloud]. No

stats: reset

Summary Reset logging statistics for all log devices.

URI log/stats/reset/

HTTP Method POST

Action reset

Access Group loggrp.data-access

forticloud-report: download

Summary Download PDF report from FortiCloud.

URI log/forticloud-report/download/

HTTP Method GET

Action download

Access Group loggrp.data-access

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 62

Extra parameters

Name Type Summary Required

mkey int FortiCloud Report ID. Yes

inline int Set to 1 to download the report inline. No

ips-archive: download

Summary Download IPS/application control packet capture files. Uses configured log
display device.

URI log/ips-archive/download/

HTTP Method GET

Action download

Access Group loggrp.data-access

Response Type object

Extra parameters

Name Type Summary Required

mkey int IPS archive ID. Yes

pcap_no int Packet capture roll number (required when log device is 'disk') No

pcap_category int Packet capture category (required when log device is 'disk') No

policy-archive: download

Summary Download policy-based packet capture archive.

URI log/policy-archive/download/

HTTP Method GET

Action download

Access Group loggrp.data-access

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 63

Extra parameters

Name Type Summary Required

mkey int Session ID (from traffic log). Yes

srcip string Source IP. Yes

dstip string Destination IP. Yes

av-archive: download

Summary Download file quarantined by AntiVirus.

URI log/av-archive/download/

HTTP Method GET

Action download

Access Group loggrp.data-access

Response Type object

Extra parameters

Name Type Summary Required

mkey string Checksum for quarantined file. Yes

router

ipv4: select

Summary List all active IPv4 routing table entries.

URI router/ipv4/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

FortiOS REST API Reference Fortinet Inc.


Monitor API 64

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return (Default for all routes). No

ip_mask string Filter: IP/netmask. No

gateway string Filter: gateway. No

type string Filter: route type. No

interface string Filter: interface name. No

ipv6: select

Summary List all active IPv6 routing table entries.

URI router/ipv6/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return (Default for all routes). No

ip_mask string Filter: IP/netmask. No

gateway string Filter: gateway. No

type string Filter: route type. No

interface string Filter: interface name. No

statistics: select

Summary Retrieve routing table statistics, including number of matched routes.

URI router/statistics/select/

FortiOS REST API Reference Fortinet Inc.


Monitor API 65

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

ip_version int IP version (4|6). If not present, IPv4 and IPv6 will be returned. No

ip_mask string Filter: IP/netmask. No

gateway string Filter: gateway. No

type string Filter: route type. No

interface string Filter: interface name. No

lookup: select

Summary Performs a route lookup by querying the routing table.

URI router/lookup/select/

HTTP Method GET

Action select

Access Group routegrp

Response Type object

Extra parameters

Name Type Summary Required

ipv6 boolean Perform an IPv6 lookup? No

destination string Destination IP/FQDN Yes

policy: select

Summary Retrieve a list of active IPv4 policy routes.

URI router/policy/select/

FortiOS REST API Reference Fortinet Inc.


Monitor API 66

HTTP Method GET

Action select

Access Group routegrp

Response Type array

policy6: select

Summary Retrieve a list of active IPv6 policy routes.

URI router/policy6/select/

HTTP Method GET

Action select

Access Group routegrp

Response Type array

system

admin: toggle-vdom-mode

Summary Toggles VDOM mode on/off. Enables or disables VDOM mode if it is disabled or
enabled respectively.

URI system/admin/toggle-vdom-mode/

HTTP Method POST

Action toggle-vdom-mode

Access Group sysgrp

Response Type object

api-user: generate-key

Summary Generate a new api-key for the specified api-key-auth admin. The old api-key will
be replaced. The response contains the only chance to read the new api-key
plaintext in the api_key field.

URI system/api-user/generate-key/

HTTP Method POST

FortiOS REST API Reference Fortinet Inc.


Monitor API 67

Action generate-key

Access Group admingrp

Response Type object

Extra parameters

Name Type Summary Required

api-user string Generate a new token for this api-user. Yes

config-revision: select

Summary Returns a list of system configuration revisions.

URI system/config-revision/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

config-revision: update-comments

Summary Updates comments for a system configuration file.

URI system/config-revision/update-comments/

HTTP Method POST

Action update-comments

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

config_id int Configuration id. No

comments string Configuration comments. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 68

config-revision: delete

Summary Deletes one or more system configuration revisions.

URI system/config-revision/delete/

HTTP Method POST

Action delete

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

config_ids array List of configuration ids. Yes

config-revision: file

Summary Download a specific configuration revision.

URI system/config-revision/file/

HTTP Method GET

Action file

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

config_id int Configuration id. No

config-revision: info

Summary Retrieve meta information for a specific configuration revision.

URI system/config-revision/info/

HTTP Method GET

Action info

FortiOS REST API Reference Fortinet Inc.


Monitor API 69

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

config_id int Configuration id. No

config-revision: save

Summary Create a new config revision checkpoint.

URI system/config-revision/save/

HTTP Method POST

Action save

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

comments string Optional revision comments No

current-admins: select

Summary Return a list of currently logged in administrators.

URI system/current-admins/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

disconnect-admins: select

Summary Disconnects logged in administrators.

FortiOS REST API Reference Fortinet Inc.


Monitor API 70

URI system/disconnect-admins/select/

HTTP Method POST

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

id int Admin ID No

method string Login method used to connect admin to FortiGate. No

admins array List of objects with admin id and method. No

time: set

Summary Sets current system time stamp.

URI system/time/set/

HTTP Method POST

Action set

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

year int Specifies the year for setting/updating time manually. Yes

month int Specifies the month (0 - 11) for setting/updating time manually. Yes

day int Specifies the day for setting/updating time manually. Yes

hour int Specifies the hour (0 - 23) for setting/updating time manually. Yes

minute int Specifies the minute (0 - 59) for setting/updating time manually. Yes

second int Specifies the second (0 - 59) for setting/updating time manually. Yes

FortiOS REST API Reference Fortinet Inc.


Monitor API 71

time: select

Summary Gets current system time stamp.

URI system/time/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

os: reboot

Summary Immediately reboot this device.

URI system/os/reboot/

HTTP Method POST

Action reboot

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

event_log_ string Message to be logged in event log. No


message

os: shutdown

Summary Immediately shutdown this device.

URI system/os/shutdown/

HTTP Method POST

Action shutdown

Access Group sysgrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 72

Extra parameters

Name Type Summary Required

event_log_ string Message to be logged in event log. No


message

global-resources: select

Summary Retrieve current usage of global resources as well as both the default and user
configured maximum values.

URI system/global-resources/select/

HTTP Method GET

Action select

Access Group sysgrp

vdom-resource: select

Summary Retrieve VDOM resource information, including CPU and memory usage.

URI system/vdom-resource/select/

HTTP Method GET

Action select

Access Group sysgrp

dhcp: select

Summary Returns a list of all DHCP IPv4 and IPv6 DHCP leases.

URI system/dhcp/select/

HTTP Method GET

Action select

Access Group netgrp

Response Type array

FortiOS REST API Reference Fortinet Inc.


Monitor API 73

Extra parameters

Name Type Summary Required

scope string Scope from which to retrieve DHCP leases [vdom*|global]. Global No
scope is only accessible for global administrators.

ipv6 boolean Include IPv6 addresses in the response. No

dhcp: revoke

Summary Revoke IPv4 DHCP leases.

URI system/dhcp/revoke/

HTTP Method POST

Action revoke

Access Group netgrp

Extra parameters

Name Type Summary Required

ip array Optional list of addresses to revoke. Defaults to all addresses if not No


provided.

dhcp6: revoke

Summary Revoke IPv6 DHCP leases.

URI system/dhcp6/revoke/

HTTP Method POST

Action revoke

Access Group netgrp

Extra parameters

Name Type Summary Required

ip array Optional list of addresses to revoke. Defaults to all addresses if not No


provided.

FortiOS REST API Reference Fortinet Inc.


Monitor API 74

firmware: select

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

URI system/firmware/select/

HTTP Method GET

Action select

Access Group mntgrp

firmware: upgrade

Summary Upgrade firmware image on this device using uploaded file.

URI system/firmware/upgrade/

HTTP Method POST

Action upgrade

Access Group mntgrp

Response Type object

Extra parameters

Name Type Summary Required

source string Firmware file data source [upload|usb|fortiguard]. Yes

filename string Name of file on fortiguard or USB disk to upgrade to. No

format_ boolean Set to true to format boot partition before upgrade. No


partition

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

firmware: upgrade-paths

Summary Retrieve a list of supported firmware upgrade paths.

URI system/firmware/upgrade-paths/

HTTP Method GET

Action upgrade-paths

Access Group mntgrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 75

fsck: start

Summary Set file system check flag so that it will be executed on next device reboot.

URI system/fsck/start/

HTTP Method POST

Action start

Access Group sysgrp

storage: select

Summary Retrieve information for the non-boot disk.

URI system/storage/select/

HTTP Method GET

Action select

Access Group sysgrp

change-password: select

Summary Save admin and guest-admin passwords.

URI system/change-password/select/

HTTP Method POST

Action select

Access Group any

password-policy-conform: select

Summary Check whether password conforms to the password policy.

URI system/password-policy-conform/select/

HTTP Method POST

Action select

Access Group any

FortiOS REST API Reference Fortinet Inc.


Monitor API 76

csf: select

Summary Retrieve a full tree of downstream FortiGates registered to the Security Fabric.

URI system/csf/select/

HTTP Method GET

Action select

Access Group sysgrp

ETag Caching Enabled

Response Type object

modem: select

Summary Retrieve statistics for internal/external configured modem.

URI system/modem/select/

HTTP Method GET

Action select

Access Group sysgrp

modem: reset

Summary Reset statistics for internal/external configured modem.

URI system/modem/reset/

HTTP Method POST

Action reset

Access Group sysgrp

modem: connect

Summary Trigger a connect for the configured modem.

URI system/modem/connect/

HTTP Method POST

Action connect

Access Group sysgrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 77

modem: disconnect

Summary Trigger a disconnect for the configured modem.

URI system/modem/disconnect/

HTTP Method POST

Action disconnect

Access Group sysgrp

modem: update

Summary Update supported modem list from FortiGuard.

URI system/modem/update/

HTTP Method POST

Action update

Access Group sysgrp

3g-modem: select

Summary List all 3G modems available via FortiGuard.

URI system/3g-modem/select/

HTTP Method GET

Action select

Access Group sysgrp

resource: usage

Summary Retreive current and historical usage data for a provided resource.

URI system/resource/usage/

HTTP Method GET

Action usage

Access Group sysgrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 78

Extra parameters

Name Type Summary Required

resource string Resource to get usage data for [cpu|memory|disk|sessions|lograte]. No


Defaults to all resources if not provided.

interval string Time interval of resource usage [1-min|10-min|30-min|1-hour|12- No


hour|24-hour]. Defaults to all intervals if not provided.

sniffer: select

Summary Return a list of all configured packet captures.

URI system/sniffer/select/

HTTP Method GET

Action select

Access Group fwgrp.packet-capture

Response Type array

sniffer: restart

Summary Restart specified packet capture.

URI system/sniffer/restart/

HTTP Method POST

Action restart

Access Group fwgrp.packet-capture

Response Type array

Extra parameters

Name Type Summary Required

mkey int ID of packet capture entry. Yes

sniffer: start

Summary Start specified packet capture.

URI system/sniffer/start/

FortiOS REST API Reference Fortinet Inc.


Monitor API 79

HTTP Method POST

Action start

Access Group fwgrp.packet-capture

Response Type array

Extra parameters

Name Type Summary Required

mkey int ID of packet capture entry. Yes

sniffer: stop

Summary Stop specified packet capture.

URI system/sniffer/stop/

HTTP Method POST

Action stop

Access Group fwgrp.packet-capture

Response Type array

Extra parameters

Name Type Summary Required

mkey int ID of packet capture entry. Yes

sniffer: download

Summary Download a stored packet capture.

URI system/sniffer/download/

HTTP Method GET

Action download

Access Group fwgrp.packet-capture

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 80

Extra parameters

Name Type Summary Required

mkey int ID of packet capture entry. Yes

fsw: select

Summary Retrieve statistics for configured FortiSwitches

URI system/fsw/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

Extra parameters

Name Type Summary Required

fsw_id string Filter: FortiSwitch ID. No

poe boolean Filter: Retrieve PoE statistics for ports of configured FortiSwitches. No
Port power usage is in Watt units.

port_stats boolean Filter: Retrieve tx/rx statistics for ports of configured FortiSwitches. No

fsw: update

Summary Update administrative state for a given FortiSwitch (enable or disable


authorization).

URI system/fsw/update/

HTTP Method POST

Action update

Access Group sysgrp

Extra parameters

Name Type Summary Required

fswname string FortiSwitch name. No

admin string New FortiSwitch administrative state [enable|disable|discovered]. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 81

fsw: restart

Summary Restart a given FortiSwitch.

URI system/fsw/restart/

HTTP Method POST

Action restart

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

mkey string Name of managed FortiSwitch. Yes

fsw: upgrade

Summary Upgrade firmware image on the given FortiSwitch using uploaded file.

URI system/fsw/upgrade/

HTTP Method POST

Action upgrade

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

mkey string Name of managed FortiSwitch. Yes

source string Firmware file data source [upload|fortiguard]. Yes

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

fsw: poe-reset

Summary Reset PoE on a given FortiSwitch's port.

FortiOS REST API Reference Fortinet Inc.


Monitor API 82

URI system/fsw/poe-reset/

HTTP Method POST

Action poe-reset

Access Group sysgrp

Extra parameters

Name Type Summary Required

mkey string Name of managed FortiSwitch. Yes

port string Name of port to reset PoE on. Yes

fsw-firmware: select

Summary Retrieve a list of recommended firmware for managed FortiSwitches.

URI system/fsw-firmware/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

mkey string Filter: FortiSwitch ID. No

timeout string FortiGuard connection timeout (defaults to 3 seconds). No

switch-controller

managed-switch: dhcp-snooping

Summary Retrieve DHCP servers monitored by FortiSwitches.

URI switch-controller/managed-switch/dhcp-snooping/

HTTP Method GET

Action dhcp-snooping

FortiOS REST API Reference Fortinet Inc.


Monitor API 83

Access Group wifi

Response Type array

managed-switch: faceplate-xml

Summary Retrieve XML for rendering FortiSwitch faceplate widget.

URI switch-controller/managed-switch/faceplate-xml/

HTTP Method GET

Action faceplate-xml

Access Group wifi

Response Type array

Extra parameters

Name Type Summary Required

mkey string Name of managed FortiSwitch. No

validate-switch-prefix: select

Summary Validate a FortiSwitch serial number prefix.

URI switch-controller/validate-switch-prefix/select/

HTTP Method GET

Action select

Access Group wifi

Response Type object

Extra parameters

Name Type Summary Required

prefix string Prefix of FortiSwitch serial number. No

interface: select

Summary Retrieve statistics for all system interfaces.

FortiOS REST API Reference Fortinet Inc.


Monitor API 84

URI system/interface/select/

HTTP Method GET

Action select

Access Group netgrp

ETag Caching Enabled

Response Type array

Extra parameters

Name Type Summary Required

interface_ string Filter: interface name. No


name

include_vlan boolean Enable to include VLANs in result list. No

available-interfaces: select

Summary Retrieve a list of all interfaces along with some meta information regarding their
availability.

URI system/available-interfaces/select/

HTTP Method GET

Action select

Access Group any

Response Type array

Extra parameters

Name Type Summary Required

view_type string Optionally include additional information for interfaces. This No


parameter can be repeated multiple times. 'poe': Includes PoE
information for supported ports. 'ha': Includes extra meta information
useful when dealing with interfaces related to HA configuration.
Interfaces that are used by an HA cluster as management interfaces
are also included in this view. 'zone': Includes extra meta information
for determining zone membership eligibility.

FortiOS REST API Reference Fortinet Inc.


Monitor API 85

acquired-dns: select

Summary Retrieve a list of interfaces and their acquired DNS servers.

URI system/acquired-dns/select/

HTTP Method GET

Action select

Access Group any

Response Type array

resolve-fqdn: select

Summary Resolves the provided FQDNs to FQDN -> IP mappings.

URI system/resolve-fqdn/select/

HTTP Method GET

Action select

Access Group any

Response Type object

Extra parameters

Name Type Summary Required

ipv6 boolean Resolve for the AAAA record? No

fqdn string FQDN Yes

fqdn array List of FQDNs to be resolved No

usb-log: select

Summary Retrieve information about connected USB drives, including estimated log sizes.

URI system/usb-log/select/

HTTP Method GET

Action select

Access Group sysgrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 86

usb-log: start

Summary Start backup of logs from current VDOM to USB drive.

URI system/usb-log/start/

HTTP Method POST

Action start

Access Group sysgrp

usb-log: stop

Summary Stop backup of logs to USB drive.

URI system/usb-log/stop/

HTTP Method POST

Action stop

Access Group sysgrp

ipconf: select

Summary Determine if there is an IP conflict for a specific IP using ARP.

URI system/ipconf/select/

HTTP Method GET

Action select

Access Group netgrp

Response Type array

Extra parameters

Name Type Summary Required

dev object List of interfaces to check for conflict. No

ipaddr string IPv4 address to check for conflict. No

fortiguard: update

Summary Immediately update status for FortiGuard services.

FortiOS REST API Reference Fortinet Inc.


Monitor API 87

URI system/fortiguard/update/

HTTP Method POST

Action update

Access Group sysgrp

fortiguard: clear-cache

Summary Immediately clear all FortiGuard statistics.

URI system/fortiguard/clear-cache/

HTTP Method POST

Action clear-cache

Access Group sysgrp

fortiguard: test-availability

Summary Test availability of FortiGuard services.

URI system/fortiguard/test-availability/

HTTP Method POST

Action test-availability

Access Group sysgrp

fortiguard: server-info

Summary Get FortiGuard server list and information.

URI system/fortiguard/server-info/

HTTP Method GET

Action server-info

Access Group sysgrp

fortimanager: status

Summary Get FortiManager status.

FortiOS REST API Reference Fortinet Inc.


Monitor API 88

URI system/fortimanager/status/

HTTP Method GET

Action status

Access Group sysgrp

fortimanager: config

Summary Configure FortiManager address.

URI system/fortimanager/config/

HTTP Method POST

Action config

Access Group sysgrp

available-certificates: select

Summary Get available certificates.

URI system/available-certificates/select/

HTTP Method GET

Action select

Access Group any

Extra parameters

Name Type Summary Required

scope string Scope of certificate [vdom*|global]. No

certificate: download

Summary Download certificate.

URI system/certificate/download/

HTTP Method GET

Action download

Access Group vpngrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 89

Extra parameters

Name Type Summary Required

mkey string Name of certificate. Yes

type string Type of certificate [local|csr|remote|ca|crl]. Yes

scope string Scope of certificate [vdom*|global]. No

debug: select

Summary Log debug messages to the console (if enabled).

URI system/debug/select/

HTTP Method POST

Action select

Access Group any

Extra parameters

Name Type Summary Required

type string Type of message. Yes

msg string Message content. Yes

file string File name generating message. Yes

line string Line number in file. Yes

debug: download

Summary Download debug report for technical support.

URI system/debug/download/

HTTP Method GET

Action download

Access Group mntgrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 90

com-log: dump

Summary Dump system com-log to file.

URI system/com-log/dump/

HTTP Method POST

Action dump

Access Group sysgrp

com-log: update

Summary Fetch system com-log file dump progress.

URI system/com-log/update/

HTTP Method GET

Action update

Access Group sysgrp

com-log: download

Summary Download com-log file (after file dump is complete).

URI system/com-log/download/

HTTP Method GET

Action download

Access Group sysgrp

Response Type object

botnet: stat

Summary Retrieve statistics for FortiGuard botnet database.

URI system/botnet/stat/

HTTP Method GET

Action stat

Access Group sysgrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 91

ETag Caching Enabled

Response Type object

botnet: select

Summary List all known IP-based botnet entries in FortiGuard botnet database.

URI system/botnet/select/

HTTP Method GET

Action select

Access Group sysgrp

ETag Caching Enabled

Response Type array

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return. No

botnet-domains: select

Summary List all known domain-based botnet entries in FortiGuard botnet database.

URI system/botnet-domains/select/

HTTP Method GET

Action select

Access Group sysgrp

ETag Caching Enabled

Response Type array

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 92

botnet-domains: stat

Summary List statistics on domain-based botnet entries in FortiGuard botnet database.

URI system/botnet-domains/stat/

HTTP Method GET

Action stat

Access Group sysgrp

ETag Caching Enabled

Response Type object

ha-statistics: select

Summary List of statistics for members of HA cluster.

URI system/ha-statistics/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

ha-history: select

Summary Get HA cluster historical logs.

URI system/ha-history/select/

HTTP Method GET

Action select

Access Group sysgrp

ETag Caching Enabled

Response Type object

ha-checksums: select

Summary List of checksums for members of HA cluster.

FortiOS REST API Reference Fortinet Inc.


Monitor API 93

URI system/ha-checksums/select/

HTTP Method GET

Action select

Access Group sysgrp

ETag Caching Enabled

Response Type array

ha-peer: select

Summary Get configuration of peer(s) in HA cluster. Uptime is expressed in seconds.

URI system/ha-peer/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

Extra parameters

Name Type Summary Required

serial_no string Serial number of the HA member. If not specified, fetch information No
for all HA members

vcluster_id int Virtual cluster number. If not specified, fetch information for all active No
vclusters

ha-peer: update

Summary Update configuration of peer in HA cluster.

URI system/ha-peer/update/

HTTP Method POST

Action update

Access Group sysgrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 94

Extra parameters

Name Type Summary Required

serial_no string Serial number of the HA member. Yes

vcluster_id int Virtual cluster number. No

priority int Priority to assign to HA member. No

hostname string Name to assign the HA member. No

ha-peer: disconnect

Summary Update configuration of peer in HA cluster.

URI system/ha-peer/disconnect/

HTTP Method POST

Action disconnect

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

serial_no string Serial number of the HA member. Yes

interface string Name of the interface which should be assigned for management. Yes

ip string IP to assign to the selected interface. Yes

mask string Full network mask to assign to the selected interface. Yes

link-monitor: select

Summary Retrieve per-interface statistics for active link monitors.

URI system/link-monitor/select/

HTTP Method GET

Action select

Access Group sysgrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 95

Extra parameters

Name Type Summary Required

mkey string Name of link monitor. No

compliance: run

Summary Immediately run compliance checks for the selected VDOM.

URI system/compliance/run/

HTTP Method POST

Action run

Access Group sysgrp

config: restore

Summary Restore system configuration from uploaded file or from USB.

URI system/config/restore/

HTTP Method POST

Action restore

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

source string Configuration file data source [upload | usb | revision]. Yes

usb_filename string When using 'usb' source: the filename to restore from the connected No
USB device.

config_id int When using 'revision' source: valid ID of configuration stored on disk No
to revert to.

password string Password to decrypt configuration data. No

scope string Specify global or VDOM only restore [global | vdom]. Yes

vdom string If 'vdom' scope specified, the name of the VDOM to restore No
configuration.

FortiOS REST API Reference Fortinet Inc.


Monitor API 96

Name Type Summary Required

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

config: backup

Summary Backup system config

URI system/config/backup/

HTTP Method GET

Action backup

Access Group mntgrp

Response Type object

Extra parameters

Name Type Summary Required

destination string Configuration file destination [file* | usb] No

usb_filename string When using 'usb' destination: the filename to save to on the No
connected USB device

password string Password to encrypt configuration data. No

scope string Specify global or VDOM only backup [global | vdom]. Yes

vdom string If 'vdom' scope specified, the name of the VDOM to backup No
configuration.

config: usb-filelist

Summary List configuration files available on connected USB drive.

URI system/config/usb-filelist/

HTTP Method GET

Action usb-filelist

Access Group sysgrp

Response Type array

FortiOS REST API Reference Fortinet Inc.


Monitor API 97

sandbox: status

Summary Retrieve sandbox status.

URI system/sandbox/status/

HTTP Method GET

Action status

Access Group sysgrp

Response Type object

sandbox: stats

Summary Retrieve sandbox statistics.

URI system/sandbox/stats/

HTTP Method GET

Action stats

Access Group sysgrp

Response Type object

object: usage

Summary Retrieve all objects that are currently using as well as objects that can use the
given object.

URI system/object/usage/

HTTP Method GET

Action usage

Access Group any

Response Type object

Extra parameters

Name Type Summary Required

path string The CMDB table's path No

name string The CMDB table's name No

FortiOS REST API Reference Fortinet Inc.


Monitor API 98

Name Type Summary Required

qtypes array List of CMDB table qTypes No

mkey string The mkey for the object Yes

timezone: select

Summary Get world timezone and daylight saving time.

URI system/timezone/select/

HTTP Method GET

Action select

Access Group any

Response Type array

vmlicense: upload

Summary Update VM license using uploaded file. Reboots immediately if successful.

URI system/vmlicense/upload/

HTTP Method POST

Action upload

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

sensor-info: select

Summary Retrieve system sensor status.

URI system/sensor-info/select/

HTTP Method GET

FortiOS REST API Reference Fortinet Inc.


Monitor API 99

Action select

Access Group sysgrp

Response Type object

audit: select

Summary Retrieve Security Fabric audit results.

URI system/audit/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

fortiguard-blacklist: select

Summary Retrieve blacklist information for a specified IP.

URI system/fortiguard-blacklist/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type object

Extra parameters

Name Type Summary Required

ip string IPv4 address to check against. Yes

timeout int Timeout period in seconds (defaults to 5). No

vpn-certificate

ca: import

Summary Import CA certificate.

FortiOS REST API Reference Fortinet Inc.


Monitor API 100

URI vpn-certificate/ca/import/

HTTP Method POST

Action import

Access Group vpngrp

Response Type object

Extra parameters

Name Type Summary Required

import_method string Method of importing CA certificate.[file|scep] Yes

scep_url string SCEP server URL. Required for import via SCEP No

scep_ca_id string SCEP server CA identifier for import via SCEP. No

scope string Scope of CA certificate [vdom*|global]. Global scope is only No


accessible for global administrators

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

crl: import

Summary Import certificate revocation lists (CRL) from file content.

URI vpn-certificate/crl/import/

HTTP Method POST

Action import

Access Group vpngrp

Response Type object

Extra parameters

Name Type Summary Required

scope string Scope of CRL [vdom*|global]. Global scope is only accessible for No
global administrators

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

FortiOS REST API Reference Fortinet Inc.


Monitor API 101

local: import

Summary Import local certificate.

URI vpn-certificate/local/import/

HTTP Method POST

Action import

Access Group vpngrp

Response Type object

Extra parameters

Name Type Summary Required

type string Type of certificate.[local|pkcs12|regular] Yes

certname string Certificate name for pkcs12 and regular certificate types. No

password string Optional password for pkcs12 and regular certificate types. No

key_file_ string Key content encoded in BASE64 for regular certificate type. No
content

scope string Scope of local certificate [vdom*|global]. Global scope is only No


accessible for global administrators

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

remote: import

Summary Import remote certificate.

URI vpn-certificate/remote/import/

HTTP Method POST

Action import

Access Group vpngrp

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 102

Extra parameters

Name Type Summary Required

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

csr: generate

Summary Generate a certificate signing request (CSR) and a private key. The CSR can be
retrieved / downloaded from CLI, GUI and REST API.

URI vpn-certificate/csr/generate/

HTTP Method POST

Action generate

Access Group vpngrp

Response Type object

Extra parameters

Name Type Summary Required

certname string Certicate name. Used to retrieve / download the CSR. Not included Yes
in CSR and key content.

subject string Subject (Host IP/Domain Name/E-Mail). Common Name (CN) of the Yes
certificate subject.

keytype string Generate a RSA or an elliptic curve certificate request [rsa|ec]. The Yes
Elliptic Curve option is unavailable if the FortiGate is a Low
Encryption Device (LENC)

keysize int Key size.[1024|1536|2048|4096]. 512 only if the FortiGate is a Low No


Encryption Device (LENC). Required when keytype is RSA.

curvename string Elliptic curve name. [secp256r1|secp384r1|secp521r1]. Unavailable if No


the FortiGate is a Low Encryption Device (LENC). Required when
keytype is ec.

orgunits array List of organization units. Organization Units (OU) of the certificate No
subject.

org string Organization (O) of the certificate subject. No

city string Locality (L) of the certificate subject. No

state string State (ST) of the certificate subject. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 103

Name Type Summary Required

countrycode string Country (C) of the certificate subject. No

email string Email of the certificate subject. No

sub_alt_name string Subject alternative name (SAN) of the certificate. No

password string Password / pass phrase for the private key. If not provided, FortiGate No
generates a random one.

scep_url string SCEP server URL. If provided, use the url to enroll the csr through No
SCEP.

scep_password string SCEP challenge password. Some SCEP servers may require No
challege password. Provide it when SCEP server requires.

scope string Scope of CSR [vdom*|global]. Global scope is only accessible for No
global administrators

check-port-availability: select

Summary Check whether a list of TCP port ranges is available for a certain service.

URI system/check-port-availability/select/

HTTP Method GET

Action select

Access Group sysgrp

Response Type array

Extra parameters

Name Type Summary Required

port_ranges array List of TCP port range objects to check against. Yes

service string The service in which the ports could be available. 'service' options are No
[reserved | sysglobal | webproxy | ftpproxy | sslvpn | slaprobe | fsso |
ftm_push]. If 'service' is not specified, the port ranges availablity is
checked against all services.

extender-controller

extender: select

Summary Retrieve statistics for specific configured FortiExtender units.

FortiOS REST API Reference Fortinet Inc.


Monitor API 104

URI extender-controller/extender/select/

HTTP Method GET

Action select

Access Group netgrp

Response Type array

Extra parameters

Name Type Summary Required

id array List of FortiExtender IDs to query. Yes

extender: reset

Summary Reset a specific FortiExtender unit.

URI extender-controller/extender/reset/

HTTP Method POST

Action reset

Access Group netgrp

Response Type object

Extra parameters

Name Type Summary Required

id string FortiExtender ID to reset. Yes

user

firewall: select

Summary List authenticated firewall users.

URI user/firewall/select/

HTTP Method GET

Action select

Access Group authgrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 105

Response Type array

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return. No

ipv4 boolean Include IPv4 user (default=true). No

ipv6 boolean Include IPv6 users. No

firewall: deauth

Summary Deauthenticate single, multiple, or all firewall users.

URI user/firewall/deauth/

HTTP Method POST

Action deauth

Access Group authgrp

Extra parameters

Name Type Summary Required

user_type string User type [proxy|firewall]. Required for both proxy and firewall users. No

id int User ID. Required for both proxy and firewall users. No

ip string User IP address. Required for both proxy and firewall users. No

ip_version string IP version [ip4|ip6]. Only required if user_type is firewall. No

method string Authentication method [fsso|rsso|ntlm|firewall|wsso|fsso_citrix|sso_ No


guest]. Only required if user_type is firewall.

all boolean Set to true to deauthenticate all users. Other parameters will be No
ignored.

users array Array of user objects to deauthenticate. Use this to deauthenticate No


multiple users at once. Each object should include the above
properties.

FortiOS REST API Reference Fortinet Inc.


Monitor API 106

banned: select

Summary Return a list of all banned users by IP.

URI user/banned/select/

HTTP Method GET

Action select

Access Group authgrp

banned: clear_users

Summary Immediately clear a list of specific banned users by IP.

URI user/banned/clear_users/

HTTP Method POST

Action clear_users

Access Group authgrp

Extra parameters

Name Type Summary Required

ip_addresses array List of banned user IPs to clear. IPv4 and IPv6 addresses are Yes
allowed.

banned: add_users

Summary Immediately add one or more users to the banned list.

URI user/banned/add_users/

HTTP Method POST

Action add_users

Access Group authgrp

Extra parameters

Name Type Summary Required

ip_addresses array List of IP Addresses to ban. IPv4 and IPv6 addresses are allowed. Yes

expiry int Time until expiry in seconds. 0 for indefinite ban. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 107

banned: clear_all

Summary Immediately clear all banned users.

URI user/banned/clear_all/

HTTP Method POST

Action clear_all

Access Group authgrp

fortitoken: select

Summary Retrieve a map of FortiTokens and their status.

URI user/fortitoken/select/

HTTP Method GET

Action select

Access Group authgrp

Response Type object

fortitoken: activate

Summary Activate a set of FortiTokens by serial number.

URI user/fortitoken/activate/

HTTP Method POST

Action activate

Access Group authgrp

Response Type array

Extra parameters

Name Type Summary Required

tokens array List of FortiToken serial numbers to activate. If omitted, all tokens No
will be used.

FortiOS REST API Reference Fortinet Inc.


Monitor API 108

device: select

Summary Retrieve a list of detected devices.

URI user/device/select/

HTTP Method GET

Action select

Access Group sysgrp

ETag Caching Enabled

Response Type array

Extra parameters

Name Type Summary Required

master_only boolean List of master device only. No

fortilink_ boolean Add port and switch info for devices behind a managed FortiSwitch. No
visibility

compliance_ boolean Add compliance status to indicate if a device is 'exempt' or 'non- No


visibility compliant' by interface's FortiClient host check.

intf_name string Filter: Name of interface where the device was detected. Only No
available when compliance_visibility is true.

master_mac string Filter: Master MAC of a device. Multiple entries could be returned. No

fortitoken: refresh

Summary Refresh a set of FortiTokens by serial number.

URI user/fortitoken/refresh/

HTTP Method POST

Action refresh

Access Group authgrp

Response Type array

Extra parameters

Name Type Summary Required

tokens array List of FortiToken serial numbers to refresh. If omitted, all tokens will No
be used.

FortiOS REST API Reference Fortinet Inc.


Monitor API 109

fortitoken: provision

Summary Provision a set of FortiTokens by serial number.

URI user/fortitoken/provision/

HTTP Method POST

Action provision

Access Group authgrp

Response Type array

Extra parameters

Name Type Summary Required

tokens array List of FortiToken serial numbers to provision. If omitted, all tokens No
will be used.

fortitoken: send-activation

Summary Send a FortiToken activation code to a user via SMS or Email.

URI user/fortitoken/send-activation/

HTTP Method POST

Action send-activation

Access Group authgrp

Response Type object

Extra parameters

Name Type Summary Required

token string FortiToken serial number. The token must be assigned to a Yes
user/admin.

method string Method to send activation code [email|sms]. Yes

email string Override email address. No

sms_phone string Override SMS phone number. SMS provider must be set in the No
assigned user/admin.

FortiOS REST API Reference Fortinet Inc.


Monitor API 110

fsso: refresh-server

Summary Refresh remote agent group list for all fsso agents.

URI user/fsso/refresh-server/

HTTP Method POST

Action refresh-server

Access Group authgrp

fsso: select

Summary Get a list of fsso and fsso polling status.

URI user/fsso/select/

HTTP Method GET

Action select

Access Group authgrp

utm

rating-lookup: select

Summary Lookup FortiGuard rating for a specific URL.

URI utm/rating-lookup/select/

HTTP Method GET

Action select

Access Group utmgrp.webfilter

Response Type object

Extra parameters

Name Type Summary Required

url string URL to query. Yes

url array List of URLs to query. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 111

app-lookup: select

Summary Query remote FortiFlow database to resolve hosts to application control entries.

URI utm/app-lookup/select/

HTTP Method GET

Action select

Access Group any

Response Type array

Extra parameters

Name Type Summary Required

hosts array List of hosts to resolve. No

address string Destination IP for one host entry. No

dst_port int Destination port for one host entry. No

protocol int Protocol for one host entry. No

application-categories: select

Summary Retrieve a list of application control categories.

URI utm/application-categories/select/

HTTP Method GET

Action select

Access Group any

Response Type array

antivirus: stats

Summary Retrieve antivirus scanning statistics.

URI utm/antivirus/stats/

HTTP Method GET

Action stats

Access Group utmgrp.antivirus

Response Type object

FortiOS REST API Reference Fortinet Inc.


Monitor API 112

virtual-wan

health-check: select

Summary Retrieve health-check statistics for each SD-WAN link.

URI virtual-wan/health-check/select/

HTTP Method GET

Action select

Access Group sysgrp

members: select

Summary Retrieve interface statistics for each SD-WAN link.

URI virtual-wan/members/select/

HTTP Method GET

Action select

Access Group sysgrp

webfilter

override: select

Summary List all administrative and user initiated webfilter overrides.

URI webfilter/override/select/

HTTP Method GET

Action select

Access Group utmgrp.webfilter

override: delete

Summary Delete a configured webfilter override.

URI webfilter/override/delete/

HTTP Method POST

FortiOS REST API Reference Fortinet Inc.


Monitor API 113

Action delete

Access Group utmgrp.webfilter

Extra parameters

Name Type Summary Required

mkey string ID of webfilter override to delete. No

malicious-urls: select

Summary List all URLs in FortiSandbox malicious URL database.

URI webfilter/malicious-urls/select/

HTTP Method GET

Action select

Access Group utmgrp.webfilter

ETag Caching Enabled

Response Type object

malicious-urls: stat

Summary Retrieve statistics for the FortiSandbox malicious URL database.

URI webfilter/malicious-urls/stat/

HTTP Method GET

Action stat

Access Group utmgrp.webfilter

ETag Caching Enabled

Response Type object

category-quota: select

Summary Retrieve quota usage statistics for webfilter categories.

URI webfilter/category-quota/select/

HTTP Method GET

FortiOS REST API Reference Fortinet Inc.


Monitor API 114

Action select

Access Group utmgrp.webfilter

Extra parameters

Name Type Summary Required

profile string Webfilter profile. No

user string User or IP (required if profile specified). No

category-quota: reset

Summary Reset webfilter quota for user or IP.

URI webfilter/category-quota/reset/

HTTP Method POST

Action reset

Access Group utmgrp.webfilter

Extra parameters

Name Type Summary Required

profile string Webfilter profile to reset. No

user string User or IP to reset with. No

fortiguard-categories: select

Summary Return FortiGuard web filter categories.

URI webfilter/fortiguard-categories/select/

HTTP Method GET

Action select

Access Group any

Response Type array

FortiOS REST API Reference Fortinet Inc.


Monitor API 115

Extra parameters

Name Type Summary Required

include_ boolean Include Unrated category in result list. No


unrated

convert_ boolean Convert Unrated category id to the one for CLI use. No
unrated_id

trusted-urls: select

Summary List all URLs in FortiGuard trusted URL database.

URI webfilter/trusted-urls/select/

HTTP Method GET

Action select

Access Group utmgrp.webfilter

ETag Caching Enabled

Response Type object

vpn

ipsec: select

Summary Return an array of active IPsec VPNs.

URI vpn/ipsec/select/

HTTP Method GET

Action select

Access Group vpngrp

Response Type array

Extra parameters

Name Type Summary Required

tunnel string Filter for a specific IPsec tunnel name. No

start int Starting entry index. No

count int Maximum number of entries to return. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 116

ipsec: tunnel_up

Summary Bring up a specific IPsec VPN tunnel.

URI vpn/ipsec/tunnel_up/

HTTP Method POST

Action tunnel_up

Access Group vpngrp

Extra parameters

Name Type Summary Required

p1name string IPsec phase1 name. Yes

p2name string IPsec phase2 name. Yes

p2serial string IPsec phase2 serial. No

ipsec: tunnel_down

Summary Bring down a specific IPsec VPN tunnel.

URI vpn/ipsec/tunnel_down/

HTTP Method POST

Action tunnel_down

Access Group vpngrp

Extra parameters

Name Type Summary Required

p1name string IPsec phase1 name. Yes

p2name string IPsec phase2 name. Yes

p2serial string IPsec phase2 serial. No

ipsec: tunnel_reset_stats

Summary Reset statistics for a specific IPsec VPN tunnel.

URI vpn/ipsec/tunnel_reset_stats/

FortiOS REST API Reference Fortinet Inc.


Monitor API 117

HTTP Method POST

Action tunnel_reset_stats

Access Group vpngrp

Extra parameters

Name Type Summary Required

p1name string IPsec phase1 name. Yes

ssl: select

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

URI vpn/ssl/select/

HTTP Method GET

Action select

Access Group vpngrp

ssl: clear_tunnel

Summary Remove all active tunnel sessions in current virtual domain.

URI vpn/ssl/clear_tunnel/

HTTP Method POST

Action clear_tunnel

Access Group vpngrp

ssl: delete

Summary Terminate the provided SSL-VPN session.

URI vpn/ssl/delete/

HTTP Method POST

Action delete

Access Group vpngrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 118

Extra parameters

Name Type Summary Required

type string The session type [websession|subsession]. Yes

index int The session index. Yes

ssl: stats

Summary Return statistics about the SSL-VPN.

URI vpn/ssl/stats/

HTTP Method GET

Action stats

Access Group vpngrp

wanopt

history: select

Summary Retrieve WAN opt. statistics history.

URI wanopt/history/select/

HTTP Method GET

Action select

Access Group wanoptgrp

Extra parameters

Name Type Summary Required

period string Statistics period [10-min*|hour|day|week|30-day]. No

history: reset

Summary Reset WAN opt. statistics.

URI wanopt/history/reset/

HTTP Method POST

FortiOS REST API Reference Fortinet Inc.


Monitor API 119

Action reset

Access Group wanoptgrp

webcache: select

Summary Retrieve webcache statistics history.

URI wanopt/webcache/select/

HTTP Method GET

Action select

Access Group wanoptgrp

Extra parameters

Name Type Summary Required

period string Statistics period [10-min*|hour|day|week|30-day]. No

webcache: reset

Summary Reset webcache statistics.

URI wanopt/webcache/reset/

HTTP Method POST

Action reset

Access Group wanoptgrp

peer_stats: select

Summary Retrieve a list of WAN opt peer statistics.

URI wanopt/peer_stats/select/

HTTP Method GET

Action select

Access Group wanoptgrp

FortiOS REST API Reference Fortinet Inc.


Monitor API 120

peer_stats: reset

Summary Reset WAN opt peer statistics.

URI wanopt/peer_stats/reset/

HTTP Method POST

Action reset

Access Group wanoptgrp

webproxy

pacfile: download

Summary Download webproxy PAC file.

URI webproxy/pacfile/download/

HTTP Method GET

Action download

Access Group netgrp

Response Type object

webcache

stats: select

Summary Retrieve webcache statistics.

URI webcache/stats/select/

HTTP Method GET

Action select

Access Group wanoptgrp

Response Type array

Extra parameters

Name Type Summary Required

period string Statistics period [10min|hour|day|month]. No

FortiOS REST API Reference Fortinet Inc.


Monitor API 121

stats: reset

Summary Reset all webcache statistics.

URI webcache/stats/reset/

HTTP Method POST

Action reset

Access Group wanoptgrp

wifi

client: select

Summary Retrieve a list of connected WiFi clients.

URI wifi/client/select/

HTTP Method GET

Action select

Access Group wifi

Response Type array

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return. No

type string Request type [all*|fail-login]. No

managed_ap: select

Summary Retrieve a list of managed FortiAPs.

URI wifi/managed_ap/select/

HTTP Method GET

Action select

Access Group wifi

Response Type array

FortiOS REST API Reference Fortinet Inc.


Monitor API 122

Extra parameters

Name Type Summary Required

wtp_id string Filter: single managed FortiAP by ID. No

incl_local boolean Enable to include the local FortiWiFi device in the results. No

managed_ap: set_status

Summary Update administrative state for a given FortiAP (enable or disable authorization).

URI wifi/managed_ap/set_status/

HTTP Method POST

Action set_status

Access Group wifi

Extra parameters

Name Type Summary Required

wtpname string FortiAP name. No

admin string New FortiAP administrative state [enable|disable|discovered]. No

firmware: select

Summary Retrieve a list of current and recommended firmware for FortiAPs in use.

URI wifi/firmware/select/

HTTP Method GET

Action select

Access Group wifi

Response Type object

Extra parameters

Name Type Summary Required

timeout string FortiGuard connection timeout (defaults to 2 seconds). No

FortiOS REST API Reference Fortinet Inc.


Monitor API 123

managed_ap: restart

Summary Restart a given FortiAP.

URI wifi/managed_ap/restart/

HTTP Method POST

Action restart

Access Group wifi

Extra parameters

Name Type Summary Required

wtpname string FortiAP name. No

managed_ap: upgrade

Summary Upgrade firmware image on the given FortiAP using uploaded file.

URI wifi/managed_ap/upgrade/

HTTP Method POST

Action upgrade

Access Group wifi

Response Type object

Extra parameters

Name Type Summary Required

mkey string Serial number of FortiAP to upgrade. Yes

source string Firmware file data source [upload|fortiguard]. Yes

filename string Firmware image file for when 'source' is 'upload'. No

image_id string Fortiguard image file ID for when 'source' is 'fortiguard'. No

file_content string Provided when uploading a file: base64 encoded file data. Must not No
contain whitespace or other invalid base64 characters. Must be
included in HTTP body.

FortiOS REST API Reference Fortinet Inc.


Monitor API 124

ap_status: select

Summary Retrieve statistics for all managed FortiAPs.

URI wifi/ap_status/select/

HTTP Method GET

Action select

Access Group wifi

interfering_ap: select

Summary Retrieve a list of interfering APs for one FortiAP radio.

URI wifi/interfering_ap/select/

HTTP Method GET

Action select

Access Group wifi

Response Type array

Extra parameters

Name Type Summary Required

wtp string FortiAP ID to query. No

radio int Radio ID. No

start int Starting entry index. No

count int Maximum number of entries to return. No

euclid: select

Summary Retrieve presence analytics statistics.

URI wifi/euclid/select/

HTTP Method GET

Action select

Access Group wifi

FortiOS REST API Reference Fortinet Inc.


Monitor API 125

euclid: reset

Summary Reset presence analytics statistics.

URI wifi/euclid/reset/

HTTP Method POST

Action reset

Access Group wifi

rogue_ap: select

Summary Retrieve a list of detected rogue APs.

URI wifi/rogue_ap/select/

HTTP Method GET

Action select

Access Group wifi

Response Type array

Extra parameters

Name Type Summary Required

start int Starting entry index. No

count int Maximum number of entries to return. No

rogue_ap: clear_all

Summary Clear all detected rogue APs.

URI wifi/rogue_ap/clear_all/

HTTP Method POST

Action clear_all

Access Group wifi

rogue_ap: set_status

Summary Mark detected APs as rogue APs.

FortiOS REST API Reference Fortinet Inc.


Monitor API 126

URI wifi/rogue_ap/set_status/

HTTP Method POST

Action set_status

Access Group wifi

Extra parameters

Name Type Summary Required

bssid array List of rogue AP MAC addresses. No

ssid array Corresponding list of rogue AP SSIDs. No

status string Status to assign matching APs No


[unclassified|rogue|accepted|suppressed].

spectrum: select

Summary Retrieve spectrum analysis information for a specific FortiAP.

URI wifi/spectrum/select/

HTTP Method GET

Action select

Access Group wifi

Response Type object

Extra parameters

Name Type Summary Required

wtp_id string FortiAP ID to query. Yes

coverage

download: select

Summary Download code coverage.

URI coverage/download/select/

HTTP Method GET

FortiOS REST API Reference Fortinet Inc.


Monitor API 127

Action select

Access Group any

Response Type object

Examples

Method URL URL Parameters Body Data Access Description


Group

GET /api/v2/monitor/ ?vdom=root fwgrp.policy List traffic statistics for all


firewall/policy IPv4 policies, vdom root

GET /api/v2/monitor/ ?global=1 fwgrp.policy List traffic statistics for all


firewall/policy IPv4 policies, all
accessible vdoms

POST /api/v2/monitor/ ?vdom=root fwgrp.policy Reset traffic statistics for


firewall/policy/reset all IPv4 policies, vdom root

POST /api/v2/monitor/ ?global=1 fwgrp.policy Reset traffic statistics for


firewall/policy/reset all IPv4 policies, all
accessible vdoms

POST /api/v2/monitor/ ?vdom=root {'policy': 1,} fwgrp.policy Reset traffic statistics for
firewall/policy6/ single IPv4 policy, vdom
clear_counters root

POST /api/v2/monitor/ ?vdom=root {'policy': [1, 2]} fwgrp.policy Reset traffic statistics for
firewall/policy6/ multiple IPv4 policies,
clear_counters vdom root

GET /api/v2/monitor/ ?vdom=root& sysgrp List the first active ipv4


firewall/session ip_version=ipv4& firewall sessions, vdom
start=0&count= root
1&summary=True

POST /api/v2/monitor/ ?vdom=root sysgrp Immediately clear all


firewall/session/ active IPv4 and IPv6
clear_all sessions, vdom root

POST /api/v2/monitor/ ?vdom=root {'pro': "udp", 'saddr': sysgrp Immediately close specific
firewall/session/ "192.168.100.110", session matched with the
close 'daddr': "96.45.33. filter, vdom root
73", 'sport': 55933,
'dport': 8888}

FortiOS REST API Reference Fortinet Inc.


Monitor API 128

Method URL URL Parameters Body Data Access Description


Group

POST /api/v2/monitor/ sysgrp Immediately reboot this


system/os/ device
reboot

POST /api/v2/monitor/ sysgrp Immediately shutdown this


system/os/ device
shutdown

FortiOS REST API Reference Fortinet Inc.


Copyright© 2019 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
and other 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 be
limited 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
or development, and circumstances may change such that any forward-looking statements herein are not accurate. Fortinet disclaims in full any covenants, representations,
and guarantees pursuant hereto, whether express or implied. Fortinet reserves the right to change, modify, transfer, or otherwise revise this publication without notice, and
the most current version of the publication shall be applicable.

You might also like