Data Source APIs JDBC Datasource Resource

This service provides methods for listing, creating, downloading, uploading, and removal of JDBC data sources.

Get list of JDBC datasource IDs

get

Get a list of JDBC datasource IDs.

Example Request:

GET pentaho/plugin/data-access/api/datasource/jdbc/connection

cURL Example:

curl -X GET \
  "http://localhost:8080/pentaho/plugin/data-access/api/datasource/jdbc/connection" \
  -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
  -H "Accept: application/json"
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Responses
chevron-right
200

Successfully retrieved the list of JDBC datasource IDs

objectOptional

List of JDBC datasource IDs in XML format

get
/data-access/api/datasource/jdbc/connection

Add or update a JDBC datasource connection

put

Add or update a JDBC datasource connection.

Example Request:

PUT pentaho/plugin/data-access/api/datasource/jdbc/connection/TestDatasource

cURL Example:

curl -X PUT \
  "http://localhost:8080/pentaho/plugin/data-access/api/datasource/jdbc/connection/TestDatasource" \
  -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
  -H "Content-Type: application/json" \
  -d '{
    "changed": true,
    "usingConnectionPool": true,
    "connectSql": "",
    "databaseName": "SampleData",
    "databasePort": "9001",
    "hostname": "localhost",
    "name": "TestDataSourceResource",
    "password": "password",
    "username": "pentaho_user",
    "attributes": {},
    "connectionPoolingProperties": {},
    "extraOptions": {},
    "accessType": "NATIVE",
    "databaseType": {
      "defaultDatabasePort": 9001,
      "extraOptionsHelpUrl": "http://hsqldb.sourceforge.net/doc/guide/ch04.html#N109DA",
      "name": "Hypersonic",
      "shortName": "HYPERSONIC",
      "supportedAccessTypes": ["NATIVE", "ODBC", "JNDI"]
    }
  }'
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Path parameters
connectionIdstringRequired

The ID of the JDBC datasource to add or update

Example: TestDatasource
Body

Database connection configuration

idstringOptional

Unique identifier for the database connection

Example: 00ac4db3-7567-4019-8917-1b6f512ee162
namestringOptional

Name of the database connection

Example: TestDataSourceResource
hostnamestringOptional

Database server hostname

Example: localhost
databaseNamestringOptional

Name of the database

Example: SampleData
databasePortstringOptional

Database server port

Example: 9001
usernamestringOptional

Database username

Example: pentaho_user
passwordstringOptional

Database password (may be encrypted or nullified for security)

Example: password
accessTypestringOptional

Type of database access

Example: NATIVE
accessTypeValuestringOptional

Value for the access type

Example: NATIVE
connectSqlstringOptional

SQL to execute on connection

usingConnectionPoolbooleanOptional

Whether to use connection pooling

Example: true
initialPoolSizeintegerOptional

Initial connection pool size

Example: 0
maximumPoolSizeintegerOptional

Maximum connection pool size

Example: 0
partitionedbooleanOptional

Whether the database is partitioned

Example: false
changedbooleanOptional

Whether the connection has been modified

Example: false
quoteAllFieldsbooleanOptional

Whether to quote all field names

Example: false
streamingResultsbooleanOptional

Whether to use streaming results

Example: false
forcingIdentifiersToLowerCasebooleanOptional

Whether to force identifiers to lowercase

Example: false
forcingIdentifiersToUpperCasebooleanOptional

Whether to force identifiers to uppercase

Example: false
usingDoubleDecimalAsSchemaTableSeparatorbooleanOptional

Whether to use double decimal as schema table separator

Example: false
dataTablespacestringOptional

Data tablespace name

indexTablespacestringOptional

Index tablespace name

informixServernamestringOptional

Informix server name

SQLServerInstancestring · nullableOptional

SQL Server instance name

Responses
put
/data-access/api/datasource/jdbc/connection/{connectionId}

No content

Export a JDBC datasource connection

get

Export a JDBC datasource connection.

Example Request:

GET pentaho/plugin/data-access/api/datasource/jdbc/connection/TestDataSourceResource

cURL Example:

curl -X GET \
  "http://localhost:8080/pentaho/plugin/data-access/api/datasource/jdbc/connection/TestDataSourceResource" \
  -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
  -H "Accept: application/json"
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Path parameters
namestringRequired

The name of the JDBC datasource to retrieve

Example: TestDataSourceResource
Responses
chevron-right
200

Successfully retrieved the JDBC datasource

Database connection configuration

idstringOptional

Unique identifier for the database connection

Example: 00ac4db3-7567-4019-8917-1b6f512ee162
namestringOptional

Name of the database connection

Example: TestDataSourceResource
hostnamestringOptional

Database server hostname

Example: localhost
databaseNamestringOptional

Name of the database

Example: SampleData
databasePortstringOptional

Database server port

Example: 9001
usernamestringOptional

Database username

Example: pentaho_user
passwordstringOptional

Database password (may be encrypted or nullified for security)

Example: password
accessTypestringOptional

Type of database access

Example: NATIVE
accessTypeValuestringOptional

Value for the access type

Example: NATIVE
connectSqlstringOptional

SQL to execute on connection

usingConnectionPoolbooleanOptional

Whether to use connection pooling

Example: true
initialPoolSizeintegerOptional

Initial connection pool size

Example: 0
maximumPoolSizeintegerOptional

Maximum connection pool size

Example: 0
partitionedbooleanOptional

Whether the database is partitioned

Example: false
changedbooleanOptional

Whether the connection has been modified

Example: false
quoteAllFieldsbooleanOptional

Whether to quote all field names

Example: false
streamingResultsbooleanOptional

Whether to use streaming results

Example: false
forcingIdentifiersToLowerCasebooleanOptional

Whether to force identifiers to lowercase

Example: false
forcingIdentifiersToUpperCasebooleanOptional

Whether to force identifiers to uppercase

Example: false
usingDoubleDecimalAsSchemaTableSeparatorbooleanOptional

Whether to use double decimal as schema table separator

Example: false
dataTablespacestringOptional

Data tablespace name

indexTablespacestringOptional

Index tablespace name

informixServernamestringOptional

Informix server name

SQLServerInstancestring · nullableOptional

SQL Server instance name

get
/data-access/api/datasource/jdbc/connection/{name}

Remove JDBC datasource by name

delete

Remove the JDBC data source for a given JDBC name.

Example Request:

DELETE pentaho/plugin/data-access/api/datasource/jdbc/connection/TestDataSourceResource

cURL Example:

curl -X DELETE \
  "http://localhost:8080/pentaho/plugin/data-access/api/datasource/jdbc/connection/TestDataSourceResource" \
  -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Path parameters
namestringRequired

The name of the JDBC datasource to remove

Example: TestDataSourceResource
Responses
delete
/data-access/api/datasource/jdbc/connection/{name}

No content

Last updated

Was this helpful?