Update a connection
/api/20210901/catalog/connections/{connectionId}
Request
-
connectionId(required): string(byte)
The ID of the connection with Base64 encoding. For example, if your connection has the object ID 'user'.'connId', enter the Base64 encoded value, J3VzZXInLidjb25uSWQn
- application/json
objectResponse
200 Response
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.
404 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 update connection parameters for an existing connection to Oracle Autonomous AI Lakehouse.
- Example 1 - Update a wallet-less (TLS) connection to Oracle Autonomous AI Lakehouse
- Example 2 - Update a connection to Oracle Autonomous AI Lakehouse that uses a credentials wallet file (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 Update a wallet-less (TLS) connection to Autonomous AI Lakehouse
In this example, you modify the username and password for an existing
connection to Oracle Autonomous AI Lakehouse called
oracle_ailakehouse_walletless. The object ID of the connection is
'admin'.'oracle_ailakehouse_walletless', which has the Base64URL encoded
connectionId value
J2FkbWluJy4nb3JhY2xlX2FpbGFrZWhvdXNlX3dhbGxldGxlc3Mn. The request
includes a simple JSON body (application/json).
cURL Example
First, determine the connectionId of the connection you want to update.
When you create a connection, the connectionId is returned in the response
body. If you didn't make a note of this, you can obtain the Object ID of the
connection you want to update and Base64URL encode this value to determine the
connectionId. To obtain the Object ID, navigate to the Inspect
Connection dialog in Oracle Analytics Cloud.
"remoteData": True if you're using remote data connectivity. For example,
if you want to update the username and password, the
payload looks like this.
{
"version": "2.0.0",
"type": "connection",
"name": "myConnection",
"content": {
"connectionParams": {
"username": "NEWADMIN",
"password": "<<updated-password>>",
"filePath": "users/admin/ConnectionsNew",
"remoteData": True
}
}
}Run the cURL command with the JSON payload.
curl -i \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--request PUT 'https://<hostname>/api/20210901/catalog/connections/J2FkbWluJy4nb3JhY2xlX2FpbGFrZWhvdXNlX3dhbGxldGxlc3Mn' \
--data "{ \
"version": "2.0.0", \
"type": "connection", \
"name": "myConnection", \
"content": { \
"connectionParams": { \
"username": "NEWADMIN", \
"password": "<<updated-password>>", \
"filePath": "users/admin/ConnectionsNew", \
"remoteData": True \
}
}
}"
Example of Response Header
Not applicable.
Example of Response Body
If successful, the response body returns the 200 response code. For
example:
Status 200
Example 2 Update a connection to Autonomous AI Lakehouse that uses a wallet file (Mutual TLS)
In this example, you update a connection named
oracle_ailakehouse_with_wallet with the object ID
'admin'.'oracle_ailakehouse_with_wallet'. The request body for this
connection type can include multipart/form-data. You update the wallet file
updated-cwallet.sso and you also modify the username and
password parameters for the connection.
cURL Example
Obtain the updated credentials wallet file from Oracle Autonomous AI Lakehouse. See Download Client Credentials (Wallets).
Base64URL encode the connection's object ID value to determine the
connectionId. In this example, the connectionId is:
J2FkbWluJy4nb3JhY2xlX2FpbGFrZWhvdXNlX3dpdGhfd2FsbGV0Jw==
"remoteData": True if you're using remote data connectivity. If you
want to update username and password, the payload looks
like this.
{
"version": "2.0.0",
"type": "connection",
"name": "myConnection",
"content": {
"connectionParams": {
"username": "NEWADMIN",
"password": "<<<updated-password>>>>",
"remoteData": True
}
}
}Run the cURL command including the updated wallet file
(updated-cwallet.sso) and the connection properties you want to
update.
curl -i \
--header 'Authorization: Bearer <token>' \
--request PUT 'https://<hostname>/api/20210901/catalog/connections/J2FkbWluJy4nb3JhY2xlX2FpbGFrZWhvdXNlX3dpdGhfd2FsbGV0Jw==' \
--form 'cert=@"/Users/admin/Downloads/Wallet_ailakehouse/updated-cwallet.sso"' \
--form 'connectionParams="{ \
"version": "2.0.0", \
"type": "connection", \
"name": "myConnection", \
"content": { \
"connectionParams": { \
"username": "NEWADMIN", \
"password": "<<<<password>>>>", \
"remoteData": True \
} \
}"'
Example of Response Header
Not applicable.
Example of Response Body
If successful, the response body returns the 200 response code. For
example:
Status 200