Fortinet white logo
Fortinet white logo

REST API Solution Guide

Upgrade firmware (/upgrade/)

Upgrade firmware (/upgrade/)

URL: https://[server_name]/api/v1/upgrade/

This endpoint is used to upgrade the FortiAuthenticator firmware or lad a debug kit.

Supported fields

Field

Display name

Type

Required

Other restrictions

url

URL where to download the firmware image from (e.g. https://fileserver.fortinet.com/facbuilds/0958/image.out)

string

Yes

downgrade

downgrade

boolean

No

Must be set to 'true' for a firmware downgrade to be accepted.

This acts as a protection against downgrades because of erroneous firmware image file since downgrades will factory reset the configuration.

Default is 'false' when not specified.

Allowed methods

HTTP method

Resource URI

Action

POST

/api/v1/upgrade/

Upgrade to the firmware in the specified file.

Response codes

In addition to the general codes defined in General API response codes, a POST request to this resource can also result in the following return codes:

Code Response content Description
200 OK Valid firmware image. Proceeding with the upgrade process.
401 Unauthorized Invalid firmware image (firmware image wrong model, firmware image version is lower than current firmware and "downgrade==false").

Example

curl -k -X GET https://[FAC_IP]/api/v1/upgrade/

-H 'content-type: multipart/form-data'

-u 'admin:[hash]'

-F 'url=https://fileserver.fortinet.com/facbuilds/0958/image.out'

-F 'downgrade=false'

Response:

200 OK - Firmware upgrade process has been started. FortiAuthenticator will be restarted.

Upgrade firmware (/upgrade/)

Upgrade firmware (/upgrade/)

URL: https://[server_name]/api/v1/upgrade/

This endpoint is used to upgrade the FortiAuthenticator firmware or lad a debug kit.

Supported fields

Field

Display name

Type

Required

Other restrictions

url

URL where to download the firmware image from (e.g. https://fileserver.fortinet.com/facbuilds/0958/image.out)

string

Yes

downgrade

downgrade

boolean

No

Must be set to 'true' for a firmware downgrade to be accepted.

This acts as a protection against downgrades because of erroneous firmware image file since downgrades will factory reset the configuration.

Default is 'false' when not specified.

Allowed methods

HTTP method

Resource URI

Action

POST

/api/v1/upgrade/

Upgrade to the firmware in the specified file.

Response codes

In addition to the general codes defined in General API response codes, a POST request to this resource can also result in the following return codes:

Code Response content Description
200 OK Valid firmware image. Proceeding with the upgrade process.
401 Unauthorized Invalid firmware image (firmware image wrong model, firmware image version is lower than current firmware and "downgrade==false").

Example

curl -k -X GET https://[FAC_IP]/api/v1/upgrade/

-H 'content-type: multipart/form-data'

-u 'admin:[hash]'

-F 'url=https://fileserver.fortinet.com/facbuilds/0958/image.out'

-F 'downgrade=false'

Response:

200 OK - Firmware upgrade process has been started. FortiAuthenticator will be restarted.