Generic REST
Jmix provides a generic REST API that allows you to work with data model entities and business services without writing REST controllers on the backend. It automatically exposes endpoints for the following functionality:
-
CRUD operations on entities.
-
Calling of registered service methods.
-
Execution of predefined JPQL queries.
-
Uploading and downloading files.
-
Returning information about the data model.
-
Returning information about the current user and their permissions.
You can explore the generic REST endpoints using the Swagger UI page at https://docs.jmix.io/openapi/1.2/ |
REST API uses the OAuth2 protocol for authentication and supports anonymous access. All REST API endpoints respect data access constraints imposed by security.
Installation
Generic REST API is shipped as an optional add-on. To install it automatically through Jmix Marketplace, follow instructions in the Add-ons section.
For manual installation, add the following dependencies to your build.gradle
:
implementation 'io.jmix.rest:jmix-rest-starter'
implementation 'io.jmix.security:jmix-security-oauth2-starter'