Skip to main content
yggdrassill
New Member
December 4, 2019
Question

Get Data from our FortiGate over API

  • December 4, 2019
  • 0 replies
  • 1649 views

Hello everyone,

 

I hope, someone can help, I´m not that fit with API. :)

 

I want to get data from "Policy & Objects" -> "Objects" -> "Addresses"

 

Tried the following curl script:

curl.exe -k -i -X POST [link]http://1.1.1.1/logincheck[/link] -d "username=%FortiGateUser%&secretkey=%FortiGatePW%" --dump-header headers.txt -c cookies.txt curl.exe -k -i -X GET [link]http://1.1.1.1/p/system/features/status/[/link] -b headers.txt [worked] curl.exe -k -i -X GET http://1.1.1.1/api/cmdb?r...%22skip%22%3Atrue%7D-b headers.txt [doesn´t worked]

 

Error: <HTML><HEAD></HEAD><BODY>HTTP Error: 400</BODY></HTML>

 

We have a FortiGate 200B (FW 5.2.14,build764)

 

Thanks for your help.

Have a nice day.

Tobias