Create a connection
/api/20210901/catalog/connections
Request
There are no request parameters for this operation.
- application/json
objectResponse
- application/json
200 Response
object-
connectionId(required): string
The ID of the connection with Base64 encoding. To be used as a parameter when retrieving details, verifying, modifying or deleting this connection.
400 Response
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
401 Response
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
403 Response
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
409 Response
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
500 Response
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
Examples
These examples show you how to create a connection to Oracle Autonomous AI Lakehouse from your Oracle Analytics instance.
- Example 1 - Create a wallet-less (TLS) connection to Oracle Autonomous AI Lakehouse
- Example 2 - Create a connection to Oracle Autonomous AI Lakehouse that uses a
credentials wallet file
cwallet.sso(Mutual TLS)
Note:
The JSON payload described in this topic is specific to Oracle Autonomous AI Lakehouse. The JSON payload format is different for other data sources. See Sample JSON Payloads for Supported Data Sources.
Example 1 Create a wallet-less (TLS) connection to Oracle Autonomous AI Lakehouse
In this example, you create a connection named
oracle_ailakehouse_walletless. The request includes a simple JSON body
(application/json). You can also designate a catalog folder to create
your connection inside of with the filePath parameter.
cURL Example
create_ailakehouse_walletless_connection.json that contains a payload
that looks like
this.{
"version": "2.0.0",
"type": "connection",
"name": "oracle_ailakehouse_walletless",
"description": "Sample Oracle Autonomous AI Lakehouse connection without a wallet created using Connections API",
"content": {
"connectionParams": {
"connectionType": "oracle-autonomous-data-warehouse",
"connectionString": "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=abcdefg1hijkl2m_adwwalletless_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))",
"folderPath": "users/admin/Connections",
"username": "ADMIN",
"password": "<<password>>",
"systemConnection": false,
"remoteData": false,
"sslType": "ServerSideSSL"
}
}
}
Then run the cURL command calling the JSON file (for example,
create_ailakehouse_walletless_connection.json):
curl -i \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --request POST 'https://<hostname>/api/20210901/catalog/connections' \ --data @create_ailakehouse_walletless_connection.json
Example of Response Header
Not applicable.
Example of Response Body
Make a note of the Base64URL encoded connectionId in the response body.
Later on, you can use this value to update or delete this connection.
{"connectionID":"J2FkbWluJy4nb3JhY2xlX2FpbGFrZWhvdXNlX3dhbGxldGxlc3Mn"}
Example 2 Create a connection to Oracle Autonomous AI Lakehouse that uses a wallet file (Mutual TLS)
In this example, you create a connection named
oracle_ailakehouse_with_wallet. The request body includes
multipart/form-data, that is, requires both a wallet file
cwallet.sso and Oracle Autonomous AI Lakehouse connection parameters.
cURL Example
Obtain the credentials wallet file from Oracle Autonomous AI Lakehouse. See Download Client Credentials (Wallets).
{
"version": "2.0.0",
"type": "connection",
"name": "oracle_ailakehouse_with_wallet",
"description":
"Sample Oracle Autonomous AI Lakehouse connection with a wallet created using Connections API",
"content": {
"connectionParams": {
"connectionType": "oracle-autonomous-data-warehouse",
"connectionString": "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps) (port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=abcdefg1hijkl2m_walletadw_high.adwc.oraclecloud.com/))(security=(ssl_server_dn_match=yes)))",
"username": "ADMIN",
"password": "<<password>>",
"remoteData": "false",
"systemConnection": false,
"sslType": "ClientSideSSL"
}
}
}Run the cURL command including the wallet file (cwallet.sso) and the
connection properties.
curl -i \
--header 'Authorization: Bearer <token>' \
--request POST 'https://<hostname>/api/20210901/catalog/connections' \
--form 'cert=@"/Users/scott/Downloads/Wallet_ailakehouse/cwallet.sso"' \
--form 'connectionParams= "{ \
"version": "2.0.0", \
"type": "connection", \
"name": "oracle_ailakehouse_with_wallet", \
"description": \
"Sample Oracle Autonomous AI Lakehouse connection with a wallet created using Connections API", \
"content": { \
"connectionParams": { \
"connectionType": "oracle-autonomous-data-warehouse",\
"connectionString": "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps) (port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=abcdefg1hijkl2m_walletadw_high.adwc.oraclecloud.com/))(security=(ssl_server_dn_match=yes)))", \
"username": "ADMIN", \
"password": "<<password>>", \
"remoteData": "false", \
"systemConnection": false, \
"sslType": "ClientSideSSL" \
}
}
}'
Example of Response Header
Not applicable.
Example of Response Body
Make a note of the Base64URL encoded connectionId in the response body.
Later on, you can use this value to update or delete this connection.
{"connectionID":"J2FkbWluJy4nb3JhY2xlX2FpbGFrZWhvdXNlX3dpdGhfd2FsbGV0Jw=="}