Firewall PHP Api

Hello! Please, i need help..
I tying to disable user in firewall address-list

I trying

$API->write(“/ip/firewall/address-list/set”, array(“address”=>“10.10.10.10”, “disabled”=>“no”, “numbers”=>“29”));

But it does not work (

If any could do this, please helm me

Are you trying to disable the port or enable it?

You say disable, which implies turn off? Is this correct?

If so, you need to set the following (“disabled”=>“no”) to (“disabled”=>“yes”).

Yes, its my mistake, but it not work too (

[5, 1]!done Connected… <<< [29] /ip/firewall/address-list/set <<< [20] =address=10.10.10.10 <<< [12] =disabled=no <<< [11] =numbers=29 >>> [5/5] bytes read. >>> [5, 42]!trap >>> [11/11] bytes read. >>> [11, 30]=category=0 >>> [21/21] bytes read. >>> [21, 8]=message=no such item >>> [5/5] bytes read. >>> [5, 1]!done Disconnected… 29no10.10.10.10

I resolve my problim in the command you shoul insert the .id and it become work )))

$API->comm(“/ip/firewall/address-list/set”, array(“.id” => $id,“address” => $ipp,“disabled” => $block, ));

$id like ‘*2F’ or something like that
$address like “X.X.X.X”
disabled like ‘yes’ or ‘no’

And thats all )))))

Glad to hear you got it working.

Thanks!

If you want a can give you my “code” ))

$API->write("/ip/firewall/address-list/print",false);

$API->write("?address=$ip",false);
$API->write("=.proplist=.id");
$READ = $API->read();
$i=0;
foreach ($READ as $x) {
$line=$READ[$i];
$id=$line['.id'];
sleep(1);
$API->write("/ip/firewall/address-list/remove",false);
$API->write("=.id=$id",true);
$i++;

usleep(5000);

}}