Application Properties - cuba-platform/restapi GitHub Wiki
cuba.rest.allowedOrigins
Defines a comma-separated list of origins that can access the REST API.
Default value: *
Used in the Web Client and Web Portal blocks.
cuba.rest.anonymousEnabled
Enables an anonymous access to the REST API endpoints.
Default value: false
Used in the Web Client and Web Portal blocks.
cuba.rest.client.authorizedGrantTypes
Defines a list of supported grant types for the default REST API client. To disable refresh token support remove the refresh_token item from the value.
Default value: password
,external
,refresh_token
Used in the Web Client and Web Portal blocks.
cuba.rest.client.id
Defines an identifier of the REST API client. Client, in this case, is not a platform user, but an application (some web portal or mobile app) that uses REST API. Client credentials are used for basic authentication when accessing the REST API token endpoint.
Default value: client
Used in the Web Client and Web Portal blocks.
cuba.rest.client.secret
Defines a password for the REST API client. Client, in this case, is not a platform user, but an application (some web portal or mobile app) that uses REST API. Client credentials are used for basic authentication when accessing the REST API token endpoint.
Default value: secret
Used in the Web Client and Web Portal blocks.
cuba.rest.client.tokenExpirationTimeSec
Defines a REST API access token expiration timeout for the default client in seconds.
Default value: 43200
(12 hours)
Used in the Web Client and Web Portal blocks.
cuba.rest.client.refreshTokenExpirationTimeSec
Defines a REST API refresh token expiration timeout for the default client in seconds.
Default value: 31536000
(365 days)
Used in the Web Client and Web Portal blocks.
cuba.rest.deleteExpiredTokensCron
Specifies cron expression for scheduled removing of expired tokens from the database.
Default value: 0 0 3 * * ?
Used in the Middleware block.
cuba.rest.jsonTransformationConfig
Additive property defining a file that contains JSON transformation configurations used by the REST API when the client needs data in format of some particular data model version.
The file is loaded using the Resources interface, so it can be located in classpath or in the configuration directory.
The XSD of the file is available at http://schemas.haulmont.com/cuba/7.0/rest-json-transformations.xsd.
Default value: none
Example:
cuba.rest.jsonTransformationConfig = +com/company/sample/json-transformations.xml
Used in the Web Client and Web Portal blocks.
cuba.rest.maxUploadSize
Maximum file size (in bytes) that can be uploaded with the REST API.
Default value: 20971520
(20 Mb)
Used in the Web Client and Web Portal blocks.
cuba.rest.optimisticLockingEnabled
Enables optimistic locking of Versioned entities if the version attribute is provided in JSON.
Default value: false
Used in the Web Client and Web Portal blocks.
cuba.rest.requiresSecurityToken
If true, a special system attribute is included in JSON for loaded entities, and the same attribute is expected to be passed back to REST when saving the entities. See details in Security Constraints for Collection Attributes.
Default value: false
Used in the Web Client and Web Portal blocks.
cuba.rest.reuseRefreshToken
Specifies whether a refresh token may be reused. If set to false then when an access token is requested using the refresh token, a new refresh token will be issued, and the old refresh token will be revoked.
Default value: true
Used in the Web Client and Web Portal blocks.
cuba.rest.servicesConfig
Additive property defining a file that contains a list of services available for application REST API calls.
The file is loaded using the Resources interface, so it can be located in classpath or in the configuration directory.
The XSD of the file is available at http://schemas.haulmont.com/cuba/7.0/rest-services-v2.xsd.
Default value: none
Example:
cuba.rest.servicesConfig = +com/company/sample/app-rest-services.xml
Used in the Web Client and Web Portal blocks.
cuba.rest.storeTokensInDb
Enables storing of REST API security tokens in the database. By default, tokens are stored in memory only.
Stored in the database.
Interface: ServerConfig
Default value: false
Used in the Middleware block.
cuba.rest.tokenMaskingEnabled
Specifies whether REST API token values should be masked in application logs.
Default value: true
Used in the Web Client and Web Portal blocks.
cuba.rest.queriesConfig
Additive property defining a file that contains a list of JPQL queries available for application REST API calls.
The file is loaded using the Resources interface, so it can be located in classpath or in the configuration directory.
The XSD of the file is available at http://schemas.haulmont.com/cuba/7.0/rest-queries.xsd.
Default value: none
Example:
cuba.rest.queriesConfig = +com/company/sample/app-rest-queries.xml
Used in the Web Client and Web Portal blocks.