Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Create Connection

POST/api/v2/connectivity/connections
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.

Creates a new Connection with a direct connection runtime.

Any secrets specified in the request body are transmitted over the network encrypted using TLS. Once the secrets reach Foundry's servers, they will be temporarily decrypted and remain in plaintext in memory to be processed as needed. They will stay in plaintext in memory until the garbage collection process cleans up the memory. The secrets are always stored encrypted on our servers. By using this endpoint, you acknowledge and accept any potential risks associated with the temporary in-memory handling of secrets. If you do not want your secrets to be temporarily decrypted, you should use the Foundry UI instead.

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

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

CreateConnectionRequest
object
Hide child attributes

Hide child attributes

parentFolderRid
string

The unique resource identifier (RID) of a Folder.

configuration
union
Show child attributes

Show child attributes

displayName
string

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

worker
union

The worker of a Connection, which defines where compute for capabilities are run.

Show child attributes

Show child attributes

Response body

Connection
object

The created Connection

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

worker
union

The worker of a Connection, which defines where compute for capabilities are run.

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/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/connectivity/connections?preview=true" \ -d '{"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"}'

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
ConnectionTypeNotSupportedError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe specified connection is not yet supported in the Platform API.
ParametersconnectionType
PropertyCannotBeBlankError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe specified property cannot be blank.
ParameterspropertyName
ParentFolderNotFoundForConnectionError CodeNOT_FOUND
Status Code404
DescriptionThe parent folder for the specified connection could not be found.
ParametersconnectionRid
UnknownWorkerCannotBeUsedForCreatingOrUpdatingConnectionsError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe UnknownWorker cannot be used for creating or updating connections. Please use the Foundry worker instead.
Parameters
CreateConnectionPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not create the Connection.
Parameters
FolderNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Folder could not be found.
ParametersfolderRid