Configuration

Jmix REST properties allow you to configure different aspects of the behavior of the generic REST endpoints.

Entities API

jmix.rest.defaultMaxFetchSize

Defines the default maximum amount of entity instances that are returned by the API.

Default value: 10000

jmix.rest.entityMaxFetchSize

Defines the default maximum amount of entity instances that are returned by the API for a particular entity.

The following example configures the entityMaxFetchSize value for two entities. For all other entites the value from jmix.rest.defaultMaxFetchSize is taken into consideration.

jmix.rest.entityMaxFetchSize.sample_Product = 500
jmix.rest.entityMaxFetchSize.sample_Customer = 1000

jmix.rest.jsonTransformationConfig

Property defining a file that contains a list of JSON transformations configurations used by the REST API when the client needs data in the format of some particular data model version.

The file is loaded using the Resources interface, so it can be located in the classpath or the configuration directory.

Default value: none

jmix.rest.maxUploadSize

Maximum file size (in bytes) that can be uploaded with the REST API.

The file is loaded using the Resources interface, so it can be located in the classpath or the configuration directory.

Default value: 20971520 (20 Mb)

jmix.rest.optimisticLockingEnabled

Enables optimistic locking of entities with optimistic locking if the version attribute is provided in JSON.

Default value: false

jmix.rest.queriesConfig

Property defining a file that contains a list of JPQL queries available for application calls.

The file is loaded using the Resources interface, so it can be located in the classpath or the configuration directory.

Default value: none

jmix.rest.responseFetchPlanEnabled

If set to true, the responseFetchPlan parameter with the fetch plan name can be passed in the create and update requests. In this case, the created/updated entity is reloaded with the specified fetch plan and returned as part of the response JSON.

If set to false, the response contains JSON with a minimal representation of the created/updated entity.

Default value: true