Skip to main content
PARIXDocs
Connecting

Connect to a database

Verify a database connection through the dashboard wizard and the public TigerBeetle operations API.

This quickstart verifies a real read through the supported Parix HTTP gateway. The dashboard Connect wizard organizes the work into Install, Configure, and Verify steps; the curl request below is the executable connection check.

Prerequisites

Before you begin, confirm that:

  • the database status is Ready
  • you know the database ID shown on its dashboard
  • you are an organization owner or administrator, or you already have an active key for this database
  • curl is installed locally

The same procedure works for Developer shared, Dedicated, and Production databases. Current plan quotas still apply.

1. Open the Connect wizard

  1. Sign in to the Parix dashboard.
  2. Open the organization at /{organizationSlug}.
  3. Select the database.
  4. Select Connect on the database dashboard. The route is /{organizationSlug}/databases/{databaseName}/connect.
  5. On Install a client, choose the language tab closest to your application.

The Install a client step of the Parix Connect wizard

The wizard includes Node.js, Go, Java, .NET, and Python examples. Treat these tabs as language reference material. They do not expose a raw TigerBeetle endpoint, and no customer plan permits direct connections to provider or replica addresses. You do not need to install a language package to complete this HTTP verification.

2. Create and store a database-scoped key

  1. Select Continue to open Configure connection.
  2. If you do not already have a suitable key, open Generate API key. The global creation route is /settings/api-keys/generate.
  3. Enter a recognizable key name.
  4. Select Specific database, then choose the current database.
  5. Generate the key and copy the px_... secret immediately. Parix shows the complete secret once.
  6. Store the key and database ID in your shell without committing either value to source control:
export PARIX_BASE_URL="https://parix.io"
export PARIX_DATABASE_ID="<database-id>"
export PARIX_API_KEY="px_..."

The Configure connection step showing API-key configuration

Keys generated by the current dashboard include both db:read and db:write. A database-specific key is the safer default for one application that uses one database.

3. Run a read operation

Send query_accounts to the public TigerBeetle operations route:

curl --fail-with-body \
  --request POST \
  "$PARIX_BASE_URL/api/v1/databases/$PARIX_DATABASE_ID/tb/query_accounts" \
  --header "content-type: application/json" \
  --header "x-api-key: $PARIX_API_KEY" \
  --data '{"limit":100,"flags":0}'

The path uses the immutable database ID, not the database name from the dashboard URL. The x-api-key header is the clearest authentication form for an API key. Parix also recognizes the same API key as a Bearer credential where a client library requires that convention.

4. Check the response

A successful request returns HTTP 200. Confirm that:

  • databaseId matches PARIX_DATABASE_ID
  • operation is query_accounts
  • responsePayload contains the TigerBeetle result, which can be an empty array for a new database
  • the response contains mode and persisted so your application can enforce the gateway result contract

The final wizard screen shows a short verification example:

The Verify connection step of the Parix Connect wizard

The language snippet on that screen assumes an initialized client and is not a complete transport configuration. Consider the HTTP response above the successful end-to-end check, then select All done in the wizard.

Expected result

You can repeatedly execute the read with the scoped key, and the response identifies the requested database and operation. Your application never needs a provider hostname or replica address.

Troubleshooting

ResultWhat to check
400 Bad RequestValidate the operation name and JSON payload against the operation schema.
401 UnauthorizedConfirm the px_... value is complete, active, and sent in x-api-key.
403 ForbiddenConfirm the key can reach this database and includes db:read.
404 Not FoundConfirm you used the database ID, not its name, and that the key belongs to the correct organization.
409 ConflictFor write operations, inspect tbResults for per-item TigerBeetle results before retrying.
429 Too Many RequestsReduce concurrency and retry with bounded exponential backoff and jitter.
503 Service UnavailableRetry a read with bounded backoff; do not blindly replay a write without knowing its outcome.

For a complete authentication checklist, see API keys and authentication.

Next steps