office 365 – How to automatically create a public link from onedrive?

I m using Office 365 E3.
I know such thing can done from the web Interface, but in my case there are 100000 files in the folder I want to share.
I also can t share that whole folder, since I want only files with the .sst extension to be public. And the directory layout is managed by a third party application (using the api) which means I can t just move them by type to an other directory without rewriting the application from scratch.

How to generate a download link accessible from command line tools without a Microsoft account for each files?
The output should be a list of file names along their download link for each of them.