FauxDB API Reference
MongoDB-compatible API documentation
Complete API reference for FauxDB's MongoDB-compatible interface and REST endpoints.
API Features
MongoDB Compatible
Full MongoDB wire protocol compatibility with existing drivers and tools.
RESTful API
Modern REST API for programmatic access and integration.
ACID Transactions
Multi-document ACID transactions with PostgreSQL backend.
High Performance
Optimized for high-throughput workloads with connection pooling.
API Endpoints
GET
/api/v1/databases
List all databases
GET /api/v1/databases
POST
/api/v1/databases
Create a new database
POST /api/v1/databases {"name": "mydb"}
GET
/api/v1/databases/{db}/collections
List collections in a database
GET /api/v1/databases/mydb/collections
POST
/api/v1/databases/{db}/collections
Create a new collection
POST /api/v1/databases/mydb/collections {"name": "users"}
GET
/api/v1/databases/{db}/collections/{collection}/documents
Query documents in a collection
GET /api/v1/databases/mydb/collections/users/documents
POST
/api/v1/databases/{db}/collections/{collection}/documents
Insert a new document
POST /api/v1/databases/mydb/collections/users/documents {"name": "John", "email": "john@example.com"}
MongoDB Wire Protocol Compatibility
FauxDB implements the MongoDB wire protocol, ensuring compatibility with existing MongoDB drivers, tools, and applications.
Supported Operations
CRUD Operations
- • insertOne, insertMany
- • findOne, find
- • updateOne, updateMany
- • deleteOne, deleteMany
Advanced Features
- • Aggregation pipelines
- • Geospatial queries
- • ACID transactions
- • Indexing support