Skip to main content
JG1
New Member
April 4, 2017
Solved

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

  • April 4, 2017
  • 2 replies
  • 9217 views

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

    Best answer by 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

     

     

     

    2 replies

    jpforcioli_FTNT
    Staff
    Staff
    April 5, 2017

    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

     

     

     

    JG1
    JG1Author
    New Member
    April 5, 2017

    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!

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!