Skip to main content

APIs Reference

Common aspects reference guide for Backend APIs - GraphQL and REST APIs.

Purpose

Backend APIs - GraphQL and REST APIs are Spring Java projects and share a common framework and mechanism.

Please find information on those common aspects pertaining to:

  • Support matrix and versions information for languages, tools & technologies, databases, etc.
  • Database Deployment support matrix, databases, versions, etc.

APIs Features Reference

Common aspects pertaining to APIs features reference guide for Backend APIs - GraphQL and REST APIs.

Feature support

Please refer to list at Backend Features

Backend APIs Deployment - Support Matrix

This page mentions version compatibilities for our support matrix.

API Development Framework, Language

  • Spring Boot 2.7.3 with Java 8 (JDK 8)
  • Spring Boot 3.2.3 with Java 17 (or Java 21)

Databases

Databases supported for runtime deployment are Oracle, MySQL, MariaDB, PostgreSQL, MS SQL Server, Azure SQL, Snowflake, (DB2, H2, HSQLDB).

Please also see compatible-databases list.

Please contact us for help on any suported databases, for which details are not provided.

Database Drivers and Supported Database Versions

Below are provisions in pom.xml. Some old database versions and drivers will also work. Try them out if needed or contact us.

DatabaseJDBC DriverDatabase Versions
Oracleojdbc8.jarOracle 21c, 19c, 18c, and 12.2
MS SQL Server10.2.1.jre8SQL Server 2019 (2017, 2016, 2014, 2012)
Azure SQL10.2.1.jre8Azure SQL
PostgreSQL42.5.1PostgreSQL 8.2 or newer
MySQL Newer Ver8.0.31MySQL Server 8.0, 5.7 and 5.6
MySQL5.1.49MySQL Server ver 5.0, 5.5
Snowflake3.13.32for *.snowflakecomputing.com

Connecting Databases

Connection examples of providing spring.datasource parameters such as URL, etc as per db type :

  • Please refer to application.properties file. Uncomment parameters for the database you want to use.
# mysql
# -----------------------------------------------------------------
#spring.datasource.url=jdbc:mysql://localhost:3306/DBNAME?useUnicode=true&characterEncoding=utf8
#spring.datasource.username=user
#spring.datasource.password=pwd
#spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
#spring.datasource.driverClassName=com.mysql.jdbc.Driver

#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
#spring.jpa.hibernate.ddl-auto=update
# -----------------------------------------------------------------

...

# mssql Azure SQL
# -----------------------------------------------------------------
# Use with Azure Cloud Shell or Azure CLI
#spring.datasource.url=jdbc:sqlserver://${AZ_DATABASE_NAME}.database.windows.net:1433;database=EMDB;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
#spring.datasource.username=spring@${AZ_DATABASE_NAME}
#spring.datasource.password=${AZ_SQL_SERVER_PASSWORD}

#spring.jpa.hibernate.ddl-auto=update
# -----------------------------------------------------------------

Connecting Databases examples

Connection examples of providing URL as per db type :

  • Oracle (oracle)
spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:XE
  • MS SQL Server (mssql)
spring.datasource.url=jdbc:sqlserver://127.0.0.1:1433;databaseName=EMDB;encrypt=true;trustServerCertificate=true;
  • Azure SQL (mssql)
spring.datasource.url=jdbc:sqlserver://${AZ_DATABASE_NAME}.database.windows.net:1433;database=EMDB;encrypt=true;
  • PostgreSQL (psql)
spring.datasource.url=jdbc:postgresql://localhost:5432/emdb?useUnicode=true&characterEncoding=utf8

Using Amazon RDS | AWS RDS , e.g. :

spring.datasource.url=jdbc:postgresql://<db.client_id>.us-west-1.rds.amazonaws.com:5432/<db_name>?useUnicode=true&characterEncoding=utf8
  • MySQL (mysql)
spring.datasource.url=jdbc:mysql://localhost:3306/DBNAME?useUnicode=true&characterEncoding=utf8

Please Also provide datbase user and password.

spring.datasource.username=
spring.datasource.password=
tip

Below parameters, if skipped, are set to defaults for driver, and should not pose any issues.

#spring.datasource.driverClassName=
#spring.jpa.properties.hibernate.dialect=

Help on Setting-Up Databases

MS SQL Server 2019 Express (mssql)

Azure SQL (mssql)

Snowflake

For generating code for snowflake:

  • Please note, you can create snowflake tables temporarily in postgresql db and use them to import in Studio Builder and generate code.

For using snowflake during runtime, use below steps.

  • Add dependency to pom.xml
        <dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
<version>3.13.32</version>
</dependency>
  • Setup application.properties as:
# snowflake
# -----------------------------------------------------------------
spring.datasource.url=jdbc:snowflake://<account>.snowflakecomputing.com/?warehouse=<warehouse_name>&db=<db_name>&schema=<schema_name>&CLIENT_RESULT_COLUMN_CASE_INSENSITIVE=true&CLIENT_TIMESTAMP_TYPE_MAPPING=TIMESTAMP_NTZ&JDBC_TREAT_DECIMAL_AS_INT=false
spring.datasource.username=
spring.datasource.password=
spring.datasource.driverClassName=net.snowflake.client.jdbc.SnowflakeDriver

spring.jpa.properties.hibernate.dialect=emrest.spring.EmptyDialect

Note: The EmptyDialect needs to be added in source. Create a java source file EmptyDialect.java in src/ folder, with below content:

package emrest.spring;
public class EmptyDialect extends org.hibernate.dialect.Dialect {}

Compatible Databases

Compatible Databases: Below Postgres or other compatible databases should be able to be used for Import and runtime deployment:

Databases