-
Notifications
You must be signed in to change notification settings - Fork 7
Application Properties
Defines a comma-separated list of origins that can access the REST API.
Default value: *
Used in the Web Client and Web Portal blocks.
Enables an anonymous access to the REST API endpoints.
Default value: false
Used in the Web Client and Web Portal blocks.
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.
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.
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.
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.
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.
Specifies cron expression for scheduled removing of expired tokens from the database.
Default value: 0 0 3 * * ?
Used in the Middleware block.
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.
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.
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.
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.
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.
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.
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.
Specifies whether REST API token values should be masked in application logs.
Default value: true
Used in the Web Client and Web Portal blocks.
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.
- Home
- Predefined JPQL Queries Configuration
- Services Configuration
- Data Model Versioning
- CORS Settings
- Anonymous Access
- Other REST API Settings
- Creating Custom OAuth2 Protected Controllers
- Security Constraints for Collection Attributes
- Persistent Token Store
- Project-specific Swagger Documentation
- Application Properties
-
Using REST API
- Getting an OAuth Token
- REST API Authentication with LDAP
- Custom Authentication
- Getting an Entity Instances List
- New Entity Instance Creation
- Existing Entity Instance Update
- Executing a JPQL Query (GET)
- Executing a JPQL Query (POST)
- Service Method Invocation (GET)
- Service Method Invocation (POST)
- Files Downloading
- Files Uploading
- JavaScript Usage Example
- Getting Localized Messages
- Data Model Versioning Example
- Using Entities Search Filter