ReferenceAPI Reference
API Quick Reference
API Quick Reference
This is a condensed reference for the most common ObjectQL API operations.
Base Endpoint
Common Operations
📋 List Records
🔍 Search Records
👤 Get Single Record
or with filters:
➕ Create Record
✏️ Update Record
❌ Delete Record
🔢 Count Records
⚡ Execute Action
Filter Operators
| Operator | Description | Example |
|---|---|---|
= | Equal | ["status", "=", "active"] |
!= | Not equal | ["status", "!=", "deleted"] |
> | Greater than | ["age", ">", 18] |
>= | Greater or equal | ["price", ">=", 100] |
< | Less than | ["stock", "<", 10] |
<= | Less or equal | ["rating", "<=", 3] |
in | In array | ["status", "in", ["pending", "active"]] |
not in | Not in array | ["status", "not in", ["deleted", "archived"]] |
like | SQL LIKE pattern | ["name", "like", "%john%"] |
startswith | Starts with | ["email", "startswith", "admin"] |
endswith | Ends with | ["domain", "endswith", ".com"] |
contains | Contains substring | ["tags", "contains", "urgent"] |
between | Between range | ["price", "between", [100, 500]] |
Combining Filters
AND Condition
OR Condition
Complex Nested Logic
Pagination
Sorting
Single Field
Multiple Fields
Field Selection
Specific Fields Only
All Fields (Default)
Relationships (Expand/Join)
Basic Expand
Nested Expand
Expand with Filters
Aggregation
Aggregation Functions
count- Count recordssum- Sum valuesavg- Average valuemin- Minimum valuemax- Maximum value
Error Handling
Validation Error Response
Permission Error Response
Not Found Response
Special Variables
Use these in filters for dynamic values:
| Variable | Description |
|---|---|
$current_user | Current user's ID |
$current_user.role | Current user's role |
$today | Current date |
$now | Current timestamp |
Example:
REST-Style Endpoints
List
Get One
Create
Update
Delete
Metadata Endpoints
List All Objects
Get Object Schema
Get Field Metadata
List Actions
Tips & Best Practices
✅ DO
- Always specify
fieldsto reduce payload size - Use pagination for large datasets
- Add indexes for frequently filtered fields
- Use
expandinstead of multiple requests - Include authentication tokens
❌ DON'T
- Fetch all fields when you only need a few
- Query without pagination on large tables
- Make multiple requests when you can use
expand - Expose sensitive fields to unauthorized users
- Use raw SQL (ObjectQL prevents this by design)
Next Steps
Quick Tip: All examples use JSON-RPC format at POST /api/objectql. For REST endpoints, adapt to GET/POST/PUT/DELETE /api/data/:object.