You are looking for a way or any RestAPI to create a Management Module, Metric grouping/alert etc. These are APM Management Module.
Engineering team does not think all the APIs for creating malmanagement modules, metric grouping, alert etc. are officially public and documented like these on topology components and metrics:
Calling the endpoints the DX O2 UI calls when creating the above mentioned items we expect would work, but there is no guarantee the syntax won't change in the future.
As this type of solution is not documented, thus we are not certain that it will accomplish all your goals.
You can look into the following 3rd party tools that can help you in this case.
Webdriver
Jmeter