For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • API Reference
      • GETGet Connection Types
      • GETGet Connection Type
      • POSTConnection Type Parameter Values
      • GETList Connections
      • POSTCreate Connection
      • POSTConnect
      • POSTTest Connection
      • GETGet Connection
      • PUTUpdate Connection
      • DELDelete Connection
      • GETConnection Parameter Values
      • POSTCreate Shared Connection
      • GETList Shared Connections
Logo
Log inBook a demo
API ReferenceConnections

Test Connection

POST
https://app.polytomic.com/api/connections/test
POST
/api/connections/test
$curl -X POST https://app.polytomic.com/api/connections/test \
> -H "X-Polytomic-Version: X-Polytomic-Version" \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{
> "configuration": {
> "database": "example",
> "hostname": "postgres.example.com",
> "password": "password",
> "port": 5432,
> "username": "user"
> },
> "type": "postgresql"
>}'
Tests a connection configuration. This endpoint is useful for setup flows that want to verify credentials before persisting them. If you provide `connection_id`, Polytomic starts from the saved configuration for that connection and then applies the request's `configuration` values on top. This lets callers test a partial change without resending every existing field. The request does not persist any configuration changes even when validation succeeds.
Was this page helpful?
Previous

Get Connection

Next

Tests a connection configuration.

This endpoint is useful for setup flows that want to verify credentials before persisting them.

If you provide connection_id, Polytomic starts from the saved configuration for that connection and then applies the request’s configuration values on top. This lets callers test a partial change without resending every existing field.

The request does not persist any configuration changes even when validation succeeds.

Authentication

AuthorizationBasic

This is the Polytomic deployment key (on-premises only)

OR
AuthorizationBearer
This is the Polytomic API key

Headers

X-Polytomic-VersionstringRequired

Request

This endpoint expects an object.
configurationmap from strings to anyRequired
Connection configuration to test.
typestringRequired
The type of connection to test.
connection_idstringOptionalformat: "uuid"
Optional existing connection ID to use as a base for testing. The provided configuration will be merged over the stored configuration for this connection before testing.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error