Item Operations
CRUD operations for individual database items.
Complete API reference for TerraScale database operations.
https://api.terrascale.ioAll endpoints return JSON responses and use standard HTTP status codes.
All API requests require authentication. Use one of:
Authorization: Bearer ts_live_your_api_keyAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...See Authentication for details.
Item Operations
CRUD operations for individual database items.
Query Operations
Query and Scan for retrieving multiple items.
Batch Operations
Batch read/write for bulk operations.
Transactions
Transactional operations for atomic multi-item updates.
Repositories
Repository operations for typed entities.
SQL API
SQL interface for SQL-style queries.
Health
Health endpoints for monitoring.
{ "pk": "user#123", "sk": "profile", "data": { "name": "John Doe" }, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:30:00Z"}{ "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4", "title": "Not Found", "status": 404, "detail": "Item not found"}| Status | Description |
|---|---|
| 200 | OK - Request succeeded |
| 201 | Created - Resource created |
| 204 | No Content - Success, no body |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing authentication |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn’t exist |
| 409 | Conflict - Condition check failed |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Paginated endpoints use cursor-based pagination:
Request:
{ "limit": 20, "cursor": null}Response:
{ "items": [...], "nextCursor": "eyJsYXN0S2V5Ijo...", "count": 20}To get the next page, pass the nextCursor value as cursor in the next request.
Rate limits depend on your plan tier:
| Plan | Limit |
|---|---|
| Free | 100 requests/second |
| Pro | 1,000 requests/second |
| Enterprise | Custom |
When rate limited, the API returns HTTP 429 with a Retry-After header.
See Rate Limits for details.
| Operation | Required Scope |
|---|---|
| Read items | database:read or database:* |
| Write items | database:write or database:* |
| Read repositories | repository:read or repository:* |
| Write repositories | repository:write or repository:* |