Hi

I have been experimenting with the creation of a set of REST services for an app. The basic GET operation is set to create a %ZEN.proxyObject instance, and then set an instance of a Persistant class as a property, which gives me all of the values I want to return. However, it also gives me some values that I don't want to return over REST (because they are both private, and large registered objects which will bog down performance)

2 3
0 448
Question
· May 4, 2018
How to use MS Exchange wsdl

Hi

We are trying to create a new operation wich gets a XML message and send it's contents in an email.

We've used the SOAP Wizard to generate the Proxy Classes but now we are a bit lost...

What we are trying to achieve is to Create appointments in a Outlook Calendar and send emails.

0 3
0 340

In this article, I would show how you can upload and download files from InterSystems products via http.

The questions about working with files over http arise fairly often on community and I'm usually linking to my FileServer project which demonstrates file upload/download but I'd like to talk a bit more on how we can serve and receive files from InterSystems products.

8 3
5 2.6K

InterSystems API Management (IAM) - a new feature of the InterSystems IRIS Data Platform, enables you to monitor, control and govern traffic to and from web-based APIs within your IT infrastructure. In case you missed it, here is the link to the announcement. And here's an article explaining how to start working with IAM.

In this article, we would use InterSystems API Management to Load Balance an API.

In our case, we have 2 InterSystems IRIS instances with /api/atelier REST API that we want to publish for our clients.

There are many different reasons why we might want to do that, such as:

  • Load balancing to spread the workload across servers
  • Blue-green deployment: we have two servers, one "prod", other "dev" and we might want to switch between them
  • Canary deployment: we might publish the new version only on one server and move 1% of clients there
  • High availability configuration
  • etc.
7 3
4 772

Let's imagine if you would like to write some real web application, for instance, some simple clone of medium.com. Such sort of application can be written using any different language on the backend side, or with any framework on the frontend side. So many ways to do the same application, and you can look at this project. Which offers a bunch of frontends and backends realizations for exactly the same application. And you can easily mix them, any chosen frontend should work with any backend.

Let me introduce the same application realization for InterSystems IRIS on a backend side.

6 3
1 762

or "Things are going to break"

We left our application over the weekend, secure in the knowledge that it was returning data from our primary persistent class, User.Widget. However, Widgets Direct are the premier supplier of both Widgets AND Widget Accessories, so we should really start working on adding these Accessories to our application.

2 3
0 1.3K

What are other's thoughts, opinions and experiences going from CSP to RESTful services, specifically when it comes to reusing code in CSP files?

One could define a method in CSP as follows:

<script language="cache" method="SubmitSomethingAwesome" arguments="aswesomeId:%Numeric">

And it's generated in csp.mycsppage.cls ascsp.mycsppage.SubmitSomethingAwesome(awesomeId as %Numeric).

Have people had success defining there rest call by calling the generated CSP classmethod?

Things that work well I've found:

0 3
0 283

Hello,

I have a problem with a FHIR Interop scenario that the HTTP Header Value content-type between IRIS and client changes in case of an error (HTTP 422). If I set the status in the response to 200 OK as the last step in the service class, the return transmission works.

Within my operation class, the error code is taken from the source system and entered in the HS.FHIRServer.Interop.Response message.

0 3
0 110

Anxious about starting your first major REST application? Don't fret! Join Michael Smart, Senior Support Specialist at InterSystems, as he explores the principles of RESTful design and covers best practices for creating flexible, robust, and intuitive REST services.

Watch the webinar and access the sample code.

Still have questions? Ask them in the comments section below!

2 3
0 977

Hi all,

As you know, it is very complicated to debug a Business Service Rest API because the object is created when the applications receive a request, so we cannot have the JobId that we can use to debug.

https://docs.intersystems.com/iris20211/csp/docbook/DocBook.UI.Page.cls?...

So, I'm trying to get the JobId when the class is being created, write a trace in OnInit() method and write the JobId in a log info

1 3
0 114
Question
· Apr 5, 2019
REST and CSP Sessions

Hi!

We are using Rest Service with inheritance of %CSP.Rest, and we are having the following problem: when we receive 100 request from single IP adress - this creates 100 CSP sessions and takes 100 user licence for each request for few seconds. What can we do do about this? We've set this parameter:

Parameter UseSession As Integer = 1;

Thank you in advance!

0 3
0 537

I cant find any description on how to read custom http request headers in a REST service.

On some occations i want to read http headers passed along when customers uses our REST API or headers added by the CND provider. Does anyone know how to read these http headers?

For example:
cloudflair.com sends a vistors country information along to the server using a customer http header called "CF-IPCountry". We would like to read this information and use it for statistics.

0 3
0 1.8K

Hi everyone! My company has a Zen ERP application with CSP delegated authentication. Now, we're developing a separated BI application, using Angular, which consumes DeepSee REST API services. Both applications access the same Caché database.

How to implement single sign-on strategy in order to allow an already authenticated ERP user to access DeepSee REST services? Has anyone already implemented something like that?

Thanks in advanced.

0 3
0 535

There's a new and exciting enhancement to QEWD that has just been released - it's an additional layer of abstraction known as QEWD-Up. QEWD-Up hides away all the mechanics of QEWD itself, allowing you to focus on just your REST APIs and the code that implements them.

Additionally, and importantly, QEWD-Up simplifies the maintenance of your REST APIs, allowing you (and others) to quickly and easily understand their life-cycle and implementation.

3 3
4 765

Hi everybody,

I created my own REST service class by extending EnsLib.REST.Service.

In some particular conditions of the parameters of the request, the REST service should respond to the client with an HTTP status response code 400 "Bad request".

I read the article "RESTful Exception Handling " and I try to use the suggested:

do ..ReportHttpStatusCode(400)

But the server seems ignore it and get back to client the 500 http response code.

Any suggestions?

0 3
0 1.5K

Hi Guys,

I have a DB server (ser-app-db) where IRIS is installed as server.

I have a Web server (ser-app-w) where IRIS is installed as web server and configured as CSP gateway.

I followed the configuration guide and ser-app-w perfectly display the CSP and CLS pages.

But that's not working for my REST service, for exemple with the REST sample:

http://ser-app-db/REST/CRM/Get?ReqID=123(GET): work and show the request

0 3
2 1.1K
Question
· Nov 7, 2016
Binary Support in JSON?

I'm working on a REST service which will include a binary stream as a request property. I'm currently encoding the stream as BASE64 and passing it as a string value, but I was wondering if there is anything in the Caché JSON support that may be a better fit for encoding this data? Thanks Chris

1 3
0 844

Hi Guys,
Can you please guide me to get rid of this issue. Please find the image files with this post.

Please let me know, before we are developing an API what are all the setup/Configuration(Apache/web server) need to do in my machine.

If any lead would be appreciated.

I don't know, in XMLNamespace parameter which URL need to use.

.

Thanks,

0 3
0 486

In this article, we will explore the development of an IRIS client for consuming RESTful API services that have been developed to the OData API standard.

We will be exploring a number of built-in IRIS libraries for making HTTP requests, reading and writing to JSON payloads, and seeing how we can use them in combination to build a generic client adaptor for OData. We will also explore the new JSON adapter for deserializing JSON into persistent objects.

4 3
2 972