Skip to main content

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.yaml for 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:

RelationDescription
inf:appLink to a single app
inf:appsLink to the apps collection
inf:apps-listLink to the flat apps list
inf:ownerLink to the app's owner
inf:draftLink to the user's draft of this app
inf:app-sharesLink to all shares
inf:app-shareTemplated link to a specific share (by principalId)
inf:app-rolesLink to app role definitions
inf:app-tagsLink to app tags
inf:app-tagTemplated link to a specific tag assignment (by tagId)
inf:app-tokensLink to app tokens
inf:favoriteToggle favorite status
inf:copyCopy the app
inf:printExport app as PDF (array with two entries)
inf:export-bundleExport app bundle
inf:cloud-publishPublish app to cloud
inf:apps-recentLink to recently viewed apps
inf:apps-draftsLink to the user's drafts across all apps
inf:app-suggestionsLink to keyword-based app suggestions
inf:app-suggestions-aiLink to AI-powered app suggestions
inf:app-chatLink to the app's embedded copilot chat
inf:app-statsLink to app usage statistics
inf:app-stats-tablesLink to app workspace table listing
inf:app-stats-apiLink to app API invocation history
inf:app-agentsLink to app agent listing
inf:app-messagesLink to app message delivery queue
inf:app-webhooksLink to app webhook routes and stats
inf:entrypointLink to the app's view entry point (single app only)
inf:libraryLink to the app's file library (single app only)
inf:library-contentsLink to raw library contents (single app only)
editEdit the app (create a draft)
shareTemplated share page URL (with token placeholder)

Permissions

Apps use a team role-based permission system:

PermissionRequired RoleUsage
createMemberCreate new apps (collection-level only)
runMemberView and execute apps
writeMember+Edit app content and settings
editMember+Alias for write (used by clients)
deleteMember+Delete apps
renameMember+Rename apps
copyMember+Copy apps
sharePublisher or SuperuserShare apps with teams/users
assignTagsMember+Assign tags to apps
changeOwnerAdmin or SuperuserTransfer 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-list alongside other report types
  • They have a search driver (app) for global search
  • They appear in the "New > Reports" menu when the ai feature is enabled