REST API Creating and updating an ip firewall address list with domains

Hey,

I am using an external script to dump the DNS cache from the device and then populate an address list with specific domains.
I am able to dump and find the addresses but not sure how to add a batch of domains and/or addresses to the RouterOS device via REST API.
What:

https://router/rest/path

should I use and also, what is the json content that should look like?
For example for “googlevideo” list the next domains:

rr3---sn-jjjpa-ua8e.googlevideo.com
rr3.sn-jjjpa-ua8e.googlevideo.com
rr3.sn-jjjpa-ua8e.googlevideo.com
rr1---sn-aigl6nzs.googlevideo.com
rr1.sn-aigl6nzs.googlevideo.com
rr1.sn-aigl6nzs.googlevideo.com

OK so I took the time to write some code and give a programmatically example of an address-list update at:
https://github.com/elico/mikrotik-web-filter-bypass-domains

It requires some environment variables like MT_HOST and MT_USER and MT_PASSWORD
I hope it helps someone.

Thanks! I was just looking to do something similar this morning and came across this.

Hello. I am looking for a web application for my MikroTik that can write and delete IP addresses that I previously have on a list. I don’t know if this is for this or if you know where I can find it.

Create

POST http://router/rest/ip/firewall/address-list/add
{"address":"8.8.8.8","list":"Google","disabled":"false","comment":"No comment","dynamic":"false"}

*return .id value of new record

Read

POST http://router/rest/ip/firewall/address-list/print
{".query":["address=8.8.8.8","list=Google","#|"]}

_*See this topic http://forum.mikrotik.com/t/how-using-query-stack-in-rest-api/173298/14

Update ([.id] - .id value of record with *)

PATCH http://router/rest/ip/firewall/address-list/[.id]
{"address":"8.8.8.8","list":"Google","disabled":"false","comment":"","dynamic":"true","timeout":"02:00:00"}

Delete ([.id] - .id value of record with *)

DELETE http://router/rest/ip/firewall/address-list/[.id]

Thanks. I’ll see if it helps. Regards.