Store user credentials (basic authentication or private key)

Creates a new credential entry for the authenticated user.
The API generates a unique auth_id (UUID) and securely stores the provided credentials in encrypted format.
The user ID is automatically determined from the authentication context.

Authentication Options:

  • Username/Password: Traditional basic authentication
  • Username/Private Key: SSH key-based authentication with optional passphrase

BREAKING CHANGE: As of v1.0.0, a test connection job is automatically triggered to validate the credentials against the data source.
The response now includes a job_id field alongside the existing auth_id field.

NEW in v1.1.0: Added support for private key authentication. Either password or private_key must be provided.

The job_id can be polled via the test_connection_status endpoint to check credential validation status.

Body Params

Creates credentials for the authenticated user. The user ID is automatically
determined from the authentication context.

Authentication Options:

  • Username + Password: Traditional basic authentication
  • Username + Private Key: SSH keypair authentication (with optional passphrase)

Validation Rules:

  • state, username, and dp_id are required and non-empty
  • Either password OR private_key must be provided
  • dp_id must reference an existing DataProductInfo record
  • custom_uri must be a valid database URI format if provided

string
required
length ≤ 350

Application-defined state identifier for tracking authentication (supports longer data product IDs + user_id combinations)

string
required
length ≥ 1

Username for authentication (required, non-empty)

password

Password for authentication (will be encrypted). Either password or private_key is required.

string

Private key for SSH/keypair authentication (will be encrypted). Either password or private_key is required.

string

Optional passphrase for encrypted private keys (will be encrypted)

string
required
length ≥ 1

Data product ID that must exist in DataProductInfo table

string
enum

Optional status of the authentication context (defaults to ACTIVE if not provided)

Allowed:
string

Optional custom database URI for connection parameter overrides (e.g., postgresql://user:pass@host/db)

Responses

Language
Credentials
URL
LoadingLoading…
Response
Choose an example:
application/json