Automatically generate level (map) by using code/script and API

Hi guys,
I am pretty new to UE4 engine and video game development, yet I need to implement something using UE4.
Below is my question:
Is it possible to automatically generate level (map) with the assets already defined in content folder by using some code/script and API, and how?
Would some one please give me answer to this?
Thank you so much.

I’ve done something like that for my last game. I made Room Layout Blueprints and with an algorithm I placed them together like a Zelda / Binding of Isaac style layout.

I have written down how I made it here: