NoSQL Tables
ZeroDB provides schema-free NoSQL tables for storing structured data alongside vectors and memory.
Create a Table
curl -X POST https://api.ainative.studio/api/v1/public/zerodb/tables \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "customers",
"description": "Customer records"
}'
Insert Rows
curl -X POST https://api.ainative.studio/api/v1/public/zerodb/tables/customers/rows \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rows": [
{"name": "Alice", "email": "alice@example.com", "plan": "pro"},
{"name": "Bob", "email": "bob@example.com", "plan": "free"}
]
}'
Query Rows
curl -X POST https://api.ainative.studio/api/v1/public/zerodb/tables/customers/query \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filters": {"plan": "pro"},
"limit": 10,
"offset": 0
}'
Update Rows
curl -X PUT https://api.ainative.studio/api/v1/public/zerodb/tables/customers/rows \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filters": {"email": "alice@example.com"},
"update": {"plan": "business"}
}'
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /zerodb/tables | Create a table |
| GET | /zerodb/tables | List tables |
| POST | /zerodb/tables/{name}/rows | Insert rows |
| POST | /zerodb/tables/{name}/query | Query rows with filters |
| PUT | /zerodb/tables/{name}/rows | Update rows |
| DELETE | /zerodb/tables/{name}/rows | Delete rows |
| DELETE | /zerodb/tables/{name} | Delete a table |