Question about scanning all aliases in sale

I saw the link below and, there is now api for scan all of them.

But is it really impossible?

No matter what, I want to scan all of them.

It is okay with only running on my own node.

Anybody have a good idea? Thanks.

There's no direct way.

You can scan all the blocks using the API and look for aliases transactions. That would be quite slow.

Another option is to directly query the database. You can access a database shell from the wallet, cogwhell icon, "Database shell".

Then you can directly query the database. Something like

select account_id,alias_name from ignis.alias where latest=TRUE

I want to make my node open and support api which return all exist aliases. Is there any guide line for me?
Im planning to run node 24hours open.

You will need to develop an add-on. We don't have any guide about that but you can follow the included add-ons in the source code for inspiration.

If i want to scan all aliases using java, should i have to import sql libraries?