Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Jacky
New Contributor

REST API V5.6 FORTIOS for Interface IP address

HI,

 

I'm using POSTMAN (REST API) to login my Fortios FW,

I can get the policy (ipv4)

I can get the address objects

I can get the static route from POSTMAN(REST API)

 

But I can't found any url to get the interface IP address.

Is there any document talk about it?

 

Also, except the document below,

http://www.tuncaybas.com/FOS_JSON_REST_API_523.pdf

I can't found any other document talk about the REST API to FORTIOS.

Is there any document for other version of FORTIOS?

 

Many Thanks!

1 Solution
emnoc
Esteemed Contributor III

You can use  "cmdb/system/interface/<interfacename>"  to call up the interface in question. It's  also sad that FTNT does not provide free or easier to obtain documentation to the API reference.

 

Ken Felix

PCNSE 

NSE 

StrongSwan  

View solution in original post

PCNSE NSE StrongSwan
3 REPLIES 3
Yurisk
Valued Contributor

You have to have Fortinet Developer subscription access to get API https://www.fortinet.com/products/management/fortinet-developer-network-fndn.html 

Which has free tier but you have to provide 2 contacts from the Fortinet to vouch for you.

You can look and 'reverse engineer' a call to get interface from here: 

https://github.com/FortiPower/PowerFGT/blob/master/PowerFGT/Public/cmdb/system/interface.ps1  :

$response = Invoke-FGTRestMethod -uri 'api/v2/cmdb/system/interface' -method 'GET' -connection $connection @invokeParams

 

Yuri https://yurisk.info/  blog: All things Fortinet, no ads.
Yuri https://yurisk.info/ blog: All things Fortinet, no ads.
emnoc
Esteemed Contributor III

You can use  "cmdb/system/interface/<interfacename>"  to call up the interface in question. It's  also sad that FTNT does not provide free or easier to obtain documentation to the API reference.

 

Ken Felix

PCNSE 

NSE 

StrongSwan  

PCNSE NSE StrongSwan
Jacky
New Contributor

Many Thanks!

It's work!

 

Labels
Top Kudoed Authors