Working version 25.11 25.08 25.05 25.02 24.11 23.11 Cloud Enterprise
Working version 25.11 25.08 25.05 25.02 24.11 23.11 Cloud Enterprise

Model Services - REST

In this lesson, you will learn about Model Services.  This is the automatic REST interface to the business model. First read about the details of how to make requests to Model Services, then we will do some activities.

Model Services Syntax

The page Model services was not found -- Please check/update the page name used in the MultiExcerpt-Include macro

Try it out

Let's start by looking at the Open API documentation for Model Services. Navigate to http://localhost:7080/training/openAPI.html. You should get a response something like...

image2020-5-20_13-58-32.png

If we expand the GET /Person section, we will see that get supports the following querystring parameters.

image2020-5-20_13-59-55.png

At the top of the parameters section, press the  image2020-5-20_16-11-13.png button.

In the attributes textbox, enter (firstName lastName (addrs city state zip)) and in the count textbox enter 3.

image2020-5-20_16-14-50.png

image2020-5-20_16-15-15.png

Then press the blue Execute button at the bottom of the parameters section. That will execute the request against the server and return the result in the Response body section.

image2020-5-20_16-18-11.png

The request URL is http://localhost:7080/training/json/Person?attributes=(firstName%20lastName%20(addrs%20city%20state%20zip))&count=3.

Try out some of the other get parameters in your browser i.e. attributes, where, orderBy, count, and offset.  You will also want to put &$indent in the URL as well so your output is more readable.

You can try out some of the other methods (POST, DELETE, PUT) by installing Postman and trying it out.