API Reference
Complete reference of all available operations across the Singlebase platform. All operations use BaseQL, our unified query language.
Document Database API
| Operation | Description |
|---|---|
db.find | Query and retrieve documents with filtering, sorting, and pagination |
db.insert | Insert one or multiple documents into a collection |
db.update | Update existing documents by key or filter criteria |
db.upsert | Update existing documents or insert if not found |
db.count | Count documents matching filter criteria |
db.delete | Soft delete documents (recoverable for 24 hours) |
db.archive | Archive documents to hide from queries |
db.restore | Restore deleted or archived documents |
Users & Auth API
| Operation | Description |
|---|---|
auth.signin | Sign in users with password or OTP |
auth.signup | Register new user accounts |
auth.signout | Sign out and invalidate sessions |
auth.update_profile | Update user profile information |
auth.update_account | Update email, password, or username with OTP |
auth.send_otp | Send OTP codes via email |
auth.verify_id_token | Verify JWT token validity |
auth.refresh_token | Refresh expired tokens |
auth.settings | Get authentication configuration |
File Storage API
| Operation | Description |
|---|---|
file.get | Get file information and access URLs |
file.update | Update file permissions and metadata |
file.delete | Delete files from storage |
file.presign_upload | Generate secure upload URLs |
file.finalize_upload | Finalize file upload |
file.report_upload_failure | Report failed uploads |
Vector Database API
| Operation | Description |
|---|---|
vdb.insert | Insert content with automatic embeddings |
vdb.search | Semantic similarity search |
vdb.delete | Delete vector entries |
BaseAI API
| Operation | Description |
|---|---|
baseai.create | Generate new content from prompts |
baseai.summarize | Create concise summaries |
baseai.categorize | Classify content into categories |
baseai.analyze_sentiment | Analyze emotional tone |
baseai.extract_entities | Extract entities and information |
baseai.translate | Translate between languages |
baseai.vectorize | Convert text to vector embeddings |
BaseQL Request Format
All operations use BaseQL with the same endpoint:
POST https://cloud.singlebaseapis.com/api/<ENDPOINT_KEY>Headers:
http
Content-Type: application/json
X-API-KEY: your_api_key
Authorization: Bearer your_jwt_tokenBaseQL request body:
json
{
"op": "operation_name",
"param1": "value1",
"param2": "value2"
}Example:
json
{
"op": "db.find",
"collection": "products",
"filter": { "price:$lt": 50 },
"sort": "price asc",
"limit": 10
}Response Format
Success:
json
{
"data": {
// Operation result
},
"meta": {
// Optional metadata
}
}Error:
json
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description"
}
}Learn More
BaseQL:
- BaseQL Documentation - Unified query language
- Filter Operators - Query operators
- Data Operators - Data transformation
- Template Expressions - Dynamic values
- Helper Functions - Built-in functions
- Output Expressions - Result formatting
Resources: