Apps API
The Apps API allows you to manage applications within your tenant. Each app is a container for datatables, functions, and other resources.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/apps/ | List all apps |
| GET | /api/apps/{slug}/ | Get app details |
| POST | /api/apps/ | Create a new app |
| PUT | /api/apps/{slug}/ | Update an app |
| PATCH | /api/apps/{slug}/ | Partially update an app |
| DELETE | /api/apps/{slug}/ | Soft delete an app |
List Apps
Get a list of all apps in the current tenant.
- REST API
- Python
- JavaScript
curl -X GET https://your-site.taruvi.cloud/api/apps/ \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
{
"status": "success",
"message": "Data retrieved successfully",
"data": [
{
"id": 1,
"name": "Analytics App",
"slug": "analytics-app",
"description": "Analytics and reporting application",
"table_count": 5,
"settings": {
"display_name": "Analytics Dashboard",
"category": "analytics",
"icon_url": "https://api.example.com/media/app_settings/icons/analytics.png",
"primary_color": "#1976d2"
},
"created_at": "2025-12-12T10:00:00Z",
"updated_at": "2025-12-12T10:00:00Z"
}
],
"total": 1
}
import requests
headers = {"Authorization": "Bearer YOUR_TOKEN"}
response = requests.get(
"https://your-site.taruvi.cloud/api/apps/",
headers=headers
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/", {
headers: { "Authorization": "Bearer YOUR_TOKEN" }
})
const data = await response.json()
Get App Details
Get detailed information about a specific app.
- REST API
- Python
- JavaScript
curl -X GET https://your-site.taruvi.cloud/api/apps/{slug}/ \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
{
"status": "success",
"message": "Data retrieved successfully",
"data": {
"id": 1,
"name": "Analytics App",
"slug": "analytics-app",
"description": "Analytics and reporting application",
"table_count": 5,
"tables": [
{
"id": 1,
"name": "users",
"provider_type": "flat_table",
"is_materialized": true,
"physical_table_name": "analytics_app_users"
}
],
"settings": {
"id": 1,
"display_name": "Analytics Dashboard",
"icon": "app_settings/icons/analytics.png",
"icon_url": "https://api.example.com/media/app_settings/icons/analytics.png",
"primary_color": "#1976d2",
"secondary_color": "#dc004e",
"category": "analytics",
"max_functions": 100,
"max_datatables": 50,
"rate_limit_per_hour": 1000,
"documentation_url": "https://docs.example.com",
"support_email": "[email protected]",
"default_frontend_worker": null,
"default_frontend_worker_details": null,
"created_at": "2025-12-12T10:00:00Z",
"updated_at": "2025-12-12T10:00:00Z"
},
"created_at": "2025-12-12T10:00:00Z",
"updated_at": "2025-12-12T10:00:00Z",
"created_by": 1,
"modified_by": null
}
}
import requests
headers = {"Authorization": "Bearer YOUR_TOKEN"}
response = requests.get(
"https://your-site.taruvi.cloud/api/apps/{slug}/",
headers=headers
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/{slug}/", {
headers: { "Authorization": "Bearer YOUR_TOKEN" }
})
const data = await response.json()
Create App
Create a new app with optional settings.
- REST API
- Python
- JavaScript
curl -X POST https://your-site.taruvi.cloud/api/apps/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My New App",
"description": "Application description",
"settings": {
"display_name": "Custom Display Name",
"primary_color": "#ff0000",
"category": "analytics",
"max_functions": 200
}
}'
Response:
{
"status": "success",
"message": "App created successfully",
"data": {
"id": 2,
"name": "My New App",
"slug": "my-new-app",
"description": "Application description",
"table_count": 0,
"tables": [],
"settings": {
"id": 2,
"display_name": "Custom Display Name",
"icon": null,
"icon_url": null,
"primary_color": "#ff0000",
"secondary_color": "#dc004e",
"category": "analytics",
"max_functions": 200,
"max_datatables": 50,
"rate_limit_per_hour": 1000,
"documentation_url": "",
"support_email": "",
"default_frontend_worker": null,
"default_frontend_worker_details": null,
"created_at": "2025-12-12T11:00:00Z",
"updated_at": "2025-12-12T11:00:00Z"
},
"created_at": "2025-12-12T11:00:00Z",
"updated_at": "2025-12-12T11:00:00Z",
"created_by": 1,
"modified_by": null
}
}
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
response = requests.post(
"https://your-site.taruvi.cloud/api/apps/",
headers=headers,
json={
"name": "My New App",
"description": "Application description",
"settings": {
"display_name": "Custom Display Name",
"primary_color": "#ff0000",
"category": "analytics",
"max_functions": 200
}
}
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "My New App",
description: "Application description",
settings: {
display_name: "Custom Display Name",
primary_color: "#ff0000",
category: "analytics",
max_functions: 200
}
})
})
const data = await response.json()
Create App Without Settings
If you don't provide settings, default values are used:
- REST API
- Python
- JavaScript
curl -X POST https://your-site.taruvi.cloud/api/apps/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Simple App",
"description": "App with default settings"
}'
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
response = requests.post(
"https://your-site.taruvi.cloud/api/apps/",
headers=headers,
json={
"name": "Simple App",
"description": "App with default settings"
}
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "Simple App",
description: "App with default settings"
})
})
const data = await response.json()
The app will be created with:
display_name: Same as app name ("Simple App")primary_color:#1976d2(default blue)secondary_color:#dc004e(default pink)category:analytics(default)max_functions:100(default)max_datatables:50(default)rate_limit_per_hour:1000(default)
Update App
Update an app's basic information (name, description).
- REST API
- Python
- JavaScript
curl -X PUT https://your-site.taruvi.cloud/api/apps/{slug}/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated App Name",
"description": "Updated description"
}'
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
response = requests.put(
"https://your-site.taruvi.cloud/api/apps/{slug}/",
headers=headers,
json={
"name": "Updated App Name",
"description": "Updated description"
}
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/{slug}/", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "Updated App Name",
description: "Updated description"
})
})
const data = await response.json()
Note: To update app settings, use the App Settings API endpoints (documented below in the App Settings section).
Delete App
Soft delete an app (marks as inactive).
- REST API
- Python
- JavaScript
curl -X DELETE https://your-site.taruvi.cloud/api/apps/{slug}/ \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
{
"status": "success",
"message": "App deleted successfully"
}
import requests
headers = {"Authorization": "Bearer YOUR_TOKEN"}
response = requests.delete(
"https://your-site.taruvi.cloud/api/apps/{slug}/",
headers=headers
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/{slug}/", {
method: "DELETE",
headers: { "Authorization": "Bearer YOUR_TOKEN" }
})
const data = await response.json()
Settings in Response
List View (Lightweight)
When listing apps, only essential settings are included:
display_namecategoryicon_urlprimary_color
Detail View (Complete)
When retrieving a single app, complete settings are included with all fields.
Related Endpoints
See the App Settings section below for managing app settings and configurations.
Notes
- App slugs are auto-generated from the name
- Settings are automatically created when an app is created
- Deleting an app is a soft delete (marks as inactive)
- All datatables associated with a deleted app are also marked as inactive
App Settings
App Settings provide per-app configuration for branding, technical limits, and metadata. Each app can have customized settings including theme colors, icons, resource limits, and documentation links.
All app settings endpoints are nested under the app: /api/apps/{app_slug}/settings/. Each app has exactly one settings configuration.
App Settings Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/apps/{app_slug}/settings/ | Get app settings |
| POST | /api/apps/{app_slug}/settings/ | Create app settings (not recommended - auto-created) |
| PUT | /api/apps/{app_slug}/settings/ | Full update app settings |
| PATCH | /api/apps/{app_slug}/settings/ | Partial update app settings |
| DELETE | /api/apps/{app_slug}/settings/ | Not allowed |
Settings Overview
App Settings enable you to configure individual apps with:
- Branding: Custom colors and icons
- Categorization: Organize apps by type (Analytics, Integration, Storage)
- Resource Limits: Control maximum functions, datatables, and API rate limits
- Documentation: Link to app-specific docs and support contacts
- Frontend Worker: Set default frontend worker URL
Key Features
Automatic Creation
Settings are automatically created when you create an app:
- No need to manually create settings - they're auto-generated with defaults
- Each app gets one settings configuration
- Settings cannot be deleted (only updated)
- Default values are applied automatically (display name = app name, default colors, etc.)
Custom Settings on App Creation
You can provide custom settings when creating an app:
POST /api/apps/
{
"name": "My App",
"description": "App description",
"settings": {
"display_name": "Custom Display Name",
"primary_color": "#ff0000",
"category": "analytics"
}
}
Configuration Options
Display & Branding
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
display_name | string | No | "" | Display name for the app (max 255 chars) |
icon | file | No | null | App icon (max 5MB) |
primary_color | string | No | "#1976d2" | Primary theme color (hex format) |
secondary_color | string | No | "#dc004e" | Secondary theme color (hex format) |
Metadata
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
category | string | No | "analytics" | App category (analytics, integration, storage) |
Technical Limits
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
max_functions | integer | No | 100 | Maximum functions allowed |
max_datatables | integer | No | 50 | Maximum datatables allowed |
rate_limit_per_hour | integer | No | 1000 | API rate limit per hour |
Documentation
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
documentation_url | string (URL) | No | "" | Link to app documentation |
support_email | string (email) | No | "" | Support contact email |
Frontend Worker
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
default_frontend_worker_url | string (URL) | No | null | Read-only URL to default frontend worker |
Get App Settings
- REST API
- Python
- JavaScript
curl -X GET https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/ \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
{
"success": true,
"message": "App settings retrieved successfully",
"data": {
"display_name": "My Analytics App",
"icon": "/media/app_settings/icons/icon_abc123.png",
"icon_url": "http://localhost:8000/media/app_settings/icons/icon_abc123.png",
"primary_color": "#1976d2",
"secondary_color": "#dc004e",
"category": "analytics",
"max_functions": 100,
"max_datatables": 50,
"rate_limit_per_hour": 1000,
"documentation_url": "https://docs.example.com",
"support_email": "[email protected]",
"default_frontend_worker_url": "https://my-app.example.com",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}
import requests
headers = {"Authorization": "Bearer YOUR_TOKEN"}
response = requests.get(
"https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/",
headers=headers
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/", {
headers: { "Authorization": "Bearer YOUR_TOKEN" }
})
const data = await response.json()
Update App Settings
Update specific fields only:
- REST API
- Python
- JavaScript
curl -X PATCH https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"max_functions": 300,
"rate_limit_per_hour": 3000
}'
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
response = requests.patch(
"https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/",
headers=headers,
json={
"max_functions": 300,
"rate_limit_per_hour": 3000
}
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
max_functions: 300,
rate_limit_per_hour: 3000
})
})
const data = await response.json()
Upload Files
Upload icon using multipart form data:
- REST API
- Python
- JavaScript
curl -X PATCH "https://your-site.taruvi.cloud/api/apps/my-analytics-app/settings/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "icon=@/path/to/icon.png" \
-F "primary_color=#ff0000"
import requests
headers = {"Authorization": "Bearer YOUR_TOKEN"}
response = requests.patch(
"https://your-site.taruvi.cloud/api/apps/my-analytics-app/settings/",
headers=headers,
files={"icon": open("/path/to/icon.png", "rb")},
data={"primary_color": "#ff0000"}
)
data = response.json()
const formData = new FormData()
formData.append("icon", fileInput.files[0])
formData.append("primary_color", "#ff0000")
const response = await fetch("https://your-site.taruvi.cloud/api/apps/my-analytics-app/settings/", {
method: "PATCH",
headers: { "Authorization": "Bearer YOUR_TOKEN" },
body: formData
})
const data = await response.json()
Set Default Frontend Worker
- REST API
- Python
- JavaScript
curl -X PATCH https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"default_frontend_worker": 123
}'
import requests
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
response = requests.patch(
"https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/",
headers=headers,
json={"default_frontend_worker": 123}
)
data = response.json()
const response = await fetch("https://your-site.taruvi.cloud/api/apps/{app_slug}/settings/", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({ default_frontend_worker: 123 })
})
const data = await response.json()
The response will include default_frontend_worker_url with the full URL.
Validation Rules
Color Validation
- Must be valid hex color format:
#RRGGBB - Examples:
#1976d2,#FFFFFF,#000000
Number Validation
max_functions,max_datatables,rate_limit_per_hourmust be >= 0
File Validation
- Max Size: 5MB per file
- Allowed Formats: png, jpg, jpeg, svg, ico, webp, gif
Category Validation
- Must be one of:
analytics,integration,storage
Frontend Worker Validation
- Worker must belong to the same app
- Can be set to
nullto clear the default worker
Field Exclusions
The following fields are intentionally excluded from API responses:
id: Apps and settings useslugas the primary identifierdefault_frontend_worker: Only the URL is returned (write-only for updates)
Performance Considerations
List vs Detail Views
- List View: Returns lightweight settings (4 fields) for better performance
- Detail View: Returns complete settings (all fields) for full information
Caching
App settings are frequently accessed and should be cached at the application level for optimal performance.