User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
Connection : Manage Database Connections

Get All Connections

GET/api/3.1/connections
all_connections(fields)

Implementation Notes

Get information about all connections.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
fields false Requested fields. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Create Connection

POST/api/3.1/connections
create_connection(body)

Implementation Notes

Create a connection using the specified configuration.

Response Class

DBConnection {
name (string): Name of the connection. Also used as the unique identifier,
dialect (Dialect, read-only): (Read-only) SQL Dialect details,
snippets (Array[Snippet], read-only): SQL Runner snippets for this connection,
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
uses_oauth (boolean, read-only): Whether the connection uses OAuth for authentication.,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
db_timezone (string): Time zone of database,
query_timezone (string): Timezone to use in queries,
schema (string): Scheme name,
max_connections (long): Maximum number of concurrent connection to use,
max_billing_gigabytes (string): Maximum size of query in GBs (BigQuery only, can be a user_attribute name),
ssl (boolean): Use SSL/TLS when connecting to server,
verify_ssl (boolean): Verify the SSL,
tmp_db_name (string): Name of temporary database (if used),
jdbc_additional_params (string): Additional params to add to JDBC connection string,
pool_timeout (long): Pool Timeout,
dialect_name (string): (Read/Write) SQL Dialect name,
created_at (string, read-only): Creation date for this connection,
user_id (string, read-only): Id of user who last modified this connection configuration,
example (boolean, read-only): Is this an example connection,
user_db_credentials (boolean): (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password,
user_attribute_fields (Array[string]): Fields whose values map to user attribute names,
maintenance_cron (string): Cron string specifying when maintenance such as PDT trigger checks and drops should be performed,
last_regen_at (string, read-only): Unix timestamp at start of last completed PDT trigger check process,
last_reap_at (string, read-only): Unix timestamp at start of last completed PDT reap process,
sql_runner_precache_tables (boolean): Precache tables in the SQL Runner,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
pdt_context_override (DBConnectionOverride): db_connection_override for this connection in the pdt maintenance context,
can (object, read-only): Operations the current user is able to perform on this object
}
Dialect {
name (string, read-only): The name of the dialect,
label (string, read-only): The human-readable label of the connection,
supports_cost_estimate (boolean, read-only): Whether the dialect supports query cost estimates,
supports_upload_tables (boolean, read-only): Whether the dialect supports uploading tables,
persistent_table_indexes (string, read-only): PDT index columns,
persistent_table_sortkeys (string, read-only): PDT sortkey columns,
persistent_table_distkey (string, read-only): PDT distkey column,
supports_streaming (boolean, read-only): Suports streaming results,
automatically_run_sql_runner_snippets (boolean, read-only): Should SQL Runner snippets automatically be run,
connection_tests (Array[string], read-only): Array of names of the tests that can be run on a connection using this dialect,
supports_inducer (boolean, read-only): Is supported with the inducer (i.e. generate from sql),
can (object, read-only): Operations the current user is able to perform on this object
}
Snippet {
name (string, read-only): Name of the snippet,
label (string, read-only): Label of the snippet,
sql (string, read-only): SQL text of the snippet,
can (object, read-only): Operations the current user is able to perform on this object
}
DBConnectionOverride {
context (string): Context in which to override (pdt is the only allowed value),
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
has_password (boolean, read-only): Whether or not the password is overridden in this context,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
schema (string): Scheme name,
jdbc_additional_params (string): Additional params to add to JDBC connection string,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
body false Connection body
DBConnection {
name (string): Name of the connection. Also used as the unique identifier,
dialect (Dialect, read-only): (Read-only) SQL Dialect details,
snippets (Array[Snippet], read-only): SQL Runner snippets for this connection,
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
uses_oauth (boolean, read-only): Whether the connection uses OAuth for authentication.,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
db_timezone (string): Time zone of database,
query_timezone (string): Timezone to use in queries,
schema (string): Scheme name,
max_connections (long): Maximum number of concurrent connection to use,
max_billing_gigabytes (string): Maximum size of query in GBs (BigQuery only, can be a user_attribute name),
ssl (boolean): Use SSL/TLS when connecting to server,
verify_ssl (boolean): Verify the SSL,
tmp_db_name (string): Name of temporary database (if used),
jdbc_additional_params (string): Additional params to add to JDBC connection string,
pool_timeout (long): Pool Timeout,
dialect_name (string): (Read/Write) SQL Dialect name,
created_at (string, read-only): Creation date for this connection,
user_id (string, read-only): Id of user who last modified this connection configuration,
example (boolean, read-only): Is this an example connection,
user_db_credentials (boolean): (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password,
user_attribute_fields (Array[string]): Fields whose values map to user attribute names,
maintenance_cron (string): Cron string specifying when maintenance such as PDT trigger checks and drops should be performed,
last_regen_at (string, read-only): Unix timestamp at start of last completed PDT trigger check process,
last_reap_at (string, read-only): Unix timestamp at start of last completed PDT reap process,
sql_runner_precache_tables (boolean): Precache tables in the SQL Runner,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
pdt_context_override (DBConnectionOverride): db_connection_override for this connection in the pdt maintenance context,
can (object, read-only): Operations the current user is able to perform on this object
}
Dialect {
name (string, read-only): The name of the dialect,
label (string, read-only): The human-readable label of the connection,
supports_cost_estimate (boolean, read-only): Whether the dialect supports query cost estimates,
supports_upload_tables (boolean, read-only): Whether the dialect supports uploading tables,
persistent_table_indexes (string, read-only): PDT index columns,
persistent_table_sortkeys (string, read-only): PDT sortkey columns,
persistent_table_distkey (string, read-only): PDT distkey column,
supports_streaming (boolean, read-only): Suports streaming results,
automatically_run_sql_runner_snippets (boolean, read-only): Should SQL Runner snippets automatically be run,
connection_tests (Array[string], read-only): Array of names of the tests that can be run on a connection using this dialect,
supports_inducer (boolean, read-only): Is supported with the inducer (i.e. generate from sql),
can (object, read-only): Operations the current user is able to perform on this object
}
Snippet {
name (string, read-only): Name of the snippet,
label (string, read-only): Label of the snippet,
sql (string, read-only): SQL text of the snippet,
can (object, read-only): Operations the current user is able to perform on this object
}
DBConnectionOverride {
context (string): Context in which to override (pdt is the only allowed value),
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
has_password (boolean, read-only): Whether or not the password is overridden in this context,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
schema (string): Scheme name,
jdbc_additional_params (string): Additional params to add to JDBC connection string,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
409 Resource Already Exists
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Get Connection

GET/api/3.1/connections/{connection_name}
connection(connection_name, fields)

Implementation Notes

Get information about a connection.

Response Class

DBConnection {
name (string): Name of the connection. Also used as the unique identifier,
dialect (Dialect, read-only): (Read-only) SQL Dialect details,
snippets (Array[Snippet], read-only): SQL Runner snippets for this connection,
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
uses_oauth (boolean, read-only): Whether the connection uses OAuth for authentication.,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
db_timezone (string): Time zone of database,
query_timezone (string): Timezone to use in queries,
schema (string): Scheme name,
max_connections (long): Maximum number of concurrent connection to use,
max_billing_gigabytes (string): Maximum size of query in GBs (BigQuery only, can be a user_attribute name),
ssl (boolean): Use SSL/TLS when connecting to server,
verify_ssl (boolean): Verify the SSL,
tmp_db_name (string): Name of temporary database (if used),
jdbc_additional_params (string): Additional params to add to JDBC connection string,
pool_timeout (long): Pool Timeout,
dialect_name (string): (Read/Write) SQL Dialect name,
created_at (string, read-only): Creation date for this connection,
user_id (string, read-only): Id of user who last modified this connection configuration,
example (boolean, read-only): Is this an example connection,
user_db_credentials (boolean): (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password,
user_attribute_fields (Array[string]): Fields whose values map to user attribute names,
maintenance_cron (string): Cron string specifying when maintenance such as PDT trigger checks and drops should be performed,
last_regen_at (string, read-only): Unix timestamp at start of last completed PDT trigger check process,
last_reap_at (string, read-only): Unix timestamp at start of last completed PDT reap process,
sql_runner_precache_tables (boolean): Precache tables in the SQL Runner,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
pdt_context_override (DBConnectionOverride): db_connection_override for this connection in the pdt maintenance context,
can (object, read-only): Operations the current user is able to perform on this object
}
Dialect {
name (string, read-only): The name of the dialect,
label (string, read-only): The human-readable label of the connection,
supports_cost_estimate (boolean, read-only): Whether the dialect supports query cost estimates,
supports_upload_tables (boolean, read-only): Whether the dialect supports uploading tables,
persistent_table_indexes (string, read-only): PDT index columns,
persistent_table_sortkeys (string, read-only): PDT sortkey columns,
persistent_table_distkey (string, read-only): PDT distkey column,
supports_streaming (boolean, read-only): Suports streaming results,
automatically_run_sql_runner_snippets (boolean, read-only): Should SQL Runner snippets automatically be run,
connection_tests (Array[string], read-only): Array of names of the tests that can be run on a connection using this dialect,
supports_inducer (boolean, read-only): Is supported with the inducer (i.e. generate from sql),
can (object, read-only): Operations the current user is able to perform on this object
}
Snippet {
name (string, read-only): Name of the snippet,
label (string, read-only): Label of the snippet,
sql (string, read-only): SQL text of the snippet,
can (object, read-only): Operations the current user is able to perform on this object
}
DBConnectionOverride {
context (string): Context in which to override (pdt is the only allowed value),
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
has_password (boolean, read-only): Whether or not the password is overridden in this context,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
schema (string): Scheme name,
jdbc_additional_params (string): Additional params to add to JDBC connection string,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
connection_name true Name of connection string string
fields false Requested fields. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Update Connection

PATCH/api/3.1/connections/{connection_name}
update_connection(connection_name, body)

Implementation Notes

Update a connection using the specified configuration.

Response Class

DBConnection {
name (string): Name of the connection. Also used as the unique identifier,
dialect (Dialect, read-only): (Read-only) SQL Dialect details,
snippets (Array[Snippet], read-only): SQL Runner snippets for this connection,
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
uses_oauth (boolean, read-only): Whether the connection uses OAuth for authentication.,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
db_timezone (string): Time zone of database,
query_timezone (string): Timezone to use in queries,
schema (string): Scheme name,
max_connections (long): Maximum number of concurrent connection to use,
max_billing_gigabytes (string): Maximum size of query in GBs (BigQuery only, can be a user_attribute name),
ssl (boolean): Use SSL/TLS when connecting to server,
verify_ssl (boolean): Verify the SSL,
tmp_db_name (string): Name of temporary database (if used),
jdbc_additional_params (string): Additional params to add to JDBC connection string,
pool_timeout (long): Pool Timeout,
dialect_name (string): (Read/Write) SQL Dialect name,
created_at (string, read-only): Creation date for this connection,
user_id (string, read-only): Id of user who last modified this connection configuration,
example (boolean, read-only): Is this an example connection,
user_db_credentials (boolean): (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password,
user_attribute_fields (Array[string]): Fields whose values map to user attribute names,
maintenance_cron (string): Cron string specifying when maintenance such as PDT trigger checks and drops should be performed,
last_regen_at (string, read-only): Unix timestamp at start of last completed PDT trigger check process,
last_reap_at (string, read-only): Unix timestamp at start of last completed PDT reap process,
sql_runner_precache_tables (boolean): Precache tables in the SQL Runner,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
pdt_context_override (DBConnectionOverride): db_connection_override for this connection in the pdt maintenance context,
can (object, read-only): Operations the current user is able to perform on this object
}
Dialect {
name (string, read-only): The name of the dialect,
label (string, read-only): The human-readable label of the connection,
supports_cost_estimate (boolean, read-only): Whether the dialect supports query cost estimates,
supports_upload_tables (boolean, read-only): Whether the dialect supports uploading tables,
persistent_table_indexes (string, read-only): PDT index columns,
persistent_table_sortkeys (string, read-only): PDT sortkey columns,
persistent_table_distkey (string, read-only): PDT distkey column,
supports_streaming (boolean, read-only): Suports streaming results,
automatically_run_sql_runner_snippets (boolean, read-only): Should SQL Runner snippets automatically be run,
connection_tests (Array[string], read-only): Array of names of the tests that can be run on a connection using this dialect,
supports_inducer (boolean, read-only): Is supported with the inducer (i.e. generate from sql),
can (object, read-only): Operations the current user is able to perform on this object
}
Snippet {
name (string, read-only): Name of the snippet,
label (string, read-only): Label of the snippet,
sql (string, read-only): SQL text of the snippet,
can (object, read-only): Operations the current user is able to perform on this object
}
DBConnectionOverride {
context (string): Context in which to override (pdt is the only allowed value),
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
has_password (boolean, read-only): Whether or not the password is overridden in this context,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
schema (string): Scheme name,
jdbc_additional_params (string): Additional params to add to JDBC connection string,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
connection_name true Name of connection string string
body true Connection body
DBConnection {
name (string): Name of the connection. Also used as the unique identifier,
dialect (Dialect, read-only): (Read-only) SQL Dialect details,
snippets (Array[Snippet], read-only): SQL Runner snippets for this connection,
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
uses_oauth (boolean, read-only): Whether the connection uses OAuth for authentication.,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
db_timezone (string): Time zone of database,
query_timezone (string): Timezone to use in queries,
schema (string): Scheme name,
max_connections (long): Maximum number of concurrent connection to use,
max_billing_gigabytes (string): Maximum size of query in GBs (BigQuery only, can be a user_attribute name),
ssl (boolean): Use SSL/TLS when connecting to server,
verify_ssl (boolean): Verify the SSL,
tmp_db_name (string): Name of temporary database (if used),
jdbc_additional_params (string): Additional params to add to JDBC connection string,
pool_timeout (long): Pool Timeout,
dialect_name (string): (Read/Write) SQL Dialect name,
created_at (string, read-only): Creation date for this connection,
user_id (string, read-only): Id of user who last modified this connection configuration,
example (boolean, read-only): Is this an example connection,
user_db_credentials (boolean): (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password,
user_attribute_fields (Array[string]): Fields whose values map to user attribute names,
maintenance_cron (string): Cron string specifying when maintenance such as PDT trigger checks and drops should be performed,
last_regen_at (string, read-only): Unix timestamp at start of last completed PDT trigger check process,
last_reap_at (string, read-only): Unix timestamp at start of last completed PDT reap process,
sql_runner_precache_tables (boolean): Precache tables in the SQL Runner,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
pdt_context_override (DBConnectionOverride): db_connection_override for this connection in the pdt maintenance context,
can (object, read-only): Operations the current user is able to perform on this object
}
Dialect {
name (string, read-only): The name of the dialect,
label (string, read-only): The human-readable label of the connection,
supports_cost_estimate (boolean, read-only): Whether the dialect supports query cost estimates,
supports_upload_tables (boolean, read-only): Whether the dialect supports uploading tables,
persistent_table_indexes (string, read-only): PDT index columns,
persistent_table_sortkeys (string, read-only): PDT sortkey columns,
persistent_table_distkey (string, read-only): PDT distkey column,
supports_streaming (boolean, read-only): Suports streaming results,
automatically_run_sql_runner_snippets (boolean, read-only): Should SQL Runner snippets automatically be run,
connection_tests (Array[string], read-only): Array of names of the tests that can be run on a connection using this dialect,
supports_inducer (boolean, read-only): Is supported with the inducer (i.e. generate from sql),
can (object, read-only): Operations the current user is able to perform on this object
}
Snippet {
name (string, read-only): Name of the snippet,
label (string, read-only): Label of the snippet,
sql (string, read-only): SQL text of the snippet,
can (object, read-only): Operations the current user is able to perform on this object
}
DBConnectionOverride {
context (string): Context in which to override (pdt is the only allowed value),
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
has_password (boolean, read-only): Whether or not the password is overridden in this context,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
schema (string): Scheme name,
jdbc_additional_params (string): Additional params to add to JDBC connection string,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Delete Connection

DELETE/api/3.1/connections/{connection_name}
delete_connection(connection_name)

Implementation Notes

Delete a connection.

Response Class

  None

Parameters

Parameter Required? Description Parameter Type Data Type
connection_name true Name of connection string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
204 Successfully deleted. string

Delete Connection Override

DELETE/api/3.1/connections/{connection_name}/connection_override/{override_context}
delete_connection_override(connection_name, override_context)

Implementation Notes

Delete a connection override.

Response Class

  None

Parameters

Parameter Required? Description Parameter Type Data Type
connection_name true Name of connection string string
override_context true Context of connection override string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}
204 Successfully deleted. string

Test Connection

PUT/api/3.1/connections/{connection_name}/test
test_connection(connection_name, tests)

Implementation Notes

Test an existing connection.

Note that a connection’s ‘dialect’ property has a ‘connection_tests’ property that lists the specific types of tests that the connection supports.

This API is rate limited.

Unsupported tests in the request will be ignored.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
connection_name true Name of connection string string
tests false Array of names of tests to run array array

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
429 Too Many Requests
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Test Connection Configuration

PUT/api/3.1/connections/test
test_connection_config(body, tests)

Implementation Notes

Test a connection configuration.

Note that a connection’s ‘dialect’ property has a ‘connection_tests’ property that lists the specific types of tests that the connection supports.

This API is rate limited.

Unsupported tests in the request will be ignored.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
body false Connection body
DBConnection {
name (string): Name of the connection. Also used as the unique identifier,
dialect (Dialect, read-only): (Read-only) SQL Dialect details,
snippets (Array[Snippet], read-only): SQL Runner snippets for this connection,
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
uses_oauth (boolean, read-only): Whether the connection uses OAuth for authentication.,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
db_timezone (string): Time zone of database,
query_timezone (string): Timezone to use in queries,
schema (string): Scheme name,
max_connections (long): Maximum number of concurrent connection to use,
max_billing_gigabytes (string): Maximum size of query in GBs (BigQuery only, can be a user_attribute name),
ssl (boolean): Use SSL/TLS when connecting to server,
verify_ssl (boolean): Verify the SSL,
tmp_db_name (string): Name of temporary database (if used),
jdbc_additional_params (string): Additional params to add to JDBC connection string,
pool_timeout (long): Pool Timeout,
dialect_name (string): (Read/Write) SQL Dialect name,
created_at (string, read-only): Creation date for this connection,
user_id (string, read-only): Id of user who last modified this connection configuration,
example (boolean, read-only): Is this an example connection,
user_db_credentials (boolean): (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password,
user_attribute_fields (Array[string]): Fields whose values map to user attribute names,
maintenance_cron (string): Cron string specifying when maintenance such as PDT trigger checks and drops should be performed,
last_regen_at (string, read-only): Unix timestamp at start of last completed PDT trigger check process,
last_reap_at (string, read-only): Unix timestamp at start of last completed PDT reap process,
sql_runner_precache_tables (boolean): Precache tables in the SQL Runner,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
pdt_context_override (DBConnectionOverride): db_connection_override for this connection in the pdt maintenance context,
can (object, read-only): Operations the current user is able to perform on this object
}
Dialect {
name (string, read-only): The name of the dialect,
label (string, read-only): The human-readable label of the connection,
supports_cost_estimate (boolean, read-only): Whether the dialect supports query cost estimates,
supports_upload_tables (boolean, read-only): Whether the dialect supports uploading tables,
persistent_table_indexes (string, read-only): PDT index columns,
persistent_table_sortkeys (string, read-only): PDT sortkey columns,
persistent_table_distkey (string, read-only): PDT distkey column,
supports_streaming (boolean, read-only): Suports streaming results,
automatically_run_sql_runner_snippets (boolean, read-only): Should SQL Runner snippets automatically be run,
connection_tests (Array[string], read-only): Array of names of the tests that can be run on a connection using this dialect,
supports_inducer (boolean, read-only): Is supported with the inducer (i.e. generate from sql),
can (object, read-only): Operations the current user is able to perform on this object
}
Snippet {
name (string, read-only): Name of the snippet,
label (string, read-only): Label of the snippet,
sql (string, read-only): SQL text of the snippet,
can (object, read-only): Operations the current user is able to perform on this object
}
DBConnectionOverride {
context (string): Context in which to override (pdt is the only allowed value),
host (string): Host name/address of server,
port (string): Port number on server,
username (string): Username for server authentication,
password (string): (Write-Only) Password for server authentication,
has_password (boolean, read-only): Whether or not the password is overridden in this context,
certificate (string): (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect).,
file_type (string): (Write-Only) Certificate keyfile type - .json or .p12,
database (string): Database name,
schema (string): Scheme name,
jdbc_additional_params (string): Additional params to add to JDBC connection string,
after_connect_statements (string): SQL statements (semicolon separated) to issue after connecting to the database. Requires custom_after_connect_statements license feature,
can (object, read-only): Operations the current user is able to perform on this object
}
tests false Array of names of tests to run array array

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
429 Too Many Requests
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get All Dialect Infos

GET/api/3.1/dialect_info
all_dialect_infos(fields)

Implementation Notes

Get information about all dialects.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
fields false Requested fields. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
Top