Skip to main content

Configuration Parameters

Sl#Parameter NameDescriptionAllowed Values/Examples
1.ALLOW_SAFE_DELETEAllow deletion of table rows without a filter criteria.
  • true(default)
  • false
2.DB_IDLogical Identifier of the database to be used in API URL. This is not the name of the database.
  • db(default)
3.DB_URLDatabase connection URL in JDBC format.
  • jdbc:mysql://DB_SERVER_HOST:DB_PORT/DB_NAME (MySQL)
  • jdbc:postgresql://DB_SERVER_HOST:DB_PORT/DB_NAME (PostgreSQL)
4.DB_USERDatabase user name-
5.DB_PASSWORDDatabase password-
6.SERVER_PORTWebserver PORT
  • 8080(default)
7.GZIP_ENABLEDWhether response compression is enabled
  • true
  • false (default)
8.GZIP_MIN_RESPONSE_SIZEMinimum "Content-Length" value in KB that is required for compression to be performed.
  • 1024(default)
9.ENABLE_DATETIME_FORMATTINGWhether to enable date time formatting in response.
  • false(default)
  • true
10.TIME_FORMATTime format
  • HH:mm:ss(default)
11.DATE_FORMATDate format
  • yyyy-MM-dd(default)
12.DATE_TIME_FORMATDate time format
  • yyyy-MM-dd HH:mm:ss(default)
13.ENABLE_AUTHEnable authentication and authorization
  • false(default)
  • true
14.AUTH_DATA_SOURCEProvide the absolute path of the auth data as a file.-
15.DEFAULT_FETCH_LIMITLimits the number of rows that will be retrieved for a read query.100
tip

If DB2Rest is connected to multiple databases do not use configurations 2-5. Follow the guide for connecting to multiple databases.

info

Date time format parameter is only applicable for output / response.

warning

In case request attributes, only ISO data-time formats are supported.