Configuration
REST Interfaces
In order for data to be accessible via REST, a REST interface needs to be explicitly declared in the service configuration files (douidefinition.xml).
The following snippet shows a suggestion of how this configuration could be made.
Definition of the REST Interface
According to the code presented above, two REST interfaces called list and news have been created. Filters, as well as item count and sorting settings, can also be declared in this structure. It is important to note that the rules and resources for creating sources in service interfaces are available when creating REST interfaces.
Service Instance Configuration
In order for a service instance not to need to be referenced by its ID, a ‘short’ name was created for service instances called REST Name. This name is unique and will be part of the URL as shown in Reading REST Interface
Once a REST Interface is configured in the service, by default all service instances will allow access to this data source. However, to allow access, it is necessary to enable REST access in each service instance as explained in REST Support in the service instance properties editing.
Configuration of lumisPrincipal Type Fields
By default, values of fields of type lumisPrincipal
will not be returned by the REST interfaces. To enable values of fields of this type to be returned, it is necessary to configure the property bag lumis.doui.service.rest.principalFields.