# curl -k -i -X POST https://x.x.x.x/logincheck -d "username=yyy&secretkey=zzz" --dump-header headers.txt -c cookies.txtx.x.x.x is FortiGate IP address
#curl -k -i -X GET https://x.x.x.x/api/v2/cmdb/router/static -b headers.txtResult:
…3) How to logout
{
"http_method":"GET",
"revision":"3.0.0.9538334086034185130.1563241202",
"results":[
{
"q_origin_key":1,
"seq-num":1,
"status":"enable",
"dst":"0.0.0.0 0.0.0.0",
"src":"0.0.0.0 0.0.0.0",
"gateway":"x.x.x.y",
"distance":10,
"weight":0,
"priority":0,
"device":"port1",
"comment":"",
"blackhole":"disable",
"dynamic-gateway":"disable",
"virtual-wan-link":"disable",
"dstaddr":"",
"internet-service":0,
"internet-service-custom":"",
"link-monitor-exempt":"disable",
"vrf":0,
"bfd":"disable"
}
],
"vdom":"root",
"path":"router",
"name":"static",
"status":"success",
"http_status":200,
"serial":"FGVM……………",
"version":"v6.2.0",
"build":200
}
#curl -k -i -X POST https://x.x.x.x/logout
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.