you can go for:
$property(%source.%PackageName()_"."_%source.%ClassName(),"client_name")- Log in to post comments
you can go for:
$property(%source.%PackageName()_"."_%source.%ClassName(),"client_name")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:

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.
It is also possible to install Python packages along with IPM via requirements.txt entry. In case it helps anyhow.
We have 50+ packages on IntegratedML on OEX? wow. @Thomas Dyar
Thanks @Eduard Lebedyuk ! I'll give it a try!
Will it work for POST requests too?
And is it for Postman only? E.g. if I use swagger-ui how could I get this page displayed?
Another one-liner suggested by @Robert Cemper recently:
k^SPOOLs%io=$I O 2 u 2ZW%anyvariable c 2 u %ioE.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 %ioand then ZW ^SPOOL in the terminal.
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!
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$$$OKAnd 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 !
Thanks, @Robert Cemper !
But here I'm more interested in debugging the REST API implementation method, so it is not very useful in this case, right?
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
Hi Ed @Eduard Lebedyuk !
Where do I see this displayed data by:
do ##class(%CSP.Utils).DisplayAllObjects()
?
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"
}
Neat! Didn't know it is possible to use regular expressions in the map! Thanks for sharing, @Kurro Lopez !
Thank you, @David Hockenbroch !
I'll give it a try!
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:

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.jsNeat!
Thanks Ed! I’ll take a look!
Thanks @Robert Cemper ! As always - many options! Will try all
Thanks @Brett Saviano ! I'll give it a try
Thanks @David Hockenbroch ! Is it like @Robert Cemper suggests with Do LOG^%ETN()?
Thanks for sharing, @Stephen Canzano!
%expression - is a really impactful feature that can greatly help to tune performance while cubes building.
I agree, makes total sense. Documentation also have a feedback button on every page IIRC
Cool! Add dsw? Curious how it displays it? Also, DSW works neatly on a mobile
Congrats, @henry ! Well deserved!
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()
}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!
