Integrating frontend React applications with backend services like IRIS database via REST APIs can be a powerful way to build robust web applications. However, one common hurdle developers often encounter is the Cross-Origin Resource Sharing (CORS) issue, which can prevent the frontend from accessing resources on the backend due to security restrictions enforced by web browsers. In this article, we'll explore how to tackle CORS issues when integrating React web apps with IRIS backend services.

11 5
5 187

I have a question about using OnInit() within a Ens.BusinessOperation.

When you include OnInit(), does OnInit() only execute when you start a Business Operation? Or does it execute OnInit () every time you send a REST request to the operation. I am trying to pinpoint when the best time is to execute the POST command to get the Token

I am needing to get a Bearer Token from a REST POST call and return the Authorization key prior to making the rest of the REST calls to pull down data.

0 12
0 90

Up until recently, I have been toying around with REST/FHIR capabilities but only internally. Now I have a request to make REST API calls outside of our Network.

I am using an RSA 4096 key, because Microsoft Active Directory Services which generates the signed certificate could not handle the Elliptical Key (ECC) when I put the request in.

0 0
0 71

I use a swagger file and ##class(%REST.API).CreateApplication to create the rest api.

There is an interesting post:, but it is code, not a swagger configuration. disp.cls returns always a header content : application/json that of course fails as I am not always returning a json

I can not figure out what to put in swagger. Some examples I tried:

0 2
0 66

Hi all,

When passing on the content of a file in a REST API call, I need to put the original file name in an HTTP header. As it happens, some file names have non-8-bit characters in them ("å", "ö", and the like), and these arrive garbled on the other side. Does anybody know the correct way to encode them (assuming they should be encoded at all)?

$zconvert(filename, "O", "UTF8") does not appear to be it. I'm leaning towards $zconvert(filename, "O", "URL"), but leaning isn't good enough.


0 1
0 38

I'm working with and am going through the tutorial right now. My project directory exists on my IRIS server. When I try to create a module.xml file in the root package, I get a #16006 error. I see that there is a "generate" command for zpm that should create a module.xml for me on my local filesystem. How can I create this module.xml in the same folder that holds my code living on the IRIS server?

1 1
0 28