Get Db
REST API - Misc
Get Database Connection
Get PostgreSQL database connection string for your organization
GET
Get Db
Retrieve the PostgreSQL database connection details for your organization. This provides direct access to your organization’s database instance for custom analytics, integrations, and data management.Documentation Index
Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
Use this file to discover all available pages before exploring further.
Response
Database project identifier
Database project name (typically
org_[organization_id])Your organization UUID
Database connection details
Example Request
Example Response
Usage Examples
Python (psycopg2)
Node.js (pg)
CLI (psql)
Database Schema
Your organization database contains tables for:- agents - Agent configurations and metadata
- tasks - Task execution records
- knowledge_bases - Knowledge base metadata
- documents - Document records and processing status
- users - User information and permissions
- organization - Organization settings and data
- And more…
Security Notes
- The connection string includes credentials - keep it secure
- Store the connection string as an environment variable, never in version control
- Use HTTPS only when retrieving connection strings
- The database requires SSL connections (sslmode=require)
- Be cautious with write operations to avoid accidental data modification
- Regularly rotate credentials in your organization settings
Use Cases
- Custom analytics - Query task and agent data directly for reporting
- Data export - Extract data for external analysis and backup
- Business intelligence - Connect BI tools like Tableau, Metabase, Power BI
- Integration - Build custom integrations with third-party systems
- Automation - Create automated data processing pipelines
- Advanced queries - Perform complex SQL queries not available via REST API
Notes
- This is a Neon PostgreSQL serverless database
- Connection pooling is handled automatically
- Database is located in AWS us-west-2 region
- SSL connections are required for security
- Connection credentials are organization-specific and should not be shared
Authorizations
API Key for authentication
Response
200 - application/json
Successful Response
Represents a Neon project used in xpander.ai for managing database resources.
Attributes: id (str): Unique identifier for the Neon project. name (str): Name of the Neon project. organization_id (Optional[str]): The associated organization ID, inferred from the name if not provided. connection_uri (Optional[ConnectionURIResponse]): The connection URI for the project.

