#REST API

10 Followers · 627 Posts

Representational state transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services (RWS), provide interoperability between computer systems on the Internet. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. Other kinds of Web services, such as SOAP Web services, expose their own arbitrary sets of operations.

Learn More.

Announcement jingqi LIu · Mar 2, 2021

Bulid REST API application built with ObjectScript in InterSystems IRIS. It also has OPEN API spec,  can be developed with Docker and VSCode, can be deployed as ZPM module. can be used as Overbooking System data REST api.

What's Hotel Overbooking Management System?

The overbooking management system combines the unique conditions of the hotel, such as room prices, order channels, customer needs (etc...).

10
0 452
Article Yuri Marx · Mar 1, 2021 3m read

I'm participating in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during the training. Tips presented in the day 4:

  1. All data are stored in Globals and Global names start with ^. Example of global: ^animal. Global can have multiples locations to the data ("sub data"). Example: ^animal(1).
  2. ^%* globals are accessible from any system-wide (from any namespace).
  3. Globals enables IRIS to support multimodel data (object, relational, document, multidimensional, etc).
  4. To see globals go the Management Portal >
12
2 653
Article Mihoko Iijima · Mar 5, 2021 9m read

This article is a continuation of this post.

In the previous article, we discussed the development of business processes, which are part of the components required for system integration and serve as a production coordinator.

This article will discuss creating a business service, which is the information input window for production.

And finally, the last component of “Let's Use Interoperability!”

The business service provides a window of input for information sent from outside IRIS, with or

0
0 788
Article Eduard Lebedyuk · Oct 21, 2019 4m read

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.
3
4 1007
Question Menno Voerman · Feb 11, 2021

Hi All,

I hope someone can help me with the following, it's about the usage of the class EnsLib.HL7.Service.HTTPService.

Working situation right know.

In IIS we've got a site configured who is dealing with the client certificate, etc and redirect the full request to http://localhost/csp/healthshare/NAMEPSACE/EnsLib.HL7.Service.HTTPServi… and the web gateway redirects the request to Business Service 'EnsLib.HL7.Service.HTTPService.cls'.

Preferred situation:

We would like to have multiple available endpoints per namespace.

2
0 622
Article Alberto Fuentes · Feb 24, 2021 1m read

Hi Community!  Today I'd like to share with you a link to some exercises from a workshop about developing REST APIs and how to manage them using InterSystems API Manager.

It includes step by step exercises to:

  • Developing REST APIs from OpenAPI specifications.
  • Adding the created API in an interoperability production (optional).
  • Basic API management in InterSystems API Manager (service, route, auth, consumers, rate limiting, etc.).
  • Some other more complex scenarios in InterSystems API Manager like load balancing, or routing by header.

You will find it all here: https://openexchange.intersystems.c

0
0 350
Article Iryna Mykhailova · Feb 24, 2021 13m read

In the first installment of this article series, we discussed how to read a “big” chunk of data from the raw body of an HTTP POST method and save it to a database as a stream property of a  class. Now let’s look at how to save such data and metadata in JSON format.

Unfortunately, Advanced REST Client doesn’t let you compose JSON objects with binary data as a value of a key (or maybe I simply haven’t figured out how to do it), so I decided to write a simple client in ObjectScript to send data to the server.

I created a new class called RestTransfer.Client and added to it parameters Server =

0
0 642
Article Iryna Mykhailova · Feb 22, 2021 6m read

A question came up in the InterSystems developer community concerning the possibility of creating a TWAIN interface to a Caché application. There were several great suggestions on how to get data from an imaging device on a web client to a server, then store this data in a database. 

However, in order to implement any of these suggestions, you need to be able to transfer data from a web client to a database server and store the received data in a class property (or a table cell, as was the case in the question).

1
1 967
Question Yone Moreno · Jan 25, 2021

Hello,

We would be grateful if you could help us,

Our aim is to develop a method which retrieves an image stored in an external system, using a REST Operation

To upload the image we have the following code:

/// Operacion para gestionar el Registro imagen identidad digital en Tarjeta Sanitaria
Class Operaciones.REST.miSCS.miSCS Extends EnsLib.REST.Operation
{

Parameter INVOCATION = "Queue";

/// Subir la imagen del usuario
/// La documentación para crear este metodo es:
/// https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.cls?KEY=GNET_http#GNET_http_post_multipart
1
0 486
Question Sorin Fratila · Feb 4, 2021

Hi,

So I am a front end developer working with REST API with Cache database on the BE. The BE guys are currently using Cache through a Windows virtual machine and they claim it is not possible to have a development server to work with. All the work they are doing is directly on the production server and changes are immediate and I think this is a bad idea going forward and we most definitely need a development server that has access to the same code base and different version (through git) to be able to do development. We also do all the testing on this production server with test accounts, but we cannot do automated testing with this setup.

11
0 728
Job Neerav Verma · Jan 27, 2021

Hello fellow community members,

I would like to offer my services as an Intersystems Professional and am available to work on projects. 

I have more than a decade experience into  Intersystems stack of technologies including IRIS, Ensemble, Healthshare, Healthconnect, Cache Objectscript, Mumps, Zen, Analytics etc. with companies spread over US and UK  involved in multiple domains.

KEY SKILLS: 
Cloud Computing (AWS, MS Azure, GCP)
Intersystems Technology Stack (IRIS, Ensemble, Healthshare, Cache, Mumps, CSP,  ZEN, Analytics)
Databases (Modelling & Backend database design, SQL, PL/SQL 
SOAP & Restful

0
0 515
Article Botai Zhang · Jan 25, 2021 4m read

Built in multi model integration using InterSystems iris data platform

Solution of hospital information inquiry business

Integration of hospital information query business solutions using InterSystems IRIS data platform with built-in multiple models

### Summary:

With the gradual improvement of hospital information construction, there are more and more hospital subsystems, and more and more interfaces between systems.

0
0 370
Question Mark O'Reilly · Jan 25, 2021

Hi:

I've looked on many of these examples and questions how to post the JSON body but all the posts are a little complexly worded for me to follow. 

so i have an EnsLib.REST.Operation

The example in ENSDEMO Directory Request says 

Set tSC=..Adapter.PostURL(tURL,.tHttpResponse,"",pRequest.Body)

What i can't see is how in Demo Rest Directory request it happens to get the value of the message fields into 

/// For JSON content submission
Property Body As %GlobalCharacterStream;

I have also played around with converting objects to JSON ect.  All i want to do is post an example like this to the API

{
2
0 1057
Article Tani Frankel · Jan 19, 2021 2m read

For the benefit of those who want to use the Document Database (DocDB) capabilities within InterSystems IRIS, and specifically the REST API it provides, I put together a PostmanCollection that provides samples for several basic calls.

For example:

0
0 904
Question Simon Bijl · Jan 12, 2021

Hello to all,
 

I created a form in React and submitted the data to a cache-Rest service.
On the local netwok it works just fine.

But when i deploy it on our webserver in order to acces it from the outside it won't work anymore beacuse the external address is a https address, and the call to the cache webserver is based on http.(http://srvdb23:57772/restacc/newOrder)

Resulting in the following error: Referrer Policy: strict-origin-when-cross-origin ( Chrome) 

How should i resolve this? How can I make this rest-service accessible for https?

Best regards,

Simon

10
0 647
Question Yone Moreno · Jan 4, 2021

Hello,

We would like some advice

We have developed a REST Operation

The code is:

Class Operaciones.REST.miSCS.miSCS Extends EnsLib.REST.Operation
{

Parameter INVOCATION = "Queue";

/// 📤 Subir la imagen del usuario
Method SubirImagen(pRequest As Mensajes.Request.miSCS.SubirImagen, pResponse As Mensajes.Response.miSCS.SubirImagen) As %Library.Status
{
    set httpRequest = ##class(%Net.HttpRequest).%New()
    set tResponse = ##class(%Net.HttpResponse).%New()
    //set httpRequest.ContentType = "application/json"
    set httpRequest.ContentType = "multipart/form-data"

    
    set
5
0 1069
Question Simon Bijl · Jan 4, 2021

Hello to all,

I'm trying to post some form data from a form I made in React to the backend of cache fetching a REST-service.
Receiving and processing a JSON-object is no problem but how can I handle Form Data?

The frontend is sending the form as form data and also includes one or more files.

What is the easiest way to process this data in my REST.Broker- class?

Best regards,

Simon

6
0 637
Question Jens Salecker · Dec 15, 2020

We have a webserver which is using a port different to 443 for HTTPS communication. I can connect from the terminal session but not via the EnsLib.HTTP.OutboundAdapter. 

the example used in Terminal:

 
set httprequest=##class(%Net.HttpRequest).%New()
set httprequest.Server="appserver"
set httprequest.Port="4999"
set httprequest.Https=1
set httprequest.SSLConfiguration="app server"
do httprequest.SetHeader("Custom","cust")
set httprequest.ContentType="application/json"
do httprequest.EntityBody.CopyFrom(jsonfile)
do httprequest.Post("/FHIR/Bundle")

And this is my method using the

2
0 518
Article Rob Tweed · Dec 11, 2020 1m read

QEWD is assumed by most people to only integrate with IRIS (or Cache) via a connection through IRIS's high-performance C interface.  This requires QEWD (and its Node.js environment) to be installed and configured on the same machine as IRIS.

I'm frequently asked if QEWD can run on a separate server (or servers), and access IRIS (or Cache) over a network connection.  The answer is yes it can, but the information on how to set it up in this way has been admittedly a bit tricky to discover.

So I've now rectified that, and pulled together all the information you need into one place, if you want to

0
0 386
Announcement Rob Tweed · Nov 25, 2020

Those of you who run and support older-style legacy systems on IRIS may be interested in learning about and trying out a new framework I've built on top of my colleague Chris Munt's mg_web technology (details at https://github.com/chrisemunt/mg_web).

There are quite a few older-style and legacy applications out there whose useful life can be extended by making their functionality available as REST APIs.  To make this something that can be done quickly and easily, using modern, industrial-strength web servers, I've created what I'm calling mgweb-server:

https://github.com/robtweed/mgweb-server

Thi

3
0 596
Article Oliver Wilms · Oct 5, 2020 2m read

IRIS Interoperability Productions formerly known as Ensemble are fun to work with. Yes, I really think my work is fun. I have seen File Passthrough Services and File Passthrough Operations come in handy. At one point we placed test messages in files, then we utilized a File Passthrough Service with Inbound File Adapter to send the contents of the file as a Stream to a File Passthrough Operation with Outbound TCP Adapter. The Operation pointed at a TCP service and sent the test messages.

Later I wanted to troubleshoot another service that received file contents as the body of HTTP requests.

1
0 461
Article Rob Tweed · Oct 6, 2020 4m read

Those of you who are following the FullStack competition here in the Developer Community will know that I submitted an entry named qewd-conduit.  I wanted to summarise why I think it's something worth you taking a bit of time to check out.

qewd-conduit uses the Node.js-based QEWD framework alongside IRIS to implement the back-end REST APIs for something known as the RealWorld Conduit application:

https://github.com/gothinkster/realworld

This is a very cool initiative as it provides a platform for lots of different people to implement technically different solutions for both the back- and

6
1 677
Article Michael Smart · Oct 7, 2016 4m read

One useful feature of our REST framework is the ability for a dispatch class to identify request prefixes and forward them to another dispatch class. This approach of modularizing your URL map will improve code readability, enable you to easily maintain separate versions of an interface, and provide a means to protect API calls that only certain users will be allowed to access.

Overview

To set up a REST Service on your Caché instance, you need to define a dedicated CSP application and create the associated dispatch class that handles incoming requests.

1
0 3986