Evgeny Shvarov · Nov 11, 2025 go to post

you can go for:

$property(%source.%PackageName()_"."_%source.%ClassName(),"client_name")
Evgeny Shvarov · Nov 10, 2025 go to post

But I must say Postman seems as a great tool to debug REST API in IRIS, even while debugging local stuff. And it can build collections on the fly on open-api spec provided - very convenient!

Evgeny Shvarov · Nov 10, 2025 go to post

Hi @Eduard Lebedyuk !

Unfortunately, this approach is not working (at least for me) while using ^%REST approach and disp->impl implementation classes schema:

If I put this into the impl classmethod, the only thing I'm getting back in Postman is 1:

Evgeny Shvarov · Nov 10, 2025 go to post

Yes. The initial idea for intersystemsdc was to avoid waiting on the Docker build process to install IPM and other syntax sugar and good stuff from OEX.

So, maybe we don't need intersystemsdc now very much to always get along with official containers set.

Evgeny Shvarov · Nov 9, 2025 go to post

It is also possible to install Python packages along with IPM via requirements.txt entry. In case it helps anyhow.

Evgeny Shvarov · Oct 26, 2025 go to post

Another one-liner suggested by @Robert Cemper recently:
 

k^SPOOLs%io=$I O 2 u 2ZW%anyvariable c 2 u %io

E.g. if you want to expose the content of %request during REST API method debugging, to write all the contents of %request to ^SPOOL global:

k^SPOOLs%io=$I O 2 u 2ZW%request c 2 u %io

and then ZW ^SPOOL in the terminal.

Evgeny Shvarov · Oct 26, 2025 go to post

It is a global, again, though... But a very interesting and useful way to convert any write to a device into a global. 

Deserves a one liner input! 

Evgeny Shvarov · Oct 26, 2025 go to post

Thank you, @Robert Cemper !

This works like a charm! 

So, in my case, I also wanted to see what's in a stream object that comes into the method (you may ask me how I don't know this, as it is method I coded? ) I don't, as it is a generated one via %^REST):

ClassMethod submitForm(formData As%Stream.Object) As%Stream.Object

{

set formDataObj= {}.%FromJSON(formData.Read())

k^SPOOLs%io=$I O 2 u 2do formDataObj.%ToJSON() c 2 u %ioreturn$$$OK

And then I do a REST API call and can see data in the terminal with zw ^SPOOL global:

USER>zw ^SPOOL
^SPOOL(1,1)="{""amount"":0,""name"":""John Doe"",""taxid"":""AB123456C"",""nationality"":""british"",""email"":""john.doe@example.com""}"
^SPOOL(1,2147483647)="{67504,40535{2{"

Simple and easy! Fantastic, @Robert Cemper !

Evgeny Shvarov · Oct 25, 2025 go to post

Wow, thanks @David Hockenbroch ! 

Is it as simple as that? So when we receive a web call, it is all about the %request with the Method and content filled?

This could also be the way to unit-test REST-API methods

Evgeny Shvarov · Oct 25, 2025 go to post

This works like a charm, @David Hockenbroch !

I'd also add to a VSCode a convenient extra link to see all the errors of such like here:

"links": {
        "UnitTest Portal": "${serverUrl}/csp/sys/%25UnitTest.Portal.Home.cls?$NAMESPACE=IRISAPP",
        "Error Log": "${serverUrl}/csp/sys/op/UtilSysAppErrorNamespaces.csp"
      }
Evgeny Shvarov · Oct 20, 2025 go to post

Hi @Brett Saviano !

Tried it!

Here is the feedback:

1 - can we add the link to the VSCode extension to be installed? I spent some time before I understood that, besides InterSystems ObjectScript, I need to install a special ObjectScript Extension pack .

2 - to make a REST API call I need to fill all the fields manually. Even I have an Open API spec class. Is it possible to read from it and provide all the fields ready to for tests? Filed a task and an idea.

3. Wasn't able to start debugging: faced the following error:

Evgeny Shvarov · Oct 19, 2025 go to post

Also, often we want to switch to our own endpoint automatically instead of default one. 

These 3 lines in Dockerfile will do the thing.

RUN old=http://localhost:52773/crud/_spec && \
    new=http://localhost:52773/your/api/_spec && \
    sed -i "s|$old|$new|g" /usr/irissys/csp/swagger-ui/swagger-initializer.js
Evgeny Shvarov · Sep 27, 2025 go to post

I agree, makes total sense. Documentation also have a feedback button on every page IIRC

Evgeny Shvarov · Sep 24, 2025 go to post

Thanks @David Hockenbroch !

An almost ideal pattern to run an SQL query in ObjectScript. 

If you could also share with error handling around?

My typical pattern looks like this one below. Includes try-catch in case when I need to rollback something:

try {

set tStatement = ##class(%SQL.Statement).%New()

set query = "ALTER Table "_table_" ADD PRIMARY KEY ("_column_")"$$$TOE(st,tStatement.%Prepare(query))

set rset=tStatement.%Execute()

if rset.%SQLCODE < 0 {

write"Error adding primary key: "_rset.%SQLCODE_" "_rset.%Messageset ex=##class(%Exception.SQL).CreateFromSQLCODE(rset.%SQLCODE,rset.%Message)

$$$ThrowStatus(ex.AsStatus())

}

}

catch ex {

set st=ex.AsStatus()

}
Evgeny Shvarov · Sep 1, 2025 go to post

Oh my god! What a drama!

Guys, you are maybe late for the Venice Film Festival 2025, but the Oscar 2026 nomination is yours!

And moreover, Dave Davidson is healthy and sound because of Interoperability and InterSystems! Thanks @Vishal Pallerla  and team!