31
18.7 Legacy Series / Re: Firewall API use
« on: December 30, 2018, 06:06:02 am »
Just wondering if you have this sorted out. I too have found these issues.
Also if I create an alias with api/firewall/alias/addItem it works fine. BUT, the flush command does NOT work in API or in the Browser GUI. It gets the {"status":"done"} result from API, but in the GUI when you edit the alias, the IP address is still there. If you go to Diag, pfTables, the alias entries do NOT appear. After a reboot (just to make sure), the Aliases reappear in pfTables and are still in the alias itself. (p.s. I just updated to 19.1.b_492-amd64, as the features mention "firewall alias API conversion" more complete than 18.7) so I think I can say the Flush function doesnt seem to work.
My use case is to (via API)
1. Flush the Alias, and
2. re populate with another (updated) list.
Can/Is there a way to addItem address/s in an array, or alias_util/add use an address array. I tried a few permeations but get a "cant convert array to string" (or something to that effect) error.
Also if I create an alias with api/firewall/alias/addItem it works fine. BUT, the flush command does NOT work in API or in the Browser GUI. It gets the {"status":"done"} result from API, but in the GUI when you edit the alias, the IP address is still there. If you go to Diag, pfTables, the alias entries do NOT appear. After a reboot (just to make sure), the Aliases reappear in pfTables and are still in the alias itself. (p.s. I just updated to 19.1.b_492-amd64, as the features mention "firewall alias API conversion" more complete than 18.7) so I think I can say the Flush function doesnt seem to work.
My use case is to (via API)
1. Flush the Alias, and
2. re populate with another (updated) list.
Can/Is there a way to addItem address/s in an array, or alias_util/add use an address array. I tried a few permeations but get a "cant convert array to string" (or something to that effect) error.