Fortinet black logo

REST API Solution Guide

Backup and restore (/recovery/)

Backup and restore (/recovery/)

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

This endpoint is used to backup FAC configuration and restore from a configuration file.

Supported fields

Field Display name Type Required Other restrictions
file Backup config file to restore from String Yes

key

encryption/decryption key

String

No

Allowed methods

HTTP method Resource URI Action
GET /api/v1/recovery/ Download config backup file.

POST

/api/v1/recovery/

Restore from a config backup file.

Example

JSON query
  • Backup

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

    -H 'Content-Type:application/json'

    -u "admin:[hash]"

    --output backup.conf

    -d '{"key":"XXXXXX"}'

JSON query

  • Restore

    curl -k -X POST https://[FAC_IP]/api/v1/recovery/

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

    -u "admin:[hash]"

    -F 'file=@backup.conf'

    -F 'key=decryption_key'

Response

< System configuration restore process has been started. FortiAuthenticator will be restarted to apply the new configuration

Backup and restore (/recovery/)

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

This endpoint is used to backup FAC configuration and restore from a configuration file.

Supported fields

Field Display name Type Required Other restrictions
file Backup config file to restore from String Yes

key

encryption/decryption key

String

No

Allowed methods

HTTP method Resource URI Action
GET /api/v1/recovery/ Download config backup file.

POST

/api/v1/recovery/

Restore from a config backup file.

Example

JSON query
  • Backup

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

    -H 'Content-Type:application/json'

    -u "admin:[hash]"

    --output backup.conf

    -d '{"key":"XXXXXX"}'

JSON query

  • Restore

    curl -k -X POST https://[FAC_IP]/api/v1/recovery/

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

    -u "admin:[hash]"

    -F 'file=@backup.conf'

    -F 'key=decryption_key'

Response

< System configuration restore process has been started. FortiAuthenticator will be restarted to apply the new configuration