Do you have any experience / recommendations / best practice on how to update server-side data residing in a Cache database via a REST service?

A naïve approach would be to send a full JSON representation of the data object via an http POST to a method on a REST handler class:

<Route Url="/mydata/:id" Method="POST" Call="Update"/>

The problem I see here is, if only one of the data object's properties has changed, how do we know which? Or do we simply overwrite all properties?

0 3
0 544


I am a beginner on intersystems technologies ! and i want implements Oauth2 for our projects ( Angular 2 + Caché REST Backend).

i read the article that the link is below :

But : i need to create all servers ( Auth and Resource ) on Caché and dont' to use google server.

0 4
0 901

I am trying to write an application that will take some information on the database make a call to the Google API distance matrix and get the information to use with rest of the application without using the ensemble part of the development is this possible and how can I do my communication with the API from a cache class thanks in advance

0 7
0 1.3K


I want to convert a json, which passed on in the a REST call, into a request message.

I use method %ConvertJSONToObject of the %ZEN.Auxiliary.altJSONProvider class.

Set sc = ##class(%ZEN.Auxiliary.altJSONProvider).%ConvertJSONToObject(%request.Content, "TestRequest", .request)

Is there an alternative for this? I want to avoid to use the %ZEN library.

Best Regards

Roger de Coninck

0 8
0 646

Hello community,

I am trying to parse the below HttpResponse in Cache. Cannot get the Iterator to work. Is there a single loop which can parse both or single messages and grab the error?

{ txt1:'error msg1'},

{ txt2:'error msg2'},

error: {
'error msg1',

'error msg2'


Jimmy Christian

0 16
0 2.1K

I am trying to create REST API following these instructions:

However it does not work.

I tried downloaded the v2.0 schema.json of the OpenAPI specification and pasted it on Postman with the parameters as speicifed, but I get this error message back:

0 4
0 376


I am trying to find out if it is possible to decode the Azure access token in IRIS. Has anyone ever tried this before? I need to decode the token to extract the "Scope" details in order to verify the scope to make sure client is permitted to do the request they have done.

If you could point me to any information, that'd be great.

Thank you.


0 7
1 621

I am trying to call to a website that renders a xml structure as a response.if I put the url on the browser an xml rendered page is returned but if i call to this using the below code I get an object reference error which I am finding had to understand is there anyone who could help understand this error or point me in the right direction thanks.

Set tSC=$$$OK

0 2
0 188
· Sep 19, 2016
REST json payload


This almost seems like a silly question, but I am new to REST services.

I have a rest service that has a method for adding records to my database.

<Route Url="/userdetails" Method="POST" Call="SaveUserDetails"/>

My REST client sends data using json in the body of the request. I have verified using debugging tools that the data is actually being sent.

On the server side in my SaveUserDetails method where do I find the json?

What is the proper way to serialize that json into an object?

0 2
0 1.4K


I'm getting mad trying to get data from an external REST service that uses Basic Authentication from Ensemble. The BO worked fine when I was using a test server without authentification, but as soon as we need to go to production I cannot have it working.

So far, I've created the username/password at the credentials page (Ensemble-Configure-Credentials). I've setup the BO to use this credentials. But nothing happens.

I've tried with the Rest Client (addon for Mozilla), and using the same address, port and user/pwd works just fine.

0 8
0 1.6K

Hi dev community,

I am currently working on a project to send documents to a RESTful based API that supports bearer
Token Authorization.

When we try to fire a JSON request from our EnsLib.Rest.Operation towards the 3rd party API with a
valid Token we keep receiving Authorization Error codes HTTP 401 back.

If we use the same request and same Token from a test utility such as Postman the request is
successful and we are able to move past the authorization stage.

0 4
2 3.5K

Hello All,

I am compiling a REST Operation to call our hospital Administration system, following tutorials around the REST API's etc. First time we have integrated like this so not much knowledge around our hospital - hoping someone on here can help.

I have been using the JSONStreamToObject Method which is working as i expected, apart from trying to get a specific item in the example JSON Response as follows:


0 2
0 533

I have an interoperability production that functions as a FHIR proxy. I have a need to add an HTTP Header value to the outbound request. I've subclassed HS.FHIRServer.Interop.HTTPOperation, but I cannot find a way to add an HTTP Header to the request. The HTTP class used in HS.FHIRServer.Interop.HTTPOperation is HS.FHIRServer.RestClient.HTTP. That RestClient class does not seem to expose or allow modification of the actual HttpRequest.

0 3
0 313
· Dec 4, 2023
Custom Application Metric

I made a custom application metric, imported it to the USER namespace and used:

set status = ##class(SYS.Monitor.SAM.Config).Add.ApplicationClass("historymonitor.errorSensor", "USER")

to add it. When I do 'w status' it returns 1 so it is added but I still can't see the custom metric in the api/monitor/metrics endpoint. Even though I added %DB_USER in the application roles for api/monitor.

Does anyone know where the problem might be that the metrics endpoint still doesn't show my metric?

0 1
0 114

Hi all,

We're creating a series of RESTful APIs that output data from a Cache database (made up of global storage that we've mapped to classes). I'm running into some problems with object-to-JSON conversions when relationships are involved. Eg:

ParentClass has children relationship to ChildClass

ChildClass has parent relationship to ParentClass

0 1
1 627