DB HTTP connector
General description
DB HTTP connector provides an API for accessing SQL databases. It is intended to be used by the Integrations mechanism in SentiOne Automate. Such integration can be executed as part of handling the user's message in Flow.
Supported database engines
Only Oracle DB is officially supported, but the application also contains the driver for PostgreSQL.
API
Default port: 5784
This service contains the API definition in OpenAPI Specification format and hosts Swagger UI on its root path.
There are default endpoints for monitoring purposes. They are described in Components monitoring section.
Communication
This service communicates only with databases defined in config.
It should be visible to the Admin panel and Dialogs services in order to be usable from the Integrations mechanism.
Security
Please note there are no additional security options on this module. Please be cautious when enabling this component, so there is no public exposure of source database!
Configuration
Application's config
chatbots.db-http-connector {
db-connections: [
{
name: "example1"
url: "jdbc:oracle:thin:@oracle-db:1521/FREEPDB1",
user: "username",
password: "password"
},
{
name: "example2"
url: "jdbc:postgresql://db:5432/example",
user: "username",
password: "password",
connection-pool {
minimum-idle: 100
maximum-pool-size: 10
max-lifetime: 100
connection-timeout: 250
idle-timeout: 100
keepalive-time: 100
auto-commit: true
}
}
]
}
Usage
To configure using this module in Automate please add integration to address http://db-http-connector:5784 and add POST method "query" like in screenshot below:
Endpoint /query accepts a request in JSON format with two keys:
- query - SQL query directly applied to the database
- dbConnection - database name defined in the configuration file in the "name" field
Job execution
None
Troubleshooting
Updated 12 months ago