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

Fortimanager JSON REST API: What is the end-point to use to list existing webfilters?

I have tried "/pm/config/adom/FortiManager/obj/webfilter/urlfilter", but nothing was returned.

1 Solution
jpforcioli_FTNT

Hi,

 

Could you please precise your FMG version?

 

Your endpoint seems correct provided FortiManager is your ADOM name...

 

Here is what I'm getting on my own FortiManager (my ADOM name is CM-LAB-004:(

 

REQUEST: {

"id": 1, "method": "get", "params": [ { "url": "pm/config/adom/CM-LAB-004/obj/webfilter/urlfilter" } ], "session": "EbhxAvs3v8oElYHUrBq7MRDm5zqhQHW5KauzsRza+utN0HcgOa+lPeHveFx8RZLllOHOTs7rtm1DUhRPeXYe8A==", "verbose": 1 } RESPONSE: { "id": 1, "result": [ { "data": [ { "entries": [ { "action": "allow", "id": 1, "obj seq": 1, "status": "enable", "type": "simple", "url": "www.france2.fr" }, { "action": "allow", "id": 2, "obj seq": 2, "status": "enable", "type": "simple", "url": "www.tf1.fr" }, { "action": "allow", "id": 3, "obj seq": 3, "status": "enable", "type": "simple", "url": "www.france3.fr" } ], "id": 1, "ip-addr-block": "disable", "name": "WhiteList_FR", "one-arm-ips-urlfilter": "disable" } ], "status": { "code": 0, "message": "OK" }, "url": "pm/config/adom/CM-LAB-004/obj/webfilter/urlfilter" } ] }

I would strongly suggest you to subscribe to the community portal for Fortinet APIs: FNDN at https://fndn.fortinet.net

 

 

 

Jean-Pierre FORCIOLI

View solution in original post

2 REPLIES 2
jpforcioli_FTNT

Hi,

 

Could you please precise your FMG version?

 

Your endpoint seems correct provided FortiManager is your ADOM name...

 

Here is what I'm getting on my own FortiManager (my ADOM name is CM-LAB-004:(

 

REQUEST: {

"id": 1, "method": "get", "params": [ { "url": "pm/config/adom/CM-LAB-004/obj/webfilter/urlfilter" } ], "session": "EbhxAvs3v8oElYHUrBq7MRDm5zqhQHW5KauzsRza+utN0HcgOa+lPeHveFx8RZLllOHOTs7rtm1DUhRPeXYe8A==", "verbose": 1 } RESPONSE: { "id": 1, "result": [ { "data": [ { "entries": [ { "action": "allow", "id": 1, "obj seq": 1, "status": "enable", "type": "simple", "url": "www.france2.fr" }, { "action": "allow", "id": 2, "obj seq": 2, "status": "enable", "type": "simple", "url": "www.tf1.fr" }, { "action": "allow", "id": 3, "obj seq": 3, "status": "enable", "type": "simple", "url": "www.france3.fr" } ], "id": 1, "ip-addr-block": "disable", "name": "WhiteList_FR", "one-arm-ips-urlfilter": "disable" } ], "status": { "code": 0, "message": "OK" }, "url": "pm/config/adom/CM-LAB-004/obj/webfilter/urlfilter" } ] }

I would strongly suggest you to subscribe to the community portal for Fortinet APIs: FNDN at https://fndn.fortinet.net

 

 

 

Jean-Pierre FORCIOLI
JG1

Your are right: I got the ADOM name wrong: It should be "root" in my env.

 

For the completeness of info, I am running "v5.2.2-build0706 150415 (GA)".

 

Thanks very much!

Labels
Top Kudoed Authors