Written by

Integration Engineer at Cognosante
Article Oliver Wilms · 5 hr ago 2m read

REST/Web Applications in iris-budget

iris-budget

I created iris-budget app for the InterSystems Full Stack Contest in 2026. By full stack, we mean a frontend web or mobile application that inserts, updates, or deletes data in InterSystems IRIS via REST API, Native API, ODBC/JDBC, or Embedded Python.

My app uses multiple REST APIs to add a new category or retrieve a list of categories of expenses and income.

First web application /csp/coffee

I inherited /csp/coffee from module.xml in iris-fullstack-template.

Second web application /csp/budget

For this project, I created a swagger file called "budget.json." I wanted to use the spec first approach for developing REST applications.
In iris.script, I used the following lines to create the Dispatch class "budget.disp" as well as a stub implementation class "budget.impl" by utilizing %Rest.API class.

   zn "IRISAPP"
   Set file="/home/irisowner/irisbuild/swagger/budget.json"
   Set obj = ##class(%DynamicAbstractObject).%FromJSONFile(file)
   Do ##class(%REST.API).CreateApplication("budget",.obj,,.new,.error)

To load my updated implementation code, I use the next line in iris.script:

   Do $System.OBJ.Load("/home/irisowner/irisbuild/src/cls/budget/impl.cls","ck")

Third web application /csp/rest

I added another web application in module.xml, because I wanted to have control over my dispatch class when I wanted to make REST calls from Streamlit app to IRIS backend.

I manually coded the Dispatch class "rest.dispatch." I wanted to send an API key or token from Streamlit app for authentication purposes. I tried calling "login" code during OnPreDispatch, but I kept getting errors.
I added an application role to the web application to give it permission to access the database to return data for returning category lists for my expenses and income.

Fourth web application /rest/budget

I tried to utilize isc-rest. I had trouble getting a dependency on it satisfied. I saw in Open Exchange that there had been an issue detected. I used the second and third web applications instead.