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 neonctl

See: CLI Install | CLI Quickstart

Core Commands

Authentication

  • neonctl auth: Manage authentication

  • neonctl me: Display current user information

See: CLI Auth | CLI Me

Projects

  • neonctl projects: List and manage projects

  • neonctl 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

See: CLI Connection String

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

See: SerenDatabase Toolkit

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

  1. Use API keys: Secure authentication

  2. Implement retries: Handle transient failures

  3. Cache responses: Reduce API calls

  4. Batch operations: Efficient resource usage

  5. Monitor rate limits: Avoid throttling

CLI Usage

  1. Use contexts: Switch between projects easily

  2. Script operations: Automate repetitive tasks

  3. Output formats: JSON for scripting, table for humans

  4. Store credentials: Use configuration file

  5. Update regularly: Keep CLI current

SDK Usage

  1. Type safety: Leverage TypeScript types

  2. Error handling: Wrap in try-catch blocks

  3. Connection pooling: Reuse connections

  4. Async patterns: Use async/await

  5. Version pinning: Specify SDK versions

Getting Started

  1. API: Start with API Reference

  2. CLI: Install and try CLI Quickstart

  3. SDK: Choose TypeScript or Python

  4. IaC: Explore Terraform Provider

Support

  • API documentation and examples

  • SDK reference documentation

  • CLI help: neonctl --help

  • Community 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