GuidesRecipesAPI ReferenceChangelogDiscussions
Log In

JDBC Database


To submit a job request, send input items, a model identifier, and a version number.

Modzy can run data stored in JDBC databases. Input items stored in an S3 bucket may include one data file or a directory with multiple data files.

Sample request

POST /api/jobs HTTP/1.1
Authorization: ApiKey apikey.modzy
Content-Type: application/json
Accept: application/json

   "identifier": "ed542963de",
   "version": "0.0.27"
 "explain": true,
 "input": {
    "type": "jdbc",
    "url": "jdbc:postgresql://",
    "username": "user",
    "password": "password",
    "driver": "org.postgresql.Driver",
    "query":"select description as \"input.txt\" from models.model"

Sample response

  "model": {
    "identifier": "ed542963de",
    "version": "0.0.27",
    "name": "Sentiment Analysis"
  "status": "SUBMITTED",
  "totalInputs": 1,
  "jobIdentifier": "2700725a-9c84-40ae-bbeb-4fce0d35424e",
  "accessKey": "apikey",
  "explain": true,
  "jobType": "batch",
  "accountIdentifier": "demo-account",
  "team": {
    "identifier": "demo-team"
  "user": {
    "identifier": "demo-user-id",
    "firstName": "demo",
    "lastName": "user",
    "email": "[email protected]"
    "identifier": ["row1-1"]
  "submittedAt": "2021-02-02T21:19:52.529+00:00",
  "hoursDeleteInput": 1,
  "imageClassificationModel": false

Request body parameters for JDBC

model (required)objectAn object that contains the model parameters modelID and modelVersion.
input (required)objectContains the that contains the input parameters.
explainstringSets the explainability feature when a model offers the option.
timeoutstringA timeout in milliseconds for the job’s status to transition to TIMEDOUT. The job doesn’t timeout if this value is not provided.

input object

type (required)stringThe input type to be processed. Use jdbc.
url (required)stringThe URL to connect to the database.
username (required)stringThe username to access the database.
password (required)stringThe password to access the database.
driver (required)stringThe JDBC driver to connect to the database.
query (required)stringThe SQL query to use to get the input item.

For additional information see Jobs.