---
title: "Test a connection"
method: POST
path: "/connections/test"
tags: ["connections"]
---

# Test a connection

`POST /connections/test`

Test a virtual connection. For increased security, connection endpoints require an Enterprise Admin
Token. This token can be found under [Advanced Settings](https://data.world/settings/advanced).

## Request body

- ConnectionDto
  - `advancedProperties` object — Advanced properties
  - `credentials` DatabaseCredentials
    - `password` string — password
    - `user` string, required — user name
  - `database` string — Database/Schema Logical Name
  - `host` string — Database Host
  - `name` string — Connection name
  - `port` integer — Database Port
  - `properties` object — Properties such as auto commit, isolation level etc.
  - `sshTunnel` SshTunnel
    - `host` string, required — ssh tunnel host
    - `port` integer — Tunnel Port
    - `user` string, required — user name
    - `userKeyPair` boolean, required — whether authentication is required
  - `sslRequired` boolean — Is ssl required
  - `trustedServerCertificates` string — trusted server certificates
  - `type` 'ATHENA' | 'AZURESYNAPSE' | 'BIGQUERY' | 'DB2' | 'DENODO' | 'HIVE' | 'DATABRICKS' | 'INFOR_ION' | 'MYSQL' | 'ORACLE' | 'POSTGRESQL' | 'REDSHIFT' | 'SERVICENOW' | 'SNOWFLAKE' | 'SPARK' | 'SQLSERVER' | 'TABLEAU' — Database Type
  - `usePrivateKey` boolean — Should this connection use a private key?
  - `verifyServerCertificate` boolean — Should server certificate be verified

## Response `200`

Successful operation

- PingStatusDto
  - `cleanupStarted` boolean
  - `cleanupSuccess` boolean
  - `configureStarted` boolean
  - `configureSuccess` boolean
  - `connectHost` string
  - `connectStarted` boolean
  - `connectSuccess` boolean
  - `done` boolean — Is the ping operation 100% complete?
  - `elapsed` number, double
  - `errorMessage` string — Failures
  - `internalError` boolean — Is the cause of a failure likely an internal bug in our code, not something users have control over?
  - `queryStarted` boolean
  - `querySuccess` boolean
  - `queryText` string
  - `serverDescription` string — Technical string describing the location of the database on the network. This may be a JDBC url.
  - `serverType` 'ATHENA' | 'AZURESYNAPSE' | 'BIGQUERY' | 'DB2' | 'DENODO' | 'HIVE' | 'DATABRICKS' | 'INFOR_ION' | 'MYSQL' | 'ORACLE' | 'POSTGRESQL' | 'REDSHIFT' | 'SERVICENOW' | 'SNOWFLAKE' | 'SPARK' | 'SQLSERVER' | 'TABLEAU'
  - `sslCertificateChain` string[] — If the ping failed due to an SSL issue
  - `sslCertificateNameProblem` boolean — Did the ping fail because the server's name didn't match the name in the certificate?
  - `sslCertificateTrustPathProblem` boolean — Did the ping fail because it didn't trust the server's certificate due to a lack of a path to a root CA?
  - `sslNotSupported` boolean — Did the ping fail because it tried to use SSL but the server+port combination doesn't support SSL?
  - `success` boolean — Everything successfully done
  - `tunnelHost` string
  - `tunnelStarted` boolean
  - `tunnelSuccess` boolean

## Other responses

- `400` — Bad Request
- `401` — User is unauthorized to perform action
- `403` — Access forbidden
- `404` — Not found
- `422` — Unable to parse request. URLs provided must be fully-formed http or https URLs
- `500` — Server error

---

[API](https://skmtc.dev/data/apis/data-world-public-api.md) · [All operations](https://skmtc.dev/data/apis/data-world-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/data/data-world-public-api/revisions/0a0cb1f94dad/schema)
