Set user database connection

Save Cosmos DB connection settings for the authenticated user and validate connectivity.

post/api/v1/cosmos/connection

Request

  • Base URL: https://localhost:3000
  • URL: https://localhost:3000/api/v1/cosmos/connection
  • Auth: OAuth 2 (authorization code, authorization URL /oauth/authorize, token URL /oauth/token)

Request body

hoststring required
portinteger
userstring required
passwordstring required
databasestring required
sslstring
timeoutinteger
min_pool_sizeinteger
max_pool_sizeinteger

Example request

{
  "host": "myserver.cosmos.database.azure.com",
  "port": 5432,
  "user": "db_user",
  "password": "your-secure-password",
  "database": "app_db",
  "ssl": "require"
}

Response

Database connection saved

configuredboolean
connector_idstring
session_userstring
credential_identitystring
hoststring
portinteger
databasestring
usernamestring
sslstring

Example response

{
  "connector_id": "cosmos",
  "session_user": "user@example.com",
  "port": 5432,
  "ssl": "prefer"
}

Changes

No recorded changes to this operation across all 1 revision of this API.