Reference
Complete reference documentation for SerenDB's APIs, command-line tools, SDKs, and integrations.
Overview
This section provides comprehensive reference documentation for programmatically managing SerenDB resources, including the REST API, CLI, SDKs, and infrastructure-as-code tools.
API Reference
Management API
Automate SerenDB operations with our REST API.
Capabilities:
Create and manage projects
Configure databases and branches
Manage users and permissions
Monitor metrics and logs
Configure integrations
See: API Reference
Authentication
API key authentication
Bearer token format
Scoped permissions
Key rotation
Command-Line Interface (CLI)
SerenDB CLI
The official command-line tool for SerenDB operations.
Installation
npm install -g neonctlSee: CLI Install | CLI Quickstart
Core Commands
Authentication
neonctl auth: Manage authenticationneonctl me: Display current user information
Projects
neonctl projects: List and manage projectsneonctl set-context: Set active project
See: CLI Projects | CLI Set Context
Databases
neonctl databases: Create and manage databases
See: CLI Databases
Branches
neonctl branches: Manage database branches
See: CLI Branches
Roles
neonctl roles: Manage database roles
See: CLI Roles
Organizations
neonctl orgs: Manage organizations
See: CLI Orgs
Connections
neonctl connection-string: Generate connection strings
Operations
neonctl operations: View and manage operations
See: CLI Operations
IP Allow
neonctl ip-allow: Manage IP allow lists
See: CLI IP Allow
VPC
neonctl vpc: Manage VPC configurations
See: CLI VPC
Shell Completion
neonctl completion: Generate shell completion scripts
See: CLI Completion
SDKs
TypeScript/JavaScript SDK
Type-safe SDK for Node.js and browser environments.
Features:
Full TypeScript support
Promise-based API
Comprehensive type definitions
Browser and Node.js compatible
See: TypeScript SDK | SDK Overview
Python SDK
Pythonic interface for SerenDB management.
Features:
Type hints support
Async/await support
Comprehensive documentation
Exception handling
See: Python SDK
Infrastructure as Code
Terraform Provider
Manage SerenDB infrastructure with Terraform.
Resources:
Projects
Databases
Branches
Roles
API keys
See: Terraform
Example:
resource "neon_project" "example" {
name = "my-project"
region_id = "aws-us-east-2"
}Developer Tools
SerenDB Launchpad
Quick start templates and boilerplates for common use cases.
See: SerenDB Launchpad
SerenDB Toolkit
Extension for VS Code and other editors.
Features:
Database browsing
Query execution
Schema visualization
Connection management
Monitoring & Observability
Metrics & Logs
Access detailed metrics and logs for your databases.
Available metrics:
Query performance
Connection count
CPU and memory usage
Storage utilization
Network I/O
See: Metrics & Logs
Feeds
Subscribe to updates and changelogs.
See: Feeds
Compatibility
PostgreSQL Compatibility
SerenDB is compatible with PostgreSQL 14, 15, 16, and 17.
See: Compatibility
Driver Compatibility
Works with standard PostgreSQL drivers:
node-postgres (pg)
postgres.js
Deno postgres
Python psycopg2/psycopg3
Go pgx
Rust tokio-postgres
And more...
Glossary
Common terms and concepts used throughout SerenDB documentation.
See: Glossary
API Usage Patterns
Rate Limiting
Requests per second limits
Burst allowances
Retry strategies
Pagination
Cursor-based pagination
Page size limits
Efficient data fetching
Error Handling
Standard HTTP status codes
Error response format
Retry recommendations
Best Practices
API Usage
Use API keys: Secure authentication
Implement retries: Handle transient failures
Cache responses: Reduce API calls
Batch operations: Efficient resource usage
Monitor rate limits: Avoid throttling
CLI Usage
Use contexts: Switch between projects easily
Script operations: Automate repetitive tasks
Output formats: JSON for scripting, table for humans
Store credentials: Use configuration file
Update regularly: Keep CLI current
SDK Usage
Type safety: Leverage TypeScript types
Error handling: Wrap in try-catch blocks
Connection pooling: Reuse connections
Async patterns: Use async/await
Version pinning: Specify SDK versions
Getting Started
API: Start with API Reference
CLI: Install and try CLI Quickstart
SDK: Choose TypeScript or Python
IaC: Explore Terraform Provider
Support
API documentation and examples
SDK reference documentation
CLI help:
neonctl --helpCommunity forum for questions
GitHub issues for bugs
Whether you're building automation scripts, infrastructure as code, or integrating SerenDB into your application, these tools provide the flexibility and power you need.
Last updated