#REST API

0 Followers · 604 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 John Murray · Sep 26, 2024

See the new team members in action:

Try them online for yourself:

https://gitpod.io#snapshot/b31bdf9c-4657-402a-a2d

Get it from the Extensions view inside VS Code, or here in Marketplace.

Vote for it here in the current Developer Tools 2024 contest (voting ends: 29 Sep, 2024, 11:59:59 PM EST).

Discuss it below.

Most of all, enjoy DX Jetpack with its added booster rockets!

0
0 0
Question Oliver Wilms · Aug 29, 2024

Hello, I want to create PDF from HTML source. I found pandoc. I installed pandoc on IRIS container image. I created Interoperability production. I have setup REST service to receive HTML file in request body. I call pandoc command pandoc -o output.pdf input.html  from a BPL process. I copy output.pdf file stream into response body. I save the response at the source. I get a file named output.pdf but it does not load in Acrobat. I suspect I am doing something wrong with headers (accept-encoding?) or maybe do I need to base64 encode the pdf file to transfer it via REST?

0
0 0
Question Bradley Collins · Aug 18, 2024

Dear All,

I am currently part of a team that is developing an application using Microsoft PowerApps as the front end and IRIS as the backend.  Effectively that frontend screens, which are house and an Azure serve, call a series of REST interfaces exposed by IRIS from a physical Microsoft server.  During the development stage we have not had any security in place but now we need to secure the application using a single sign on.  PowerApps relies on Microsoft Entra for its security both LDAP and OAuth.  Has anyone in the community connected IRIS to Microsoft Entra? 

0
0 0
Question Scott Roth · Jul 5, 2024

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.

When not using OAuth, what have you done to get the Token prior to executing any Requests?

Thanks

Scott

0
0 0
Job Matthias Thon · Jun 12, 2024

Hello,

I have over 30 years of experience developing solutions with MUMPS and IRIS. Additionally, I also develop in C++, Python, Angular... 
Experiences with Container (Docker) , GIT and REST-API's

 I'm seated in Germany and looking for a job opportunity as a freelancer who mostly works from home office.

regards Matthias

0
0 0
Question Sam Bonell · Jul 15, 2024

Hey,

I'm testing a REST API that is used for our IRIS Backend with a mobile app (Angular / ionic). 

The problem is that, our test environment does not yet have HTTPS capabilities, it's something we're going to set up ASAP, but right now we don't have it set up. 

We want to test the API endpoints via a web browser using either a test application built in Angular, or the app itself built with NPM via the browser. This means that the set-cookie headers are being blocked by the browser. 

Is there a way that we can allow the set-cookie header to be set in the browser for testing? 

0
0 0
Announcement Timothy Leavitt · Jun 27, 2022

Hello community,

I'd like to briefly announce three new packages, available on the Open Exchange / through ZPM, that can really help accelerate modern full-stack application development on IRIS. I announced all of these in a Global Summit session last week, but you may have missed it - and I hear there's a full-stack application development contest coming up!

0
1 395
Question Kwabena Ayim-Aboagye · Jul 9, 2024

I'm working with isc.rest 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?

0
0 0
Article Guillaume Rongier · Jul 8, 2024 8m read

Description

This is a template for an Django application that can be deployed in IRIS as an native Web Application.

Installation

  1. Clone the repository
  2. Create a virtual environment
  3. Install the requirements
  4. Run the docker-compose file
git clone
cd iris-django-template
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
docker-compose up

Usage

The base URL is http://localhost:53795/django/.

Endpoints

0
0 0
Article Guillaume Rongier · Jul 8, 2024 3m read

Context

The Web Server Gateway Interface (WSGI) is a simple calling convention for web servers to forward requests to web applications or frameworks written in the Python programming language. WSGI is a Python standard described in detail in PEP 3333.

🤔 Ok, great definition and what the point with iris ?

IRIS 2024.2+ has a new feature that allows you to run WSGI applications directly on IRIS. This feature is a great way to integrate IRIS with other Python frameworks and libraries.

0
0 0
Question Sylvie Greverend · Jul 2, 2024

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

There is an interesting post: https://community.intersystems.com/post/download-file-rest-api-operation, 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:

produces:
- application/pdf
- image/png
responses:
   200:
      schema:
           type: file
responses:
   200:
       schema:
           type: string
           format: binary

Thank you

0
0 0
Question Martin Nielsen · Jul 4, 2024

Hi, I have a controller which handles accounts, and forwards to the relevant controller based on the path, example below:

XData UrlMap
{
<Routes>

<Map Prefix="/:accountId/anothercontroller" Forward="AnotherController"/>

</Routes>
}

Problem is that inside AnotherController, the accountId path parameter is lost, I assume that's because the map forward simply checks if there's a match then forwards.

AnotherController:

XData UrlMap
{
<Routes>

<Route Url="/:somethingId" Method="POST" Call="CreateSomething"/>

</Routes>
}
ClassMethod CreateSomething(somethingId)
{
}
0
0 0
Question Ashok Kumar T · Jul 4, 2024

Hello Community,

I've configured a FHIR Server in FHIR Configuration "/csp/healthshare/learn1/fhir/r4 " and I enabled a JWT Authentication for this web application. I've invoked this url http://localhost:52773/csp/healthshare/learn1/fhir/r4/login with basic auth get the JWT token. Now I use the access token as a "Bearer" for GET the patient resource. But I got 401Unauthorized error. Anyway I can get the patient resource with basic auth. I tired assign with %ALL role for testing as well. Did I miss any additional configuration in "FHIR Server Configuration"

0
0 0
Question Will · Jun 18, 2024

HI,

I'm migration an existing integration to InterSystems.  The upstream (external) system calls a JSON web service hosted in the interface engine, which converts the JSON data received to a HL-7 messages to send to the downstream system. I'm looking for direction and example of how to do the equivalent in InterSystems, so the the upstream system only has to modify the URL of the web service they call.

I suppose in IS we'll need to create a business service that is a RESTful JSON web service? How to access the JSON data (parameters in the web service call) in the Transformation?

Thank you!

W

0
0 0
Question Scott Roth · Jul 1, 2024

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
Article Xintong Li · Jun 26, 2024 8m read

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.

Creating the Schema

We start by defining a simple schema named Patients:

0
0 0
Question Scott Roth · May 28, 2024

I am attempting to make a FHIR call against the Epic Repository through Intersystems. I have setup a Service client per Create FHIR REST Client | InterSystems Developer Community | Business

but I have set it up using OAuth and HTTPS.

I have verified that the OAuth works by executing it manually via a Terminal to verify I get a response. Of course, when I do it is writing to the ISCLOG

I am trying to now test making the FHIR call by initiating the test of HS.FHIRServer.Interop.HTTPOperation, however I keep getting mixed results with first a 404 not found error, and now a 401 unauthorized error. 

0
0 0
Article Kate Lau · Mar 12, 2023 1m read

Add a credential to login the FHIR REST interface - in this case only consider a basic authentication

 

Add Service Registry  - in this case only consider a basic authentication

- setup a HTTP service

- input the Path to the FHIR Server

- input the URL to the FHIR service

- use the credential profiled
 

 

Add a "HS.FHIRServer.Interop.HTTPOperation"

Choose the Service Name

Test the FHIR Client

Trace the test result

2
0 627
Question alberto bovo · Nov 4, 2016

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?

I am sorry if the question is a too low knowledge level but I am pretty newbie to Intersystems world.

Alberto

4
0 1687
Question David Marinkovic · May 21, 2024

  

Hi guys,

I need to check my HTTPS POST REQUEST, in order to do this I try to catch it by using wireshark.

I can't see anything because of the encryption.

I try unsuccefully to use the SSLKEYLOGFILE key (windows 11), but the generated file did not increase when I trigger my code OR postman, it grows only by the action of the web browser.

My question is so simple :

1°) How have a clear view of the HTTPS request from IRIS code in wireshark

2°) Why the keylog file did not increase when trigger the code from IRIS ?

0
0 392
Article Nicole Raimundo · May 15, 2024 9m read

DNA Similarity and Classification was developed as a REST API utilizing InterSystems Vector Search technology to investigate genetic similarities and efficiently classify DNA sequences. This is an application that utilizes artificial intelligence techniques, such as machine learning, enhanced by vector search capabilities, to classify genetic families and identify known similar DNAs from an unknown input DNA.

K-mer Analysis: Fundamentals in DNA Sequence Analysis

0
0 275
Question Evgeny Shvarov · Feb 28, 2023

Hi folks!

Researching FHIR bundle transactions.

The idea is that you can post a bundle to a FHIR server with a set of resources. And you can send it as a transaction, so only all the resources will be published or neither.

E.g. I send a bundle of two resources: patient and its observation.

The observation resource should reference an existing patient. But it probably doesn't exist yet on the server and goes within the same bundle. 

For this purpose there is a way to have a temporary id in the bundle, to let resources reference ids.

5
0 476
Question Scott Roth · May 9, 2024

I am trying to create my first call to our Epic FHIR Repository from Health Connect using Samples-FHIRStarter now that I have OAuth2.0 connection tested/working with our Epic Interconnect URL.

When I take a patient example from our Epic environment and test it through Data.BPL.PatientRecordCollector within the Namespace, I keep getting a 404 - File or directory not found 

as it tells me it cannot find the patient. So, I know the connection is being established, I just can't see what is being sent to Epic to see if I could test it through Postman.

0
0 150
Article Vadim Aniskin · May 8, 2024 4m read

The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. While for SOAP based APIs there is a special wizard in InterSystems IRIS that cuts down orchestrations development time, not all APIs used in integrations are SOAP. That's why @Jaime Lerga 

0
0 344
Article Rob Tweed · Apr 30, 2024 3m read

A few weeks ago I posted an announcement about a JavaScript-based interface for our mg_web WebServer interfacing addon module.  mg_web isn't just restricted to use by JavaScript developers though.  Many readers will be ObjectScript developers who are more used to using CSP as their web gateway.  Some may even have much older legacy WebLink-based applications (and be wondering how to support them given that IRIS does not support WebLink).

This article aims to provide some more information on mg_web and to explain why it's worth a look for ObjectScript developers.

0
0 306
Question Igor Barboza · Apr 20, 2024

Hello everyone, I need some help. 

I have to send some events for a government WebService that I already imported the WSDL and XSD's and It worked fine and I'm able to build the message and connect into the service, but It has been rejected with the message that the XML is wrong and the only diference between the Caché SOAP message to all the examples that the government gave us is the header:
   

This is how the Government is expecting the message:

0
0 219