REST Server

We can expose applications on Code2 as services in a few minutes.

Go to REST Servers (under Business on menu) and click on button.

We will create REST web service with name and web service link icbService.

Now that service is created we need to add its methods. Go to Methods of icbService and click on button.

Let's expose our query for city table. Select both with and without session in access control so that even if request doesn't have session it can still get response. It will be kind of public web service.

Now, insert method parameters from source object (query) by clicking on button.

Insert city_name and country and then reload cache.

Reload cache after you make changes to REST Client/Server.

That's it, we exposed our query for city table as service. To see service definition and properties click on caption under icbService id which is 1094 in this project.

Long string between rest and service name in the link is project id. So to test cities method of service icbService open this link: In this case, the link is

Two records in city table are sent as response:

Let's expose a form as well. You can create new city record by sending POST request.

Using Postman let's add city Paris with country value 2 which is value of France in lkp_country static lookup.

Open preview of page City and you will see new record Paris, France.