Question
· Mar 27, 2023
JSON Validation Errors

When using %JSONImport it seems to only report a single error, is there a way to report all the errors with out having to do multiple requests?

{

"errors": [

{

"code": 9406,

"domain": "%ObjectErrors",

"error": "ERROR #9406: Unexpected format for value of field, CurrencyCode, using Update mapping",

"id": "JSONImportError",

"params": [

"CurrencyCode",

"Update"

0 1
0 263

Foreword

InterSystems IRIS versions 2022.2 and newer feature the ability to authenticate to a REST API using JSON web tokens (JWTs). This feature enhances security by limiting where and how often passwords transfer over the network in addition to setting an expiration time on access.

The goal of this article is to serve as a tutorial on how to implement a mock REST API using InterSystems IRIS and lock access to it behind JWTs.

10 0
6 1K
Article
· Mar 7, 2023 3m read
_spec for swagger-ui from spec class

Surely you wanted to use the OpenAPI Specification (OAS) JSON you used for your spec class on the iris-web-swagger-ui iris package. The generated OAS from the ##class(%REST.API).GetWebRESTApplication(...) method is very crude, with no description on the parameters or the expected response structure.

So after creating your REST application from an OAS you should have:

0 0
0 197

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.

0 5
0 145
Article
· Feb 14, 2023 9m read
Generate client SOAP and REST

Hi Community,

I would like to take advantage of our topic on capture for Health Data Warehouses (on DC-FR) to show you how to quickly create HTTP SOAP and REST clients. IRIS, as well as applications available on Open Exchange offers solutions to generate them from a WSDL or a swagger specification.

SOAP client

Nothing could be easier than creating a SOAP client. All you need is the WSDL. A wizard is available from the IRIS Studio. It allows you to generate not only your classes for a web service client but also the “Business Services” and “Business Operations” if you want to consume them with the interoperability framework.

5 4
1 576
Article
· Feb 7, 2023 9m read
OpenAPI Suite - Part 2

Hi Community,

In the first part, we describe all packages, used libraries and REST services.

Now, I would like to add some details about converter and validator services.

By default, OpenAPI-Suite sends an HTTP request to converter.swagger.io if the specification version is less than 3.0 and another HTTP request to validator.swagger.io to simplify the structure of the specification document.

Although the usage of online utilities is convenient, in some cases it could be better to have our own instance of the converter and validator. For example, if OpenAPI-Suite is provided on a server in an organisation for ObjectScript developers, it may be preferable to avoid requests to external services (privacy, avoid request rate limits).

Just run:

docker run -d -p 8085:8080 --name swagger-converter swaggerapi/swagger-converter:latest
docker run -d -p 8086:8080 --name swagger-validator-v2 swaggerapi/swagger-validator-v2:latest

4 2
1 368

Hi Developers!

Suppose you have a persistent class with data and you want to have a simple Angular UI for it to view the data and make CRUD operations.

Recently @Alberto Fuentes described how to build Angular UI for your InterSystems IRIS application using RESTForms2.

In this article, I want to tell you how you can get a simple Angular UI to CRUD and view your InterSystems IRIS class data automatically in less than 5 minutes.

Let's go!

7 3
4 1K
Article
· Aug 14, 2019 9m read
Introducing InterSystems API Manager

As you might have heard, we just introduced the InterSystems API Manager (IAM); a new feature of the InterSystems IRIS Data Platform™, enabling 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.

In this article, I will show you how to set up IAM and highlight some of the many capabilities IAM allows you to leverage.

16 9
12 3.7K

Recently i've been using Restforms2 to create a CRUD API for a project. But it lacks some advanced functionality that we need, so we have created a production with a REST WS which handles those advanced methods. That works great but there's a drawback, it does not have authentication.

I would want to use the same authentication method as Restforms2 which is a basic auth using IRIS users and passwords.

0 4
0 467
Article
· Feb 5, 2023 2m read
COS Url Shortener

Hi Community!

I want to share with you mi first Open Exchange application.

It's a tool to made our developments easier. It's a micro service in a IRIS docker that help us in our new features giving us a way to add short links in our SMS, Email campaigns and for links of the different stores for our apps.

It's very easy to use it.

Simply clone this repo:

https://github.com/daniel-aguilar-garcia/cos-url-shortener.git

1 0
0 270

I have code hier and trying to view diacrit character

Class Test.REST.Services Extends EnsLib.REST.Service
{

Parameter ADAPTER = "EnsLib.HTTP.InboundAdapter";

Parameter EnsServicePrefix = "^TEST";

XData UrlMap
{
<Routes>
<Route Url="/dio/:Resource" Method="GET" Call="getDio" />
</Routes>
}

0 4
0 283

Applications that work with bill payments and receipts, as well as the delivery and inventory of items, generally require the use of barcodes or QR Codes. The latter is used in even broader scenarios since the QR Code can store more information than a simple bar code. Thus, it is important to have the ability to generate barcodes and QR Codes or read the data stored in them from an image or a PDF. This article will show you how to do this using Python and some of its free libraries.

2 1
2 870

Hi Developers,

Enjoy watching the new video on InterSystems Developers YouTube:

Modern(izing) Full Stack Development on InterSystems IRIS @ Global Summit 2022

https://www.youtube.com/embed/wMMRprv_4_4
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

3 2
1 424
Article
· Nov 30, 2022 14m read
Creating FHIR questionnaires

Intersystems IRIS for Health has excellent support for the FHIR industry standard. The main features are:
1. FHIR Server
2. FHIR Database
3. REST and ObjectScript API for CRUD operations on FHIR resources (patient, questionnaire, vaccines, etc.)

This article demonstrates how to use each of these features, as well as presenting an angular frontend for creating and viewing Quiz-like FHIR resources.

6 0
1 811

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

When using the REST API classes for building services on a spec-first approach, the implementation class methods are usually built this format:

ClassMethod <method-name>(body As %DynamicObject) As %Stream.Object

But sometimes it keeps building the endpoint implementation method like this:

ClassMethod <method-name>(body As %Stream.Object) As %DynamicObject

It has been a problem because the rest of my implementation rely on the fact that the "body" object is a DynamicObject.

0 4
0 388