Skip to content

Applications

Every table in oikapi belongs to an application. Applications are logical business domains like “CRM”, “HR”, or “Inventory” that group related tables and enforce security boundaries.

  • Organization – Find related tables quickly
  • Permissions – Grant a role access to an entire application with one rule instead of per-table
  • Security boundaries – Business rules can only access tables within their own application
  • Packaging – Export an entire application as an installable .oikapp package

The system application is created automatically and contains platform tables: users, permissions, roles, audit logs, business rules. It cannot be deleted and is accessible from all other applications.

POST /api/applications
{
"name": "support",
"display_name": "Customer Support",
"description": "Support tickets and knowledge base",
"category": "business"
}

Name rules: lowercase, letters/numbers/underscores only, must start with a letter.

Categories: admin, business, operations

Every table must specify its application at creation time. The application is set via the URL path:

POST /api/apps/support/tables
{
"name": "tickets",
"display_name": "Tickets"
}
GET /api/applications
DELETE /api/applications/{name}

All tables must be deleted first. System applications cannot be deleted.

Business rules running on a table in one application cannot access tables in another application unless explicitly granted cross-app access. This is a security feature – your CRM rules can’t accidentally read HR salary data.

A bare table name refers to a table in the rule’s own application. To reach another application, use a dotted application.table reference — which is only allowed when cross-app access has been granted.

Same-app access (allowed):

// Rule on customers (application: crm)
const deals = list('deals', ''); // OK - same app
const contacts = list('contacts', ''); // OK - same app

Cross-app access (requires a grant):

// Rule on customers (application: crm)
const salaries = list('hr.employees', ''); // BLOCKED unless cross-app access is granted

See Business Rules for how to declare cross-app access when needed.