Home Applications workshop-rest-ws

workshop-rest-ws

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
1 reviews
0
Awards
233
Views
0
IPM installs
1
0
Details
Releases (1)
Reviews (1)
Issues
Articles (3)
Creation of REST web service for training purposes

What's new in this version

Initial Release

workshop-rest-ws

Example about a REST web service defined in IRIS and working with a production.

You can find more in-depth information in https://learning.intersystems.com.

New to IRIS Interoperability framework? Have a look at IRIS Interoperability Intro Workshop.

What do you need to install?

Setup

Build the image that we are going to use during the workshop:

$ git clone https://github.com/intersystems-ib/workshop-rest-ws
$ cd workshop-rest-ws
$ docker-compose build

Example

The main purpose of this example is to create a REST service to save and get an object “Person” using REST call from Postman.

Test Production

  • Run the containers we will use in the workshop:
docker-compose up -d

Automatically an IRIS instance will be deployed and a production will be configured and started to save and retrieve Person objects.

  • Open the Management Portal.
  • Login using the default superuser/ SYS account.
  • Click on Test Production to access the sample production that we are going to use. You can access also through Interoperability > User > Configure > Production.
    • You will notice that there are two Business Service configured (one to save a Person object and the other to get a Person by the PersonId property).
    • There are two Business Operations too, one to retrieve the Person specified by the id provided from Postman and the other one to save the Person object with the JSON object sent from Postman too.
  • Now open Web Applications option from System Administration > Security > Applications > Web Applications..
    • You will see all the default web applicationa and a new one, /csp/rest/wstest. This new web application is configured as REST with the Dispatch class WSTEST.Endpoint.
  • Open your Postman and import WSTest.postman_collection file. With this configuration you will be able to test both functionalities without any problem.
Made with
Version
1.0.016 Jun, 2023
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for HealthHealthShare
First published
16 Jun, 2023
Last checked by moderator
27 Jun, 2023Works