Skip to main content

The %CSP.REST Class

The %CSP.REST Class

The %CSP.RESTOpens in a new tab class, which is a subclass of %CSP.PageOpens in a new tab allows you to implement REST services. It provides the ability to:

  • Define URL maps that specify the Caché method that is executed for a REST URL and HTTP method.

  • Specify whether each REST call is executed under its own CSP session or shares a single session with other REST calls.

  • Optionally, override error handling methods.

To implement a REST service, you extend the %CSP.RESTOpens in a new tab class. Your extension of the class provides the URLMap, can optionally set the UseSession parameter, and provides class methods to perform the REST operations. You can define more than one subclass of %CSP.RESTOpens in a new tab in a namespace. Each subclass that has its own entry point must have its own CSP web application. You define the CSP web application and specify its security in the Web Application page (click System Administration > Security > Applications > Web Applications). When you define the CSP web application, you set the Dispatch Class to the name of the custom subclass of %CSP.RESTOpens in a new tab and specify the first part of the URL for the REST call as the name of the application.

FeedbackOpens in a new tab