Tables
Tables are the core data structure in oikapi. Each table belongs to an application and automatically gets REST API endpoints for CRUD operations.
Creating tables
Section titled “Creating tables”POST /api/apps/{app}/tables{ "name": "projects", "display_name": "Projects"}The table is immediately available at /api/apps/pm/tables/projects/records.
Name rules: lowercase, letters/numbers/underscores, must start with a letter, unique within an application (the same name can exist in different applications).
Table modes
Section titled “Table modes”| Mode | Create | Read | Update | Delete |
|---|---|---|---|---|
read_write | Yes | Yes | Yes | Yes |
append_only | Yes | Yes | No | No |
read_only | No | Yes | No | No |
Set the mode at creation time:
POST /api/apps/{app}/tables{ "name": "event_log", "display_name": "Event Log", "table_mode": "append_only"}Table types
Section titled “Table types”| Type | Storage | Use case |
|---|---|---|
standard | Regular table with storage | Every table |
standard is currently the only table type — every table is physically stored. To read
several tables as one list, see Union Views, which are a separate
kind of object and are never registered as tables.
Listing tables
Section titled “Listing tables”GET /api/tablesReturns all tables the authenticated user has access to across all applications. To list tables within a specific application use GET /api/apps/{app}/tables.
Updating table metadata
Section titled “Updating table metadata”PUT /api/apps/{app}/tables/{name}{ "display_name": "Active Projects"}Deleting tables
Section titled “Deleting tables”DELETE /api/apps/{app}/tables/{name}Deleting a table is a soft delete – it is deactivated and excluded from the API, but the underlying data and audit trail are preserved at the database level.
Searchability
Section titled “Searchability”Tables and individual fields can be flagged as searchable or non-searchable, controlling whether they appear in global search results.