How to create application via API

Hi~

I want to create an application using the API.
I’ve looked at several ways, but is there a way to create the directory and create the Application.xml file?
There is a problem that the application created in the manager UI can not be seen.
(Sometimes the time seems too long.)

How do I delete an application?

I want to delete the application when there is no stream in my application.

It seems that IMedaiStreamActionNotify3 class should not be deleted.