Apps Overview
Apps are AI-powered interactive applications that combine custom HTML, CSS, and JavaScript with access to Informer datasets and AI capabilities.
Key Concepts
Apps vs Reports: Apps are a type of report that uses HTML/CSS/JavaScript to create custom interactive experiences. They appear in the same galleries and lists as other report types.
Draft/Edit Workflow: Apps use a draft-based editing model:
- Creating a draft (
POST /apps/{id}/_edit) creates a personal copy for editing - Changes to drafts don't affect the published version
- Committing a draft (
POST /apps/{id}/draft/_commit) publishes changes - Discarding a draft (
DELETE /apps/{id}/draft) abandons changes
Library-Based Storage: Each app has an associated Library that stores its files (HTML, CSS, JavaScript, images, etc.). Files are accessed through the /contents/ routes.
Access Control: Apps support:
- Team-based ownership
- Share-based access (via AppShare model)
- Token-based external sharing
- Permission levels: Member (run), Member+ (write), Publisher (share), Admin (ownership)
- Custom roles via
informer.yamlfor app-specific access control
Common Workflows
Creating an App
// 1. Create the app
POST /api/apps
{
"type": "report",
"name": "Sales Dashboard",
"description": "Interactive sales analytics",
"datasets": [
{
"datasetId": "abc-123",
"alias": "sales",
"label": "Sales Data"
}
]
}
// 2. Add files to the app's library
PUT /api/apps/{id}/contents/index.html
{
"content": "<html>...</html>",
"contentType": "text/html"
}
Editing an App
// 1. Create a draft
POST /api/apps/{id}/_edit
// Returns the draft app with editingId = {id}
// 2. Modify draft files
PUT /api/apps/{draftId}/contents/index.html
{
"content": "<html>Updated...</html>"
}
// 3. Commit the draft
POST /api/apps/{id}/draft/_commit
// Publishes changes to original app, deletes draft
// Or discard
DELETE /api/apps/{id}/draft
// Deletes draft without affecting original
Sharing an App
// Share with a team
PUT /api/apps/{id}/shares/marketing
{
"accessLevel": 1
}
// Get all shares
GET /api/apps/{id}/shares
// Check data access requirements
GET /api/apps/{id}/data-access
API Endpoints
The Apps API is organized into several functional areas:
- Core CRUD - List, create, retrieve, update, delete apps
- Draft Management - Draft-based editing workflow
- File Management - Upload, read, write, patch app files
- Ownership & Sharing - Owner management and share permissions
- Tags - Tag assignment and management
- Tokens - External sharing via tokens
- Actions - Copy, print, and other operations
- Roles - Custom role definitions and resolution
- Server Routes - Server-side route handlers (sandboxed V8)
- Persistence - Dedicated Postgres workspace and migrations
- Usage Stats - View counts, API invocation history, and workspace storage
- Embedded Chat - Per-user AI copilot chat sessions
- AI Suggestions - Data-driven and AI-powered app creation suggestions
- Agents - AI agents with event-driven execution, cron scheduling, and tool calling
- Messages - Push notification and email delivery queue with retry and history
- Webhooks - Public webhook endpoints for external service callbacks
Key Concepts
Custom Roles: Apps can define custom roles in informer.yaml that go beyond the standard team permission levels. Roles are assigned via shares and checked in both client-side code and server route handlers. See Roles.
Server Routes: Files in the server/ directory define server-side handlers that run in sandboxed V8 isolates. Handlers can query the app's Postgres workspace and make authenticated API calls. See Server Routes.
Webhooks: Files in the webhooks/ directory define public endpoints that external services can call without authentication. Webhook handlers run with the app owner's credentials. See Webhooks.
Persistence: Each app can have a dedicated Postgres schema for storing custom data. SQL migrations in migrations/ are run during deploy. Server route handlers access this data via the query() callback. See Persistence.
AI Agents: Apps can define autonomous AI agents in informer.yaml that respond to events, run on cron schedules, and call app tools and external toolkits. See Agents.
HAL Relations
Apps expose the following HAL relations:
| Relation | Description |
|---|---|
inf:app | Link to a single app |
inf:apps | Link to the apps collection |
inf:apps-list | Link to the flat apps list |
inf:owner | Link to the app's owner |
inf:draft | Link to the user's draft of this app |
inf:app-shares | Link to all shares |
inf:app-share | Templated link to a specific share (by principalId) |
inf:app-roles | Link to app role definitions |
inf:app-tags | Link to app tags |
inf:app-tag | Templated link to a specific tag assignment (by tagId) |
inf:app-tokens | Link to app tokens |
inf:favorite | Toggle favorite status |
inf:copy | Copy the app |
inf:print | Export app as PDF (array with two entries) |
inf:export-bundle | Export app bundle |
inf:cloud-publish | Publish app to cloud |
inf:apps-recent | Link to recently viewed apps |
inf:apps-drafts | Link to the user's drafts across all apps |
inf:app-suggestions | Link to keyword-based app suggestions |
inf:app-suggestions-ai | Link to AI-powered app suggestions |
inf:app-chat | Link to the app's embedded copilot chat |
inf:app-stats | Link to app usage statistics |
inf:app-stats-tables | Link to app workspace table listing |
inf:app-stats-api | Link to app API invocation history |
inf:app-agents | Link to app agent listing |
inf:app-messages | Link to app message delivery queue |
inf:app-webhooks | Link to app webhook routes and stats |
inf:entrypoint | Link to the app's view entry point (single app only) |
inf:library | Link to the app's file library (single app only) |
inf:library-contents | Link to raw library contents (single app only) |
edit | Edit the app (create a draft) |
share | Templated share page URL (with token placeholder) |
Permissions
Apps use a team role-based permission system:
| Permission | Required Role | Usage |
|---|---|---|
create | Member | Create new apps (collection-level only) |
run | Member | View and execute apps |
write | Member+ | Edit app content and settings |
edit | Member+ | Alias for write (used by clients) |
delete | Member+ | Delete apps |
rename | Member+ | Rename apps |
copy | Member+ | Copy apps |
share | Publisher or Superuser | Share apps with teams/users |
assignTags | Member+ | Assign tags to apps |
changeOwner | Admin or Superuser | Transfer app ownership |
Model Structure
An App has the following key fields:
{
id: string; // UUID
type: string; // App driver type (e.g., "report")
name: string; // Display name
slug?: string; // URL-friendly identifier
ownerId: string; // Principal ID of owner
naturalId: string; // ownerId:slug or id (computed)
description?: string; // Optional description
defn: object; // App definition (driver-specific)
settings: object; // App settings
libraryId?: string; // Associated library UUID
editingId?: string; // If this is a draft, ID of original
shared: boolean; // Whether app is shared
defnUpdatedAt?: Date; // Last definition change
createdAt: Date;
updatedAt: Date;
}
Search and Discovery
Apps integrate with the global search and report-list systems:
- They appear in
/api/reports-listalongside other report types - They have a search driver (
app) for global search - They appear in the "New > Reports" menu when the
aifeature is enabled