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

How to use filters on srcintf & dstintf in REST API?

hi,

 

How to filter firewall policies with the particular srcintf/dstintf using REST API? 

 

Below is sample url: 

https://xx.xx.xx.xx/api/v...ot&format=policyid|srcintf|dstintf|srcaddr|dstaddr|service&filter=srcaddr

 

 

{ "policyid": 40, "q_origin_key": "40", "srcintf": [ { "name": "NETMGMT", "q_origin_key": "NETMGMT" },

{ "name": "MGMT", "q_origin_key": "MGMT" } ], "dstintf": [ { "name": "VLAN_100", "q_origin_key": "VLAN_100" } ], "srcaddr": [ { "name": "all", "q_origin_key": "all" } ], "dstaddr": [ { "name": "all", "q_origin_key": "all" } ], "action": "accept", "status": "enable", "service": [ { "name": "ALL", "q_origin_key": "ALL" } ] }

 

thanks

2 REPLIES 2
oheigl
Contributor II

Have you tried adding "&srcintf=lan" to the request?

luckyt
New Contributor

Yes, i tried but no luck, can you share if any sample you have?

Labels
Top Kudoed Authors