System Tables Reference
Every system-managed table in FlowOS — field names, types, and descriptions. All tables are queryable via the Records API and SQL endpoint.
FlowOS maintains a set of system tables that back every module. System table slugs are reserved — you cannot create a user table with the same slug. All system tables are accessible via /api/v1/tables/:slug/records subject to the caller's role permissions.
_ are system-managed and cannot be set on create or update. Fields marked computed are derived at read time and are not stored on disk — they cannot be used in filter conditions unless a stored generated column backs them.ITSM Tables
incidentsEvery service disruption record. Central table for incident management.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID primary key. Prefixed inc_. |
| number | varchar(20) | Auto-incremented human number (INC-NNNN). Unique per workspace. |
| title | text | Short description. Max 255 chars. |
| description | text | Full description. Markdown. |
| severity | enum | P1 | P2 | P3 | P4 |
| urgency | enum | low | medium | high |
| priority | varchar(20) | computed from severity × urgency. |
| status | enum | open | investigating | identified | monitoring | resolved | closed |
| category | varchar(100) | hardware | software | network | security | access | other |
| subcategory | varchar(100) | Workspace-configurable subcategory. |
| source | varchar(50) | portal | email | monitoring | api | workflow | phone |
| reported_by | varchar(26) | FK → users.id |
| assigned_team | varchar(100) | Team slug. |
| assigned_to | varchar(26) | FK → users.id |
| impacted_services | text[] | Array of service name strings. |
| cmdb_items | varchar(26)[] | Array of FK → cmdb_items.id |
| related_problems | varchar(26)[] | Array of FK → problems.id |
| related_changes | varchar(26)[] | Array of FK → changes.id |
| duplicate_of | varchar(26) | FK → incidents.id. Set if this is a duplicate. |
| tags | text[] | Free-form labels. |
| environment | enum | development | staging | production |
| root_cause | text | Root cause analysis. |
| resolution | text | Resolution steps taken. |
| workaround | text | Temporary workaround. |
| visibility | enum | internal | public |
| sla | jsonb | Computed SLA state object. |
| first_response_at | timestamptz | When first public comment added by assigned team. Auto-set. |
| resolved_at | timestamptz | When status became resolved. Auto-set. |
| closed_at | timestamptz | When status became closed. Auto-set. |
| reopen_count | integer | Number of times reopened. Auto-incremented. |
| custom_fields | jsonb | Workspace-defined custom field values. |
| created_at | timestamptz | Record creation time. Auto-set. |
| updated_at | timestamptz | Last modification time. Auto-set. |
| created_by | varchar(26) | FK → users.id. Auto-set. |
| workspace_id | varchar(26) | FK → workspaces.id. Auto-set. |
changesChange requests with CAB workflow, approval tracking, and implementation windows.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID primary key. Prefixed chg_. |
| number | varchar(20) | Auto-incremented (CHG-NNNN). |
| title | text | Short summary. |
| description | text | Detailed description. |
| type | enum | standard | normal | emergency |
| category | varchar(100) | hardware | software | network | database | security | process | other |
| risk | enum | low | medium | high | critical |
| impact | enum | low | medium | high | critical |
| status | enum | draft | review | approved | rejected | scheduled | implementing | completed | rolled_back | cancelled |
| implementation_plan | text | Step-by-step plan. |
| rollback_plan | text | Rollback steps. |
| test_plan | text | Post-implementation validation steps. |
| business_justification | text | Business reason for the change. |
| scheduled_start | timestamptz | Planned implementation start. |
| scheduled_end | timestamptz | Planned implementation end. |
| actual_start | timestamptz | When implementation actually began. |
| actual_end | timestamptz | When implementation finished. |
| assigned_team | varchar(100) | Implementing team slug. |
| assigned_to | varchar(26) | FK → users.id |
| requested_by | varchar(26) | FK → users.id |
| cab_reviewers | varchar(26)[] | Array of FK → users.id. All must approve. |
| approvals | jsonb | Array of approval records [{userId,status,comment,ts}]. |
| cmdb_items | varchar(26)[] | CIs being changed. |
| related_incidents | varchar(26)[] | Incidents this change addresses. |
| related_problems | varchar(26)[] | Problems this change resolves. |
| tags | text[] | Labels. |
| custom_fields | jsonb | Custom field values. |
| created_at | timestamptz | Auto-set. |
| updated_at | timestamptz | Auto-set. |
| created_by | varchar(26) | FK → users.id |
problemsRoot cause investigations and known errors.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed prb_. |
| number | varchar(20) | PRB-NNNN. |
| title | text | Short description. |
| description | text | Full description. |
| status | enum | open | under_investigation | root_cause_identified | known_error | resolved | closed |
| category | varchar(100) | Same options as incidents. |
| impact | enum | low | medium | high | critical |
| priority | enum | low | medium | high | critical. Set manually. |
| assigned_team | varchar(100) | Team leading investigation. |
| assigned_to | varchar(26) | FK → users.id |
| related_incidents | varchar(26)[] | Linked incidents. |
| related_changes | varchar(26)[] | Linked changes (fix). |
| cmdb_items | varchar(26)[] | Implicated CIs. |
| root_cause | text | Documented root cause. |
| workaround | text | Temporary workaround. |
| workaround_effective | boolean | Whether workaround reliably prevents symptom. |
| permanent_fix | text | Permanent resolution description. |
| is_known_error | boolean | Computed: true when status = known_error. |
| tags | text[] | Labels. |
| resolved_at | timestamptz | Auto-set on resolution. |
| created_at | timestamptz | Auto-set. |
| updated_at | timestamptz | Auto-set. |
catalog_itemsService catalog item definitions — what employees can request.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed cat_. |
| name | text | Display name. |
| slug | varchar(100) | URL-safe identifier. Unique. |
| description | text | Full description. Markdown. |
| short_description | varchar(500) | One-line summary. |
| category | varchar(100) | Catalog category path. |
| icon | varchar(100) | Lucide icon slug or image URL. |
| status | enum | draft | active | retired |
| visibility | enum | all_users | groups_only | hidden |
| allowed_groups | text[] | Group IDs for groups_only visibility. |
| fulfillment_type | enum | workflow | manual | automated |
| fulfillment_workflow | varchar(26) | FK → workflows.id |
| approval_required | boolean | Whether approval gate is needed. |
| approvers | jsonb | Approver config object. |
| approval_timeout_hours | integer | Auto-reject after N business hours. |
| sla_hours | integer | Target fulfillment hours. |
| form_fields | jsonb | Form field definitions array. |
| cost | decimal(12,2) | Display cost. |
| cost_currency | char(3) | ISO 4217 currency. |
| tags | text[] | Search tags. |
| order | integer | Display order within category. |
| created_at | timestamptz | Auto-set. |
| updated_at | timestamptz | Auto-set. |
catalog_requestsSubmitted service requests with their field responses and fulfillment status.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed creq_. |
| number | varchar(20) | REQ-NNNN. |
| catalog_item_id | varchar(26) | FK → catalog_items.id |
| requested_by | varchar(26) | FK → users.id |
| requested_for | varchar(26) | FK → users.id. Beneficiary. |
| status | enum | submitted | pending_approval | approved | rejected | fulfilling | fulfilled | cancelled |
| fields | jsonb | Key-value map of form responses. |
| approval_status | enum | not_required | pending | approved | rejected |
| approvers | jsonb | Approval records array. |
| workflow_run_id | varchar(26) | FK → workflow_runs.id. Set when fulfillment starts. |
| fulfillment_notes | text | Notes from the fulfiller. |
| fulfilled_at | timestamptz | Auto-set when status → fulfilled. |
| sla | jsonb | SLA tracking object. |
| created_at | timestamptz | Submission time. |
| updated_at | timestamptz | Auto-set. |
cmdb_itemsConfiguration items — every tracked component of IT infrastructure.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed ci_. |
| number | varchar(20) | CI-NNNN. |
| name | text | Display name. |
| class | varchar(100) | CI class slug (server, database, application, etc.). |
| status | enum | active | maintenance | decommissioned | retired |
| environment | enum | development | staging | production |
| description | text | Free-text description. |
| owner_team | varchar(100) | Owning team slug. |
| owner_user_id | varchar(26) | FK → users.id |
| tags | text[] | Labels. |
| external_id | text | ID in external system. |
| attributes | jsonb | Class-specific attributes (hostname, ipAddresses, engine, etc.). |
| created_at | timestamptz | Auto-set. |
| updated_at | timestamptz | Auto-set. |
cmdb_relationshipsDirected edges in the CI topology graph.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK. |
| source_id | varchar(26) | FK → cmdb_items.id. The "from" CI. |
| target_id | varchar(26) | FK → cmdb_items.id. The "to" CI. |
| type | varchar(100) | depends_on | runs_on | hosted_by | connects_to | part_of | owned_by | uses | backs_up_to | fails_over_to | monitors |
| label | text | Optional human label for this specific relationship. |
| created_at | timestamptz | Auto-set. |
| created_by | varchar(26) | FK → users.id |
knowledge_articlesKnowledge base articles with versioning and portal visibility control.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed kb_. |
| number | varchar(20) | KB-NNNN. |
| title | text | Article title. |
| content | text | Markdown body. |
| summary | varchar(500) | Auto-generated excerpt or manual override. |
| status | enum | draft | review | published | archived |
| category | text | Path category, e.g. "Networking/VPN". |
| article_type | enum | how_to | troubleshooting | faq | reference | known_error | policy | release_note |
| author_id | varchar(26) | FK → users.id |
| reviewers | varchar(26)[] | FK → users.id[] |
| visibility | enum | internal | portal | public |
| allowed_groups | text[] | Group IDs for restricted portal visibility. |
| related_incidents | varchar(26)[] | FK → incidents.id[] |
| related_problems | varchar(26)[] | FK → problems.id[] |
| cmdb_items | varchar(26)[] | FK → cmdb_items.id[] |
| tags | text[] | Search tags. |
| version | integer | Current version number. Starts at 1. |
| views | integer | Cumulative view count. |
| helpful | integer | "Was this helpful? Yes" count. |
| not_helpful | integer | "Was this helpful? No" count. |
| published_at | timestamptz | First publish time. |
| expires_at | timestamptz | Auto-archive after this time. |
| locale | varchar(10) | BCP 47 language tag. Default: en. |
| created_at | timestamptz | Auto-set. |
| updated_at | timestamptz | Auto-set. |
releasesRelease records bundling one or more change requests into a scheduled deployment unit.
| Field | Type | Description |
|---|---|---|
| name | string | Release name. Required. |
| displayName | string | Alternate display label. |
| code | string | Short release code (e.g. R-2026-Q2). |
| number | string | Auto-incremented release number. |
| shortDescription | string | One-line summary. |
| description | string | Full description. Markdown. |
| status | enum | new | in_progress | pending | on_hold | resolved | closed | cancelled |
| priority | enum | critical | high | medium | low | planning |
| severity | enum | critical | high | medium | low | planning |
| impact | enum | high | medium | low |
| urgency | enum | high | medium | low |
| category | string | Category label. |
| subcategory | string | Subcategory label. |
| openedAt | timestamptz | When the release was opened. |
| dueAt | timestamptz | Target release date. |
| resolvedAt | timestamptz | When marked resolved. |
| closedAt | timestamptz | When closed. |
| workNotes | text | Internal work notes. |
| closeNotes | text | Closure notes. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| linkedChangeIds | reference[] | FK[] → change_requests. Changes bundled into this release. |
| releaseManagerId | reference | FK → users. Release manager. |
| deployedBy | reference | FK → users. Who deployed. |
| ownedBy | reference | FK → users. Business owner. |
| assignedTo | reference | FK → users. Assignee. |
| tenantId | string | Tenant ID. Auto-set, readonly. |
| workspaceId | string | Workspace ID. Auto-set, readonly. |
| createdBy | reference | FK → users. Auto-set. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
service_offeringsLive service definitions — what the IT organisation actively delivers. Referenced by SLA targets and catalog items.
| Field | Type | Description |
|---|---|---|
| name | string | Service name. Required. |
| displayName | string | Alternate display label. |
| code | string | Service code. |
| shortDescription | string | One-line description. |
| description | string | Full description. Markdown. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version of this offering. |
| effectiveFrom | timestamptz | Date this offering version became active. |
| effectiveTo | timestamptz | Date this offering version expires. |
| conditions | jsonb | Eligibility condition rules. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| portfolioId | reference | FK → service_portfolios. |
| serviceSpecId | reference | FK → service_specs. Specification this offering implements. |
| serviceBlueprintId | reference | FK → service_blueprints. Blueprint this offering is based on. |
| ownedBy | reference | FK → users. Business owner. |
| assignedTo | reference | FK → users. Technical owner. |
| tenantId | string | Tenant ID. Auto-set, readonly. |
| workspaceId | string | Workspace ID. Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Workflow Tables
workflowsWorkflow definitions — triggers, nodes, edges, and metadata.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed wf_. |
| name | text | Display name. |
| description | text | Internal description. |
| status | enum | draft | active | inactive | archived |
| trigger | jsonb | Trigger definition object. |
| nodes | jsonb | Array of node definition objects. |
| edges | jsonb | Array of edge definition objects. |
| active_version | integer | Currently running version number. |
| draft_version | integer | Unpublished draft version. |
| run_count | bigint | Total lifetime execution count. |
| error_count | bigint | Total lifetime failed run count. |
| last_run_at | timestamptz | When the most recent run started. |
| last_error_at | timestamptz | When the most recent failure occurred. |
| tags | text[] | Labels for filtering. |
| created_at | timestamptz | Auto-set. |
| updated_at | timestamptz | Auto-set. |
| created_by | varchar(26) | FK → users.id |
workflow_runsIndividual execution records — status, input/output, and node-level trace.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed run_. |
| workflow_id | varchar(26) | FK → workflows.id |
| version | integer | Which workflow version was executed. |
| status | enum | queued | running | completed | failed | cancelled | paused |
| trigger_type | varchar(50) | schedule | webhook | record_event | itsm_event | manual | sub_workflow |
| trigger_payload | jsonb | Raw trigger payload. |
| input | jsonb | Resolved input object. |
| output | jsonb | Final run output (last node output or explicit return). |
| error | jsonb | { code, message, nodeId } if failed. |
| trace | jsonb | Array of node execution records with timing and I/O. |
| variables | jsonb | Final state of all vars.* variables. |
| attempt | integer | Retry attempt number (1 = first). |
| duration_ms | integer | Total execution time in ms. |
| queued_at | timestamptz | When run was enqueued. |
| started_at | timestamptz | When execution actually began. |
| completed_at | timestamptz | When execution finished (any terminal state). |
| triggered_by | varchar(26) | User or token that triggered (manual runs). Null for automated. |
| parent_run_id | varchar(26) | FK → workflow_runs.id for sub-workflow runs. |
Platform Tables
rolesRBAC role definitions. Roles own a permission set and are assigned to users per workspace.
| Field | Type | Description |
|---|---|---|
| key | string | Stable role identifier (e.g. admin, agent). Required, unique. |
| name | string | Display name. Required. |
| displayName | string | Alternate display label. |
| description | string | Role description. |
| permissions | list | Array of permission scope strings. |
| isSystem | boolean | System roles are locked — their key and core permissions cannot be changed. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
role_assignmentsJunction table mapping users to roles within a workspace.
| Field | Type | Description |
|---|---|---|
| roleId | reference | FK → roles. Required. |
| userId | reference | FK → users. Required. |
| assignedBy | string | User ID of the admin who made this assignment. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
groupsUser groups used for assignment routing, notification targeting, and access control.
| Field | Type | Description |
|---|---|---|
| name | string | Group name. Required. |
| description | string | Group description. |
| roleIds | reference[] | FK[] → roles. Roles inherited by all group members. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
group_membersJunction table linking users (or child groups) to groups.
| Field | Type | Description |
|---|---|---|
| groupId | reference | FK → groups. Required. |
| refId | string | User ID or child group ID. Required. |
| refType | enum | user | group — what refId points to. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
departmentsOrganisational department hierarchy. Supports nested departments via parentId.
| Field | Type | Description |
|---|---|---|
| name | string | Department name. Required. |
| code | string | Short code (e.g. ENG, OPS). |
| parentId | reference | FK → departments. Parent department for nesting. |
| managerId | reference | FK → users. Department head. |
| headcount | integer | Number of people in this department. |
| costCenter | string | Finance cost center code. |
| description | string | Description. |
| isActive | boolean | Whether this department is active. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
usersPlatform user accounts. One record per person across all workspaces they belong to.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed usr_. |
| varchar(320) | Email address. Unique across the instance. | |
| name | text | Display name. |
| first_name | varchar(100) | First name. |
| last_name | varchar(100) | Last name. |
| avatar_url | text | Profile picture URL. |
| status | enum | active | invited | deactivated | suspended |
| phone | varchar(30) | Phone number (E.164). |
| timezone | varchar(50) | IANA timezone. |
| locale | varchar(10) | BCP 47 language preference. |
| mfa_enabled | boolean | Whether MFA is configured. |
| mfa_methods | text[] | Active MFA methods: totp, webauthn. |
| last_login_at | timestamptz | Most recent successful login. |
| last_login_ip | inet | IP of most recent login. |
| invited_at | timestamptz | When invitation was sent. |
| invited_by | varchar(26) | FK → users.id. Who sent the invite. |
| sso_provider | varchar(50) | SSO provider slug if user uses SSO. |
| sso_subject | text | SSO provider subject/ID for this user. |
| created_at | timestamptz | Account creation time. |
| updated_at | timestamptz | Auto-set. |
workspace_membersJunction table linking users to workspaces with their role assignments.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK. |
| workspace_id | varchar(26) | FK → workspaces.id |
| user_id | varchar(26) | FK → users.id |
| roles | text[] | Array of role slugs assigned to this user in this workspace. |
| teams | text[] | Array of team slugs the user belongs to. |
| joined_at | timestamptz | When user joined this workspace. |
| invited_by | varchar(26) | FK → users.id |
| is_owner | boolean | Whether this user is a workspace owner. |
audit_eventsImmutable log of every platform action. Cannot be updated or deleted.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed aud_. |
| action | varchar(100) | Event action: created | updated | deleted | resolved | escalated | approved | ... |
| entity_type | varchar(100) | Resource type: incident | change | workflow | user | ... |
| entity_id | varchar(26) | ID of the affected resource. |
| entity_number | varchar(20) | Human-readable number (INC-1042) if applicable. |
| entity_title | text | Title/name of the entity at event time. |
| actor_id | varchar(26) | User or token that caused the action. |
| actor_type | enum | user | api_token | workflow | system |
| actor_name | text | Display name of the actor. |
| actor_ip | inet | IP address of the request. |
| before | jsonb | Field values before the change. Null for creates. |
| after | jsonb | Field values after the change. Null for deletes. |
| changes | jsonb | Array of {field, from, to} for updates. |
| metadata | jsonb | Additional context (request ID, user agent, etc.). |
| workspace_id | varchar(26) | FK → workspaces.id |
| environment | enum | development | staging | production |
| created_at | timestamptz | Event timestamp. Indexed. |
webhooksOutbound webhook subscriptions — URL, events, and delivery config.
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID PK, prefixed wh_. |
| name | text | Display name. |
| url | text | Target URL. |
| events | text[] | Event types to subscribe to. |
| secret | text | HMAC secret. Stored encrypted. Returned masked. |
| headers | jsonb | Additional request headers. |
| filter | jsonb | Payload filter conditions. |
| status | enum | active | paused | failed (auto-paused after too many failures). |
| retries | integer | Retry attempts on failure. |
| retry_strategy | enum | fixed | exponential |
| timeout_ms | integer | Request timeout. |
| delivery_count | bigint | Total delivery attempts. |
| failure_count | bigint | Total failed deliveries. |
| last_delivery_at | timestamptz | Most recent delivery attempt. |
| created_at | timestamptz | Auto-set. |
| created_by | varchar(26) | FK → users.id |
SLA & On-Call Tables
sla_policiesTop-level SLA policy definitions with response and resolution time targets per module.
| Field | Type | Description |
|---|---|---|
| name | string | Policy name. Required. |
| module | enum | itsm | hr | csm — which module this policy applies to. |
| responseTimeHours | number | Target first-response time in business hours. Required. |
| resolutionTimeHours | number | Target resolution time in business hours. Required. |
| isActive | boolean | Whether this policy is currently enforced. |
| businessHoursCalendarId | reference | FK → sla_business_hours_calendars. Calendar used for hour calculations. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
sla_business_hours_calendarsBusiness hours calendars defining when the clock runs for SLA calculations. Each day has a start/end window; days with no window are non-working.
| Field | Type | Description |
|---|---|---|
| name | string | Calendar name. Required. |
| timezone | string | IANA timezone (e.g. America/New_York). Required. |
| mondayStart | string | Work start time on Monday (HH:MM, 24h). Null = non-working. |
| mondayEnd | string | Work end time on Monday. |
| tuesdayStart | string | Work start on Tuesday. |
| tuesdayEnd | string | Work end on Tuesday. |
| wednesdayStart | string | Work start on Wednesday. |
| wednesdayEnd | string | Work end on Wednesday. |
| thursdayStart | string | Work start on Thursday. |
| thursdayEnd | string | Work end on Thursday. |
| fridayStart | string | Work start on Friday. |
| fridayEnd | string | Work end on Friday. |
| saturdayStart | string | Work start on Saturday. Null for most calendars. |
| saturdayEnd | string | Work end on Saturday. |
| sundayStart | string | Work start on Sunday. |
| sundayEnd | string | Work end on Sunday. |
| holidayScheduleId | reference | FK → itsm_change_calendar. Holiday exceptions that pause the clock. |
| isDefault | boolean | Whether this is the workspace default calendar. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
sla_targetsSpecific measurable SLA targets tied to an SLA definition — e.g. P1 response ≤ 15 min.
| Field | Type | Description |
|---|---|---|
| name | string | Target name. Required. |
| displayName | string | Display label. |
| code | string | Short code. |
| shortDescription | string | One-line description. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | When this target became effective. |
| effectiveTo | timestamptz | When this target expires. |
| conditions | jsonb | Condition rules that select which records this target applies to. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| slaDefinitionId | reference | FK → sla_definitions. Parent SLA definition. |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
on_call_schedulesOn-call rotation schedule definitions. Linked to a group; rotations and members are child records.
| Field | Type | Description |
|---|---|---|
| name | string | Schedule name. Required. |
| displayName | string | Display label. |
| code | string | Short code. |
| shortDescription | string | One-line description. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | Schedule start date. |
| effectiveTo | timestamptz | Schedule end date. |
| conditions | jsonb | Condition rules for when this schedule activates. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| groupId | reference | FK → groups. The team this schedule is for. |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
escalation_policiesEscalation policy definitions — ordered tiers of who to notify if a ticket remains unacknowledged.
| Field | Type | Description |
|---|---|---|
| name | string | Policy name. Required. |
| displayName | string | Display label. |
| code | string | Short code. |
| shortDescription | string | One-line description. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | When this policy became effective. |
| effectiveTo | timestamptz | When this policy expires. |
| conditions | jsonb | Condition rules for when this policy applies. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| groupId | reference | FK → groups. Default assignment group. |
| ownedBy | reference | FK → users. Policy owner. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
App Studio Tables
appsApp Studio application definitions — each app is a deployable frontend with pages, theme, and SDK config.
| Field | Type | Description |
|---|---|---|
| name | string | App name. Required. |
| slug | string | URL-safe identifier. Unique per workspace. Required. |
| pages | jsonb | Page tree definition (visual builder layout). |
| theme | jsonb | Theme configuration (colors, typography, spacing). |
| framework | enum | react | html |
| cssFramework | enum | tailwind | none |
| componentLibrary | enum | shadcn | none |
| githubRepo | jsonb | GitHub repo connection config (owner, repo, branch). |
| flowSdkConfig | jsonb | Flow SDK integration config. |
| deploymentConfig | jsonb | Deployment configuration (host, env vars, build command). |
| deploymentEnvironments | jsonb | Per-environment deployment state objects. |
| governancePolicy | jsonb | Access governance policy. |
| collaborators | jsonb | Array of collaborator user IDs and their permissions. |
| aiGenerationEnabled | boolean | Whether AI code-generation is enabled for this app. |
| publishedAt | timestamptz | When the app was last published. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
app_versionsPublished version snapshots of an app. Each publish creates a new version; rollback restores a prior snapshot.
| Field | Type | Description |
|---|---|---|
| appId | reference | FK → apps. Required. |
| snapshot | jsonb | Full app state at publish time (pages, theme, config). Required. |
| versionNumber | integer | Auto-incrementing version counter. |
| label | string | Human label (e.g. "v1.2 — dark mode launch"). |
| changeLog | string | What changed in this version. |
| snapshotSize | integer | Compressed snapshot size in bytes. |
| createdBy | string | User ID of publisher. |
| createdAt | timestamptz | Auto-set. |
Authentication Tables
api_keysAPI key credentials for programmatic access. The raw key is shown once at creation — only a hash is stored.
| Field | Type | Description |
|---|---|---|
| name | string | Key name. Required. |
| prefix | string | Short prefix shown in the UI (e.g. flw_prod_). Required. |
| hashedKey | string | Bcrypt hash of the key. Readonly — never returned in API responses. |
| scopes | list | Permission scope strings (e.g. records:read, workflows:execute). |
| isActive | boolean | Whether this key can authenticate. |
| expiresAt | timestamptz | Expiry date. Null = never expires. |
| lastUsedAt | timestamptz | When this key last authenticated successfully. |
| rotationPolicyId | string | FK → api_key_rotation_policies. Applied rotation policy. |
| rotationAppliedAt | timestamptz | When the rotation policy was last applied. |
| createdBy | string | User ID who created this key. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
api_key_rotation_policiesPolicies governing mandatory key rotation intervals and warnings.
| Field | Type | Description |
|---|---|---|
| name | string | Policy name. Required. |
| maxAgeDays | integer | Keys older than this are forced to rotate. Required. |
| warningDaysBeforeExpiry | integer | Days before expiry to start sending warning notifications. Required. |
| autoRotate | boolean | Automatically rotate (invalidate + issue new key) when maxAgeDays is reached. |
| isActive | boolean | Whether this policy is enforced. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
auth_sessionsActive user browser/API sessions. Records are deleted on logout or expiry.
| Field | Type | Description |
|---|---|---|
| userId | reference | FK → users. Required. |
| tokenHash | string | Hash of the session token. Readonly. |
| jti | string | JWT ID — unique token identifier used for revocation. |
| expiresAt | timestamptz | Session expiry. |
| revokedAt | timestamptz | If set, this session was explicitly revoked before expiry. |
| userAgent | string | Browser or client user-agent string. |
| ipAddress | string | IP address of the client. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Miscellaneous Tables
attachmentsFile attachment records. The actual file is stored in object storage; this table holds the metadata and pointer.
| Field | Type | Description |
|---|---|---|
| taskId | reference | FK → tasks. Parent task this file is attached to. Required. |
| fileName | string | Original file name. Required. |
| fileSize | integer | File size in bytes. Required. |
| mimeType | string | MIME type (e.g. application/pdf). Required. |
| storageKey | string | Object storage key used to retrieve the file. Required. |
| uploadedBy | reference | FK → users. |
| sysDomain | reference | FK → domains. Domain scope for this attachment. |
| createdAt | timestamptz | Auto-set. |
cron_jobsScheduled cron job definitions. Executions are recorded in cron_runs.
| Field | Type | Description |
|---|---|---|
| name | string | Job name. Required. |
| displayName | string | Display label. |
| code | string | Short code identifier. |
| shortDescription | string | One-line description. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| tags | list | Tag array for filtering. |
| metadata | jsonb | Freeform metadata. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ownedBy | reference | FK → users. |
| assignedTo | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdBy | reference | FK → users. Auto-set. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Organisation Hierarchy
companiesCompany records — internal business entities or external organisations.
| Field | Type | Description |
|---|---|---|
| name | string | Company name. Required. |
| code | string | Short code. |
| website | string | URL. |
| phone | string | Phone number. |
| address | string | Postal address. |
| description | string | Description. |
| isActive | boolean | Active flag. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
business_unitsBusiness unit hierarchy within a company. Supports nesting via parentId.
| Field | Type | Description |
|---|---|---|
| name | string | BU name. Required. |
| code | string | Short code. |
| companyId | reference | FK → companies. |
| parentId | reference | FK → business_units. Parent for nested hierarchy. |
| managerId | reference | FK → users. BU head. |
| description | string | Description. |
| isActive | boolean | Active flag. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
locationsPhysical location records. Referenced by assets, users, and CMDB CIs.
| Field | Type | Description |
|---|---|---|
| name | string | Location name. Required. |
| code | string | Short code. |
| country | string | Country. |
| region | string | Region or state. |
| timezone | string | IANA timezone. |
| address | string | Postal address. |
| isActive | boolean | Active flag. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Asset Management Tables
assetsPhysical and digital asset inventory. Each record is a tracked asset with a unique tag.
| Field | Type | Description |
|---|---|---|
| name | string | Asset name. Required. |
| assetTag | string | Unique asset tag (barcode/QR value). Required. |
| serialNumber | string | Manufacturer serial number. |
| model | string | Hardware/software model name. |
| category | string | Asset category (laptop, server, license, etc.). |
| lifecycleState | enum | in_stock | assigned | in_repair | retired |
| assignedTo | reference | FK → users. Current assignee. |
| locationId | reference | FK → locations. Physical location. |
| vendorId | reference | FK → vendors. Vendor/supplier. |
| purchaseDate | timestamptz | When the asset was purchased. |
| warrantyEndDate | timestamptz | Warranty expiry date. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
CMDB Extended Tables
cmdb_rel_cisDirected relationship edges in the CMDB topology graph. Each record is one directed relationship between two CIs.
| Field | Type | Description |
|---|---|---|
| name | string | Relationship name. Required. |
| status | enum | draft | active | inactive | retired |
| tags | list | Tag array. |
| metadata | jsonb | Extra metadata. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| fromCiId | reference | FK → cmdb_cis. Source CI (the "from" end). |
| toCiId | reference | FK → cmdb_cis. Target CI (the "to" end). |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
cmdb_business_servicesBusiness service records backed by underlying CIs. Maps business capabilities to infrastructure.
| Field | Type | Description |
|---|---|---|
| name | string | Service name. Required. |
| displayName | string | Display label. |
| code | string | Short code. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| tags | list | Tag array. |
| metadata | jsonb | Metadata object. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ownedBy | reference | FK → users. Business owner. |
| assignedTo | reference | FK → users. Technical owner. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Collaboration Tables
commentsComment records on any platform entity. Posted by users, workflows, or system.
| Field | Type | Description |
|---|---|---|
| name | string | Comment name / subject. Required. |
| description | string | Comment body. Markdown. |
| status | enum | draft | active | inactive | retired |
| tags | list | Tag array. |
| metadata | jsonb | Metadata. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ownedBy | reference | FK → users. Author. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
knowledge_basesKnowledge base container definitions. Articles belong to a knowledge base.
| Field | Type | Description |
|---|---|---|
| name | string | KB name. Required. |
| displayName | string | Display label. |
| code | string | Short code. |
| description | string | Full description. |
| summary | string | Short summary. |
| articleBody | string | Welcome/intro body for the KB. Markdown. |
| status | enum | draft | review | published | archived |
| publishedAt | timestamptz | When this KB was published. |
| recordSource | enum | manual | workflow | api | import | system |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Projects & Programs
projectsProject records. Referenced by release sub-tables, milestones, and task tracking.
| Field | Type | Description |
|---|---|---|
| name | string | Project name. Required. |
| number | string | Auto-incremented project number. |
| shortDescription | string | One-line summary. |
| description | string | Full description. |
| status | enum | new | in_progress | pending | on_hold | resolved | closed | cancelled |
| priority | enum | critical | high | medium | low | planning |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ownedBy | reference | FK → users. Project owner. |
| assignedTo | reference | FK → users. Project manager. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Observability Tables
alertsAlert records received from monitoring systems. Auto-create incidents when thresholds are breached.
| Field | Type | Description |
|---|---|---|
| name | string | Alert name. Required. |
| number | string | Auto-number. |
| description | string | Alert description. |
| status | enum | new | processed | failed | ignored |
| priority | enum | critical | high | medium | low |
| impact | enum | high | medium | low |
| urgency | enum | high | medium | low |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ciId | reference | FK → cmdb_cis. CI that generated the alert. |
| incidentId | reference | FK → incidents. Incident auto-created from this alert. |
| ownedBy | reference | FK → users. |
| assignedTo | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
monitoring_checksMonitoring check definitions — health probes, threshold checks, and uptime monitors attached to CIs.
| Field | Type | Description |
|---|---|---|
| name | string | Check name. Required. |
| description | string | Description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | When this check became active. |
| effectiveTo | timestamptz | When this check expires. |
| conditions | jsonb | Check condition/threshold rules. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ciId | reference | FK → cmdb_cis. CI being monitored. |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Security & Risk Tables
security_incidentsSecurity-specific incident records (data breaches, intrusions, policy violations). Linked to the main incidents table.
| Field | Type | Description |
|---|---|---|
| name | string | Security incident name. Required. |
| number | string | Auto-number. |
| description | string | Description. |
| status | enum | new | in_progress | pending | on_hold | resolved | closed | cancelled |
| priority | enum | critical | high | medium | low |
| impact | enum | high | medium | low |
| urgency | enum | high | medium | low |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| incidentId | reference | FK → incidents. Linked parent incident. |
| ciId | reference | FK → cmdb_cis. Affected CI. |
| assignedTo | reference | FK → users. |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
security_vulnerabilitiesVulnerability records discovered on CIs via scanning or manual assessment.
| Field | Type | Description |
|---|---|---|
| name | string | Vulnerability name. Required. |
| number | string | Auto-number. |
| description | string | Description. |
| status | enum | new | in_progress | pending | on_hold | resolved | closed | cancelled |
| priority | enum | critical | high | medium | low |
| impact | enum | high | medium | low |
| urgency | enum | high | medium | low |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ciId | reference | FK → cmdb_cis. Affected CI. |
| changeRequestId | reference | FK → change_requests. Patch/remediation change. |
| ownedBy | reference | FK → users. |
| assignedTo | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
risk_registersRisk register containers scoped to a service or scope. Risks belong to a register.
| Field | Type | Description |
|---|---|---|
| name | string | Register name. Required. |
| number | string | Auto-number. |
| description | string | Description. |
| status | enum | new | in_progress | pending | on_hold | resolved | closed | cancelled |
| priority | enum | critical | high | medium | low |
| impact | enum | high | medium | low |
| urgency | enum | high | medium | low |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| serviceId | reference | FK → service_offerings. Service this register covers. |
| ownerId | reference | FK → users. Risk owner. |
| ownedBy | reference | FK → users. |
| assignedTo | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
audit_plansAudit plan definitions — scope, schedule, and objectives for an audit engagement.
| Field | Type | Description |
|---|---|---|
| name | string | Audit plan name. Required. |
| description | string | Description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | Audit period start. |
| effectiveTo | timestamptz | Audit period end. |
| conditions | jsonb | Scope conditions. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| ownedBy | reference | FK → users. Audit lead. |
| assignedTo | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
OLA & Availability Tables
ola_policiesOperational Level Agreement policies defining internal team commitments (analogous to SLA but for internal groups).
| Field | Type | Description |
|---|---|---|
| name | string | OLA name. Required. |
| description | string | Description. |
| module | enum | itsm | hr | csm |
| responseTimeHours | number | Response target in business hours. Required. |
| resolutionTimeHours | number | Resolution target in business hours. Required. |
| isActive | boolean | Whether this OLA is enforced. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
availability_servicesAvailability tracking definitions for a service. Measurements and outages are child records.
| Field | Type | Description |
|---|---|---|
| name | string | Service name. Required. |
| description | string | Description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | Tracking start date. |
| effectiveTo | timestamptz | Tracking end date. |
| conditions | jsonb | Availability conditions. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| serviceId | reference | FK → service_offerings. Linked service offering. |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
continuity_plansBusiness continuity and disaster recovery plan definitions.
| Field | Type | Description |
|---|---|---|
| name | string | Plan name. Required. |
| description | string | Description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | Plan effective start. |
| effectiveTo | timestamptz | Plan expiry. |
| conditions | jsonb | Activation conditions. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| serviceId | reference | FK → service_offerings. Service this plan covers. |
| ownedBy | reference | FK → users. Plan owner. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Software Management Tables
software_productsSoftware product catalogue — the master list of software titles for license management.
| Field | Type | Description |
|---|---|---|
| name | string | Product name. Required. |
| description | string | Description. |
| status | enum | draft | active | inactive | retired |
| version | string | Product version. |
| effectiveFrom | timestamptz | Support start date. |
| effectiveTo | timestamptz | End-of-support date. |
| conditions | jsonb | Eligibility conditions. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| vendorId | reference | FK → vendors. Software vendor. |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Support Queues
support_queuesSupport queue definitions for routing tickets to the right team. Groups are associated with queues.
| Field | Type | Description |
|---|---|---|
| name | string | Queue name. Required. |
| description | string | Description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | Queue active start. |
| effectiveTo | timestamptz | Queue active end. |
| conditions | jsonb | Routing conditions. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| groupId | reference | FK → groups. Team that owns this queue. |
| ownedBy | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Vendor Contracts
vendor_contractsVendor contract records with terms, SLA references, and effective dates.
| Field | Type | Description |
|---|---|---|
| name | string | Contract name. Required. |
| description | string | Description. |
| status | enum | draft | active | inactive | retired |
| version | string | Contract version. |
| effectiveFrom | timestamptz | Contract start date. |
| effectiveTo | timestamptz | Contract end date. |
| conditions | jsonb | Contract terms and conditions. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| vendorId | reference | FK → vendors. Contracting vendor. |
| ownedBy | reference | FK → users. Contract owner. |
| assignedTo | reference | FK → users. |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
App Studio UI Tables
ui_pagesUI page definitions inside App Studio. Each page has a component tree and can be versioned.
| Field | Type | Description |
|---|---|---|
| name | string | Page name. Required. |
| slug | string | URL path slug. Required. |
| status | enum | draft | published |
| description | string | Page description. |
| componentTree | jsonb | Full component hierarchy JSON. |
| themeOverrides | jsonb | Page-level theme overrides. |
| permissions | jsonb | Role-based visibility rules for this page. |
| workspaceId | string | Workspace scope. Auto-set. |
| createdBy | string | User ID of creator. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
ui_page_versionsVersion history for UI pages. Created on every save in the visual builder.
| Field | Type | Description |
|---|---|---|
| pageId | reference | FK → ui_pages. Required. |
| componentTree | jsonb | Component tree snapshot at this version. |
| generatedCode | string | React code generated from the component tree. |
| version | integer | Version number. Required. |
| savedBy | string | User ID who saved. Required. |
| savedAt | timestamptz | When this version was saved. |
| workspaceId | string | Workspace scope. |
ui_componentsReusable custom UI component definitions. Compiled from source and usable in any app page.
| Field | Type | Description |
|---|---|---|
| name | string | Component name. Required. |
| source | string | Raw component source code. Required. |
| compiled | string | Compiled output. Set by the engine on save. |
| props | jsonb | Props schema definition for this component. |
| isActive | boolean | Whether this component is available. |
| workspaceId | string | Workspace scope. Auto-set. |
| createdBy | string | User ID of creator. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Flow SDK Tables
flow_scriptsServer-side scripts written in JavaScript/TypeScript that run in the Flow SDK engine. Can be called from workflow nodes, rules, and behaviors.
| Field | Type | Description |
|---|---|---|
| name | string | Script name. Required. |
| description | string | What this script does. |
| source | string | Raw source code. Required. |
| compiled | string | Compiled/transpiled output. Set by the engine on save. |
| isActive | boolean | Whether this script is available for execution. |
| workspaceId | string | Workspace scope. Auto-set. |
| createdBy | string | User ID of creator. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
flow_script_versionsVersion history for flow scripts. A new record is created every time a script is saved.
| Field | Type | Description |
|---|---|---|
| scriptId | string | FK → flow_scripts. Required. |
| scriptName | string | Name at time of save. Required. |
| source | string | Source code at this version. Required. |
| compiled | string | Compiled output at this version. |
| savedBy | string | User ID who saved. |
| workspaceId | string | Workspace scope. |
| savedAt | timestamptz | When this version was saved. |
flow_execution_logsExecution records for all Flow SDK script types — scripts, rules, guards, and behaviors.
| Field | Type | Description |
|---|---|---|
| scriptName | string | Name of the script/rule/guard that ran. Required. |
| scriptType | enum | flow_script | flow_rule | flow_guard | flow_behavior |
| triggerType | string | What triggered this execution (e.g. after_update, onLoad). |
| durationMs | integer | Execution time in milliseconds. |
| success | boolean | Whether execution completed without error. |
| input | jsonb | Input payload passed to the script. |
| output | jsonb | Output returned by the script. |
| error | string | Error message if success = false. |
| createdAt | timestamptz | Auto-set. |
flow_rulesServer-side business rules that fire on record lifecycle events (before/after create/update/delete) and run a script.
| Field | Type | Description |
|---|---|---|
| name | string | Rule name. Required. |
| table | string | Target table slug this rule is attached to. Required. |
| trigger | enum | before_create | after_create | before_update | after_update | before_delete | after_delete |
| condition | string | JS condition expression. Rule only runs when this evaluates to truthy. |
| script | string | JS script body. Required. |
| order | integer | Execution order when multiple rules fire on the same trigger. |
| isActive | boolean | Whether this rule fires. |
| source | enum | user | plugin | system — who created this rule. |
| pluginId | string | Plugin ID if source = plugin. |
| workspaceId | string | Workspace scope. Auto-set. |
| createdBy | string | User ID of creator. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
flow_behaviorsClient-side UI behaviors that attach to forms or pages and run scripts on load, field change, or submit.
| Field | Type | Description |
|---|---|---|
| name | string | Behavior name. Required. |
| attachTo | enum | form | page — what UI element this attaches to. |
| targetId | string | ID of the form or page this behavior targets. Required. |
| trigger | enum | onLoad | onChange | onSubmit | onFieldChange |
| fieldName | string | For onFieldChange — which field triggers this behavior. |
| script | string | JS script body. Required. |
| isActive | boolean | Whether this behavior is active. |
| workspaceId | string | Workspace scope. Auto-set. |
| createdBy | string | User ID of creator. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Data Studio Tables
data_sourcesData source connection definitions used in DB Studio, App Studio data bindings, and workflow nodes.
| Field | Type | Description |
|---|---|---|
| name | string | Data source name. Required. |
| displayName | string | Display label. |
| code | string | Short code identifier. |
| shortDescription | string | One-line description. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| tags | list | Tag array. |
| metadata | jsonb | Connection metadata (type, host, port, db name — encrypted at rest). |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
import_setsBatch data import records. Each import set holds the raw staging rows before transform maps are applied.
| Field | Type | Description |
|---|---|---|
| name | string | Import set name. Required. |
| displayName | string | Display label. |
| code | string | Short code. |
| shortDescription | string | One-line description. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| tags | list | Tag array. |
| metadata | jsonb | Import metadata (source file, row count, column map). |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
Vendor Management Tables
vendorsVendor and supplier records. Referenced by contracts, assets, purchase orders, and invoice lines across all ITSM entity families.
| Field | Type | Description |
|---|---|---|
| name | string | Vendor name. Required. |
| displayName | string | Display label. |
| code | string | Short vendor code. |
| shortDescription | string | One-line description. |
| description | string | Full description. |
| status | enum | draft | active | inactive | retired |
| version | string | Semantic version. |
| effectiveFrom | timestamptz | When this vendor relationship became effective. |
| effectiveTo | timestamptz | When this vendor relationship expires. |
| conditions | jsonb | Condition or eligibility rules. |
| recordSource | enum | manual | workflow | api | import | system |
| environment | enum | prod | staging | test | dev |
| tenantId | string | Auto-set, readonly. |
| workspaceId | string | Auto-set, readonly. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
System Internal Tables
All four sys_ tables follow the standard root_<tenantId>_<workspaceId>_<tableName>naming. sys_counters and sys_notifications previously used global collections but were corrected to workspace-scoped via getWorkspaceModel(). The fields below are from the actual Mongoose models.
sys_countersAuto-increment counter state per workspace. Collection: root_<tenantId>_<workspaceId>_sys_counters. One record per (tenantId, workspaceId, prefix) triple — atomically incremented on each create to produce human-readable numbers like INC-0042.
| Field | Type | Description |
|---|---|---|
| tenantId | string | Tenant ID. Required. Indexed. |
| workspaceId | string | Workspace ID. Required. Indexed. Compound-unique with tenantId + prefix. |
| prefix | string | Counter prefix — typically the entity type (e.g. INC, CHG, PRB). Required. |
| seq | integer | Current sequence value. Atomically incremented via $inc. Default: 0. |
sys_notificationsIn-app notification inbox per workspace. Collection: root_<tenantId>_<workspaceId>_sys_notifications. One record per notification delivered to a user.
| Field | Type | Description |
|---|---|---|
| tenantId | string | Tenant ID. Required. Indexed. |
| workspaceId | string | Workspace ID. Required. Indexed. Compound index with tenantId, userId, isRead, createdAt. |
| userId | ObjectId | FK → users. Recipient user. Required. Indexed. |
| type | string | Notification type slug (e.g. incident.assigned, sla.breach). Required. |
| title | string | Short notification title. Required. |
| body | string | Notification body text. Required. |
| meta | mixed | Arbitrary metadata (entity ID, link, context). |
| isRead | boolean | Whether the user has read this notification. Default: false. |
| createdAt | timestamptz | Auto-set. |
sys_db_objectsRegistry of all tables/collections that exist for a workspace. Collection: root_<tenantId>_sys_db_objects (or root_<tenantId>_<workspaceId>_sys_db_objects in strict mode). Used by DB Studio schema view and the scripting engine.
| Field | Type | Description |
|---|---|---|
| tenantId | string | Tenant ID. Required. Indexed. |
| workspaceId | string | Workspace ID. Required. Indexed. Compound-unique with tenantId + name. |
| name | string | Table slug (e.g. incidents, itsm_incident_tasks). Required. |
| label | string | Human-readable table label. Required. |
| extendsTable | string | Parent table slug if this is an extended table. |
| isCustom | boolean | Whether this was created by a user (vs seeded by the platform). Default: true. |
| isActive | boolean | Whether this table is active. Default: true. |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
sys_dictionariesLive field definitions for every table in a workspace. Backing store for the form engine, API validation, and DB Studio. Collection follows the same tenant-scoped pattern as sys_db_objects.
| Field | Type | Description |
|---|---|---|
| tenantId | string | Tenant ID. Required. |
| workspaceId | string | Workspace ID. Required. |
| tableName | string | Table this field definition belongs to. |
| fieldName | string | Field key. |
| definition | jsonb | Full field definition JSON (type, label, choices, required, readonly, reference, etc). |
| createdAt | timestamptz | Auto-set. |
| updatedAt | timestamptz | Auto-set. |
GET /api/v1/tables/incidents/records?filter[severity]=P1&filter[created_at][gte]=2026-05-25