Question
Robert Shoults · Apr 3, 2019

How do I programmatically create a web application definition?

I have a need to dynamically create a web application definition in a namespace using ObjectScript.  I am having trouble finding a cache class or routine that let's me do this. 

Thanks

00
0 2 3 523
Log in or sign up to continue

Replies

Web applications defined in Security.Applications class in %SYS namespace.

zn "%SYS"
set props("Path") = "/opt/my/app/csp"
set props("Description") = "My Cool Application"
do ##class(Security.Applications).Create("/csp/test", .props)

Hi @Dmitriy Maslennikov ! And how to make this app a default app for the namespace and also enable IRIS Analytics (DeepSee) in it?

If you're doing provisioning, consider using %Installer. It allows creation of Web Applications, among other things.