Docs
Live demo
POST/api/v2/targets/test-connection

Verify connectivity and managed-access prerequisites for a target configuration before saving it, including optional SSH tunnel reachability.

Request body application/json · TestConnectionInlineRequest

Connection test request

Required2 of 7 fields
kindstringrequired
postgreskubernetesmysqlclickhousemongodbssh
connection_refstringrequired
min length 10
Optional5 fields
2 fields
topology_modestringrequired
singleon_cluster
cluster_namestring
min length 1 · max length 255

Settings of an SSH target. A host has its own connection. A fleet names hosts by list and labels.

4 fields
rolestringrequired
hostfleet
4 fields
ssh_key_idstring · uuidrequired

Organization SSH key Principal signs in with.

host_keystringrequired

Pinned public key of the host in authorized_keys format. Another key stops every operation on the host.

host_key_fingerprintstring

SHA256 fingerprint of the pinned key. Response only.

read only
labelsmap of string → string

Labels fleets select the host by.

2 fields
host_idsarray of string · uuid
selectormap of string → string

A host joins the fleet when it has every one of these labels.

certificate_ttl_minutesinteger

Lifetime of the certificates Principal issues for this target, 5 to 1440 minutes. Default 480.

min 5 · max 1440
managedboolean
ssh_tunnel_idstring
organization_idstring

Responses

200

OK

TestConnectionInlineResponse · 9 fields
successbooleanrequired
failure_messagestring
error_codestring
error_explanationstring
recommended_actionstring
recommended_sqlstring
current_userstring
checksarray of ConnectionCheckResultrequired
6 fields
namestringrequired

Stable code of the check, for example database_connectivity.

labelstringrequired

Name of the check for people, for example "Connect and sign in".

statusstring (ConnectionCheckStatus)required
passedfailedskipped
messagestring

Outcome of the check in plain words. Never contains driver or library text.

technical_detailstring

For a failed check, the server's error code and text or the innermost driver error, shown only in the technical details. Never contains addresses or credentials.

duration_msinteger · int64
dex_discoveryDexDiscoveryResult
8 fields
statusstring (DexDiscoveryStatus)required
auto_filledselection_requiredfailedskipped
providersarray of DexDiscoveredProvider
3 fields
namestringrequired
typestringrequired
oidc_issuer_urlstring
issuer_urlstring
suggested_client_idstring
selected_provider_namestring
selected_provider_typestring
failure_reasonstring (DexDiscoveryFailureReason)
no_crdno_providerspermission_deniedissuer_not_founddiscovery_error
failure_messagestring
503

Connection failed

Common errors: 400 401 403 409 413 429 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close