Skip to main content
PATCH
/
projects
/
{projectName}
/
connections
/
{connectionName}
Update an existing database connection
curl --request PATCH \
  --url https://{organization}.data.credibledata.com/api/v0/projects/{projectName}/connections/{connectionName} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "postgresConnection": {
    "host": "<string>",
    "port": 123,
    "databaseName": "<string>",
    "userName": "<string>",
    "password": "<string>",
    "connectionString": "<string>"
  },
  "mysqlConnection": {
    "host": "<string>",
    "port": 123,
    "database": "<string>",
    "user": "<string>",
    "password": "<string>"
  },
  "bigqueryConnection": {
    "defaultProjectId": "<string>",
    "billingProjectId": "<string>",
    "location": "<string>",
    "serviceAccountKeyJson": "<string>",
    "maximumBytesBilled": "<string>",
    "queryTimeoutMilliseconds": "<string>"
  },
  "snowflakeConnection": {
    "account": "<string>",
    "username": "<string>",
    "password": "<string>",
    "privateKey": "<string>",
    "privateKeyPass": "<string>",
    "warehouse": "<string>",
    "database": "<string>",
    "schema": "<string>",
    "role": "<string>",
    "responseTimeoutMilliseconds": 123
  },
  "duckdbConnection": {
    "attachedDatabases": [
      {
        "name": "test_connection, _connection, test_connection_1",
        "type": "bigquery",
        "attributes": {
          "dialectName": "<string>",
          "isPool": true,
          "canPersist": true,
          "canStream": true
        },
        "bigqueryConnection": {
          "defaultProjectId": "<string>",
          "billingProjectId": "<string>",
          "location": "<string>",
          "serviceAccountKeyJson": "<string>",
          "maximumBytesBilled": "<string>",
          "queryTimeoutMilliseconds": "<string>"
        },
        "snowflakeConnection": {
          "account": "<string>",
          "username": "<string>",
          "password": "<string>",
          "privateKey": "<string>",
          "privateKeyPass": "<string>",
          "warehouse": "<string>",
          "database": "<string>",
          "schema": "<string>",
          "role": "<string>",
          "responseTimeoutMilliseconds": 123
        },
        "postgresConnection": {
          "host": "<string>",
          "port": 123,
          "databaseName": "<string>",
          "userName": "<string>",
          "password": "<string>",
          "connectionString": "<string>"
        },
        "gcsConnection": {
          "keyId": "<string>",
          "secret": "<string>"
        },
        "s3Connection": {
          "accessKeyId": "<string>",
          "secretAccessKey": "<string>",
          "region": "us-east-1",
          "endpoint": "<string>",
          "sessionToken": "<string>"
        }
      }
    ]
  },
  "motherduckConnection": {
    "accessToken": "<string>",
    "database": "<string>"
  },
  "trinoConnection": {
    "server": "<string>",
    "port": 123,
    "catalog": "<string>",
    "schema": "<string>",
    "user": "<string>",
    "password": "<string>",
    "peakaKey": "<string>"
  }
}
'
{
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectName
string
required

Name of the project Standard identifier pattern for resource names

Pattern: ^[a-zA-Z0-9_-]+$
connectionName
string
required

Name of the connection to update Standard identifier pattern for resource names

Pattern: ^[a-zA-Z0-9_-]+$

Body

application/json
postgresConnection
object

PostgreSQL database connection configuration

mysqlConnection
object

MySQL database connection configuration

bigqueryConnection
object

Google BigQuery database connection configuration

snowflakeConnection
object

Snowflake database connection configuration

duckdbConnection
object

DuckDB database connection configuration

motherduckConnection
object

MotherDuck database connection configuration

trinoConnection
object

Trino database connection configuration

Response

Connection updated successfully

message
string