Including in a Project

REST API is included as a dependency to the web and portal modules of the cuba application component.

For the web module the REST API functions will be available by default at the {host:port}/app/dispatch/api URL.

To create the portal module in your application project, open the project in CUBA Studio and click the Create portal module link on the Project properties navigator panel. After that, the REST API functions will be available at the {host:port}/app-portal/api URL.

REST API controllers are registered in the Spring context defined by the dispatcher-spring.xml file of of the corresponding module (portal-dispatcher-spring.xml or web-dispatcher-spring.xml):

<context:component-scan base-package="com.haulmont.cuba.restapi"/>