Skip to content

An example of a REST web service implemented with ObjectScript that demonstrates a number of development best practices.

License

Notifications You must be signed in to change notification settings

intersystems/rest-and-relaxation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

REST & Relaxation

By Michael Smart

Description: An example of a REST web service implemented with ObjectScript that demonstrates a number of development best practices. This is the companion to a live webinar presented by InterSystems Learning Services on December 7, 2017.

Requirements: 2016.2 or higher.

To install:

  1. Create the CSP application /rnr for the desired namespace.
  2. Set the Dispatch Class option for /rnr to RNR.Service.
  3. Load the files in the RestAndRelaxation directory to a new project using Atelier.
  4. Compile the new project in Atelier.

Instructions:

You can consult the URLMap in the RNR.Travel.BestPractices class to see which resources are available. Here are a few examples you can try with your favorite REST testing utility.

  • To retrieve a list of travel reservations, make a GET request to http://<server>:<port>/rnr/travel/reservations.

  • To add a new travel reservation, send a POST request to http://<server>:<port>/rnr/travel/reservation using the following JSON as an example for the request body:

{
    "customer": "Michael",
    "startLocation": "Boston",
    "destination": "London",
    "startDate": "2018-02-01",
    "endDate": "2018-02-10"
}

Enjoy!

— MS

About

An example of a REST web service implemented with ObjectScript that demonstrates a number of development best practices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages