Created on 02-03-2021 07:23 AM Edited on 02-17-2022 01:34 PM By Anonymous
Description
Since firmware version v6.3.6, new RESTful API has been introduced in FortiWeb from v1.0 to v2.0.
This article describes how to create and update configuration object with RESTful API.
Scope
For version 6.3.6 and above.
Solution
Example configuration section:
curl -i --insecure --location --request GET 'https://{host}/api/v2.0/cmdb/waf/ip-list' --header 'Authorization: xxxxxxxxxxxxxx' --header 'Accept: applicaiton/json'
curl -i --insecure --location --request GET 'https://{host}/api/v2.0/cmdb/waf/ip-list?mkey=protection' --header 'Authorization: xxxxxxxxxxxxxx' --header 'Accept: applicaiton/json'
curl -i --insecure --location --request PUT 'https://{host}/api/v2.0/cmdb/waf/ip-list/members?mkey=protection&sub_mkey=1' --header 'Authorization: xxxxxxxxxxxxxx' --header 'Accept: applicaiton/json' --data '{"data":{ "type": "black-ip"}}'
curl -i --insecure --location --request POST 'https://{host}/api/v2.0/cmdb/waf/ip-list/members?mkey=protection' --header 'Authorization: xxxxxxxxxxxxxx' --header 'Accept: applicaiton/json' --data '{"data":{ "seq": 3, "id": "3", "type": "black-ip", "ip": "3.3.3.3"}}'
Related links:
https://docs.fortinet.com/document/fortiweb/6.3.6/release-notes
https://documenter.getpostman.com/view/11233300/SzmZbfBD?version=latest
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.