Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Upload Custom Jdbc Drivers Connection

POST/api/v2/connectivity/connections/{connectionRid}/uploadCustomJdbcDrivers
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Upload custom jdbc drivers to an existing JDBC connection. The body of the request must contain the binary content of the file and the Content-Type header must be application/octet-stream.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:connectivity-connection-write.

Path parameters

connectionRid
string

The Resource Identifier (RID) of a Connection (also known as a source).

Query parameters

fileName
string

The file name of the uploaded JDBC driver. Must end with .jar

preview
boolean
optional

Enables the use of preview functionality.

Request body

body
string

Response body

Connection
object
Hide child attributes

Hide child attributes

rid
string

The Resource Identifier (RID) of a Connection (also known as a source).

parentFolderRid
string

The unique resource identifier (RID) of a Folder.

displayName
string

The display name of the Connection. The display name must not be blank.

exportSettings
object
Show child attributes

Show child attributes

configuration
union
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/octet-stream" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/connectivity/connections/ri.magritte..source.c078b71b-92f9-41b6-b0df-3760f411120b/uploadCustomJdbcDrivers?fileName=cdata.jdbc.oracle.jar&preview=true" \ --data-binary '@/path/to/file'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 { "parentFolderRid": "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791", "configuration": { "type": "jdbc", "url": "jdbc:postgresql://localhost:5432/test", "driverClass": "org.postgresql.Driver" }, "displayName": "Connection to my external system", "exportSettings": { "exportsEnabled": true, "exportEnabledWithoutMarkingsValidation": false }, "rid": "ri.magritte..source.c078b71b-92f9-41b6-b0df-3760f411120b" }

Error responses

Error Name
UploadCustomJdbcDriversConnectionPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not uploadCustomJdbcDrivers the Connection.
ParametersconnectionRid
ConnectionNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Connection could not be found.
ParametersconnectionRid