I am on v5.2.2-build0706 150415 (GA) and using FMG::JSONAPI. I have successfully obtained an existing list of URLs and parsed it to a format I wanted. I would now like to add a new URL to an existing URL list "our-web-filter". I have the following test code per the example in the documentation from "perldoc FMG::JSONAPI":
my @newobjects = ( { name => 'our-web-filter' , 'id' => 1, 'url' => 'zzzzz.com', 'action' => 1, 'type' => 0, 'status' => 1 } );
my $response = $jsonapi->add("pm/config/adom/root/obj/webfilter/urlfilter", \@newobjects);
Here's part of existing urllist obtained from fmg with "GET", dumped with Data::Dumper:
$VAR1 = [
{
'id' => 1,
'comment' => '',
'name' => 'our-web-filter',
'entries' => [
{
'url' => 'bridge-technology.com',
'action' => 1,
'type' => 0,
'status' => 1,
'obj seq' => 1
},
...
Is there anything obviously wrong with the "add" code?
Is there a "dry-run" method for testing with this tool?
Any help would be much appreciated.
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1758 | |
1116 | |
766 | |
447 | |
242 |
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 2025 Fortinet, Inc. All Rights Reserved.