Complete data model: JSON entities, relationships and ontology

This page describes the complete data model of an Omniscol account: the entities, their main fields and their relationships. It extends the conceptual page Data organization, which explains the why (school repository ↔ timetable, local copies); here, the goal is the what — an actionable structural map, in particular to map the model to an external repository (management software, directory, information system).

Technical page. This reference is aimed at integration and matching with an external system. It is not required for everyday use of Omniscol: to understand how the data is organized on the business side, see Data organization.

All of a school's data is organized as a tree. The entities described below (users, school years, timetables, absences, events, etc.) correspond to the different branches of this structure. The normative reference is the account's JSON schema. It can be consulted in two forms:

This schema describes exactly the physical storage in the database, as a JSON document. This page provides an organized reading of it, stable over time.

The school document: the root

The root document gathers the school's durable repository and all its planning data. Its top-level subtrees:

Root key Entity Role
config SchoolConfig Account settings (country, options, time zone, external synchronization)
subjects_custom dictionary of SubjectFull The school's custom subjects
families_custom dictionary of Family Custom subject families
users dictionary of User User directory (all roles)
school_years array of SchoolYear School years and holidays
timetables dictionary of Timetable Timetables
absences grouping of Absence* Absences (teachers, classes, staff, students)
staffing Staffing Staff members and supervision module
panels dictionary of Panel Display panels
events dictionary of Event Agenda-type events
api, snapshots, jobs, translations, logo miscellaneous Technical settings and history

The subtrees described as "dictionary" are JSON objects whose keys are stable identifiers (the pivot of any external mapping — see the final section).

config

subjects_custom

families_custom

users

school_years

timetables

staffing

absences

panels

events

SCHOOL

string

_id

school domain

string

name

account name

string

country

account country

string

current_school_year

current school year

CONFIG

SUBJECT

FAMILY

USER

SCHOOL_YEAR

TIMETABLE

STAFFING

ABSENCE

PANEL

EVENT

Cross-cutting fields: _extids and wishes

Two fields appear on many entities. To avoid repeating them in every schema, they are described once here.

  • _extids (ExternalIds) — table of the entity's identifiers in external systems, for example { "auriga": "12345" }. Present on synchronizable entities (subjects, families, users, sites, classrooms, resources, teachers, classes, groups…). It is the anchor point for matching with an external repository (see the final section).
  • wishestime constraints: availability, preferred or avoided time slots, maximum hourly volume, preferred classroom… Present on most schedulable entities: users, teachers and subjects of a timetable, groups, classes, classrooms, site hour ranges, staffing grids. Depending on the scope, these constraints are global (school level) or specific to one timetable.

Level 1 — The school repository

The school repository contains what is true for the institution, independently of any timetable: the subject catalog, the user directory, the calendar of school years.

family

parent

placements per year

groups

holidays

FAMILY

string

name

string

code

SUBJECT

string

name

string

short

short label (display)

string

code

string

parent

parent subject

string

family

family

string

color

object

_extids

external identifiers

USER

string

login

string

first_name

string

middle_name

(if relevant for the country)

string

last_name

string

idnumber

official identifier

array

roles

admin teacher staff student

string

customrole

Custom role

int

servicehours

reference service hours

bool

external

external teacher

object

subjects

subjects taught

object

wishes

global availability

object

_extids

PLACEMENT

string

class

assigned class

string

date_start

string

date_end

array

groups

assigned groups

PLACEMENT_GROUP

string

group

groupset or virtual group

array

weeks

week ranges

SCHOOL_YEAR

string

name

string

date_start

string

date_end

array

altweeks

alternate weeks

HOLIDAY

string

name

string

begin

string

end

Subjects — SubjectFull / Subject / Family

A custom subject (SubjectFull) extends the base subject (Subject: name, short, code, type, _extids) with parent, family and color. Two origins coexist at the school level: the country's common subjects (read-only) and the school's custom subjects. Functional details: Managing subjects.

Users — User (including teachers)

A User is the single entity of the directory: identity (last name, first name, idnumber, contact), authentication (login), roles, reference service hours (servicehours), global availability (wishes field) and placements. A teacher is not a separate entity: it is a User with teacher among its roles (the same user can hold several roles). The placements field (indexed by school year) attaches a student to a class and to groups over a period. Details: Managing teachers.

School years — SchoolYear / Holiday

A SchoolYear defines date_start → date_end, the list of holidays and the altweeks (alternate weeks). It is a time frame, not a container: timetables unfold within it without being nested in it. See School year.

Level 2 — The timetable

A Timetable is a coherent planning unit. It carries its own local copy of teachers, classes, groups and subjects — see the local-copy principle in Data organization.

config

sites

teachers

classes

lessons (groups of groups, multi-group)

classrooms

resources

subjects

groups

courses

parent (hierarchy)

origin (partial local copy)

default teachers

partial local copy, implicit link by identifier

constituent groups

TIMETABLE

bool

active

published?

array

lessons

cross-class lessons

TIMETABLE_CONFIG

string

type

week cycle calendar

int

time_period

slot duration

int

time_unit

slot subdivision

array

weekdays

working days

string

displaymode

hours periods agenda

int

cycle

cycle length

array

dates

bounds if calendar

object

date_windows

generation windows

TIMETABLE_SITE

string

name

object

distances

distances between sites

object

hours

time grids

TIMETABLE_TEACHER

string

first_name

string

last_name

string

virtual_name

position to fill

array

subjects

subjects of the virtual position

string

idnumber

int

servicehours

overridable per timetable

string

classroom

preferred classroom

TIMETABLE_CLASS

string

name

string

level

string

campus

array

sites

only one site taken into account

int

studentsnb

theoretical student count (to compute a suitable classroom)

string

classroom

default classroom

bool

offgrid

off-grid (calendar)

string

videolink

default video conference link on all lessons

string

resourcelink

default resource link (LMS) on all lessons

LESSON

TIMETABLE_CLASSROOM

string

name

int

capacity

string

specialisation

free-form specialisation

int

maxclasses

simultaneous classes

string

building

string

description

free-form description

array

tags

feature or equipment tags

TIMETABLE_RESOURCE

string

name

int

number

available quantity

TIMETABLE_CLASS_SUBJECT

string

code

inherited from Subject

array

incompatibilities

incompatibilities

number

pweight

pedagogical weight

array

teachers

default teachers

number

minutes

target hourly volume

string

specialisation

required classroom

TIMETABLE_CLASS_GROUP

string

name

string

code

bool

free

free group

string

parent

parent group

int

studentsnb

theoretical student count (to compute a suitable classroom)

SUBJECT

USER

GROUPSET_ITEM

string

name

string

code

array

groups

group identifiers

Configuration — TimetableConfig

The decisive field is type: week (repeated weekly), cycle (multi-day cycle, see cycle) or calendar (real dates, see dates). time_period and time_unit define the grid's framework; weekdays the working days; date_windows the constraint windows for automatic generation.

Sites, classrooms, resources

A TimetableSite (site) contains its classrooms (TimetableClassroom: capacity, specialisation, maxclasses, building) and its resources (TimetableResource: number = available quantity, for which the system prevents overbooking). distances models travel times between sites. See Sites, classrooms and resources and Classroom specialisations.

Timetable teachers — TimetableTeacher

An enriched partial copy of a User: only a few identifying fields are copied (first_name, last_name, idnumber), plus fields specific to planning (overridable servicehours, preferred classroom, per-timetable wishes). A non-empty virtual_name designates a virtual teacher (a position to fill, with no real User behind it).

Classes, class subjects, groups

  • TimetableClass: name, level, campus/sites, studentsnb, and three key subtrees — subjects, groups, courses.
  • TimetableClassSubject: local copy of a subject (extends Subject) enriched for planning — minutes (target volume), pweight (pedagogical weight), incompatibilities, default teachers, classroom specialisation. Assigning a subject with a course type creates a separate entry per type. See Courses, lessons, course types.
  • TimetableClassGroup: a subset of a class. free=true disables conflicts with the rest of the class (free group); parent establishes the group hierarchy.

Rules between groups — divisions, alignments, groups of groups

The relationships between groups are carried by the timetable's groups subtree, in three forms:

Schema Entity Meaning Page
TimetableGroupTimeset division Mutually exclusive groups of the same class, placed in parallel (half-classes, electives) Class divisions
TimetableGroupSpaceset alignment Groups from different classes working together on mirrored time slots Alignments
TimetableGroupGroupset group of groups Meta-group (GroupsetItem: name, code, groups[]) combining several groups Groups of groups

See also the overview Class, group, subgroup.

Level 3 — Lessons

A lesson (Lesson) is the teaching unit actually placed in the timetable: duration, subject, group, teacher(s), classroom, resources, position and status. It is generated from a class subject (see level 2) and attached either to a class (class.courses), or directly to the timetable (timetable.lessons) — the latter case for groups of groups and multi-group lessons spanning several classes.

courses (lessons of one class)

lessons (groups of groups, multi-group)

assoc · concat · weekalt (complex lessons)

group

teachers

classroom

resources

memos

position

TIMETABLE_CLASS

LESSON

int

duration

in number of periods

int

duration_actual

actual minutes

int

duration_accounted

billed minutes

string

modality

in_person remote hybrid self_study

string

subject

subject identifier

string

group

group identifier

array

teachers

null forces no teacher

string

classroom

null forces no classroom

string

status

planned draft canceled done

string

_id

stable lesson identity

string

_osrev

revision (optimistic locking)

TIMETABLE

TIMETABLE_CLASS_GROUP

TIMETABLE_TEACHER

TIMETABLE_CLASSROOM

TIMETABLE_RESOURCE

MEMO

string

comment

string

pub

comment visibility

string

owner

int

tstp

timestamp

POSITION

string

day

date, weekday or cycle day number

int

period

slot index in the grid

string

start

exact start time HH:MM (off-grid only)

string

end

exact end time HH:MM (off-grid only)

bool

fixed

pinned lesson (frozen at generation)

Core of a lesson

A lesson carries the planning fields — duration (in periods), duration_actual / duration_accounted (actual / billed minutes), modality, subject, group, teachers, classroom, resources — plus its position, its status, its memos and an identity (_id, _osrev). Setting teachers or classroom to null explicitly forces the absence of a teacher or classroom.

Complex lessons

A lesson can group other lessons:

  • assocassociated lessons: the groups swap together.
  • concatconcatenated lessons: strictly consecutive.
  • weekaltalternate weeks: one lesson variant per week.

These mechanisms cover complex lessons — see Complex lessons: alternate, associated, concatenated.

Position of a lesson

The position is an object that places the lesson in time. It gathers the following fields:

  • position.day — the day of the lesson, polymorphic depending on the timetable mode: a day name (mondaysunday) in weekly mode, a cycle day number ("1", "2"…) in cycle mode, or a YYYY-MM-DD date in calendar mode. It is one and the same field that changes form depending on the mode; it is always present.
  • position.period — the slot index in the time grid. A lesson with neither period nor start/end corresponds to a public holiday.
  • position.start / position.end — exact start and end times (HH:MM), for off-grid lessons or calendar-mode lessons that do not align with a standard time slot.
  • position.fixed — boolean (false by default): a pinned lesson, which automatic generation will not move.

The lessons of a class live in class.courses; the timetable.lessons array carries the cross-class lessons tied to groups of groups.

Identity of a lesson

Each lesson carries two technical identity fields, present on Premium accounts:

  • _id — a stable identifier, assigned when the lesson is created and immutable afterwards (it combines a timestamp and a fingerprint of the content). It is the key of a lesson for collaborative editing and for an external tool that tracks lessons over time. For the recurring occurrences of a calendar timetable (alternate weeks, concatenations, associations), the _id of each occurrence is derived from that of the base lesson, which remains recognizable.
  • _osrev — a revision token (optimistic locking), incremented on every modification (timestamp + modification index), in a strictly alphabetical order (which makes it easy to tell whether one revision is more recent than another). It lets collaborative editing detect and merge concurrent modifications: an outdated client revision signals a conflict, which the server resolves or merges instead of silently overwriting.

Absences

Absences share a common base (Absence: date_start, date_end, reason, hours, comment, status) specialized per type of absentee.

teachers

classes

staff

students

substitutes

ABSENCE

ABSENCE_TEACHER

string

date_start

string

date_end

string

reason

translation key or label

array

subjects

subjects concerned

array

classes

classes concerned

string

status

ABSENCE_CLASS

ABSENCE_STAFF

ABSENCE_STUDENT

string

date_start

string

reason

array

subjects

excluded subjects

string

status

SUBSTITUTE

string

substitute

substitute name

string

date_start

rule start (date)

string

date_end

rule end (date)

array

hours

time slots concerned (begin/end in minutes, day)

array

classes

classes concerned

array

subjects

subjects concerned

string

comment

comment

An AbsenceTeacher can be restricted to certain subjects/classes and carries an array of substitution rules (substitutes, each an AbsenceTeacherSubstitute: substitute, period, time slots, classes and subjects covered). Statuses differ per absentee type (for example ok/aborted for a class). See the glossary entry Substitution / Replacement and the Absence management module.

Staff members

A separate module (also sold standalone) for supervision and staff duty services.

grids

assignments

staff

schedule

needs

STAFFING

STAFFING_GRID

array

dates

activity ranges

array

days

array

periods

time slots

STAFFING_ASSIGNMENT

string

name

int

req

minimum number of supervisors

int

ideal

desired headcount

string

site

string

priority

high normal low

array

allowed_staff

STAFFING_STAFF_MEMBER

string

first_name

string

last_name

string

virtual_name

position to fill

string

color

STAFFING_SCHEDULE

object

dates

shifts by date

STAFFING_NEED_SPAN

string

day

day or date

string

begin

HH:MM

string

end

HH:MM

int

headcount

required headcount

A StaffingGrid is the template (days, periods); the assignments describe the positions (req/ideal, priority, detailed needs per time slot via StaffingNeedSpan); the schedule materializes the actual shifts by date. See the Staffing module.

Events

An Event is an agenda entry laid over the grid: something that happens in the school without being a regular lesson — a class council, a parent-teacher meeting, a one-day exam, a field trip, an open day. Events are stored in the events dictionary (keys event-<n>) and are part of the Premium features.

Fields of an Event (required: title, start, end):

  • title — displayed title.
  • start / end — start and end, in YYYYMMDDTHHmmSS format.
  • rrule — optional recurrence rule.
  • attendees — participants: a user, a class, a group, a free-form label (custom), or the whole school (everybody) / anyone willing (anyone).
  • location — place(s): a timetable classroom or a free-form label.
  • resources — resources booked for the event.
  • videolink — video conference link to attend remotely.
  • memos — comments; color — color (hexadecimal).

How it works in practice (creation, placement on the grid, interface fields) is described in One-off events.

Display panels

A Panel is a display panel showing the day's lessons (lobby, room, welcome screen…). It defines the selection of columns, the topline, the filters/exclusions and appearance settings. See the glossary entry Display panel.

Identifiers, local copies and mapping to an ERP

To link the Omniscol model to an external repository, three principles come first:

  1. Dictionary keys are the stable identifiers. Subjects, users, teachers, classes, groups, classrooms, resources are indexed by an immutable identifier (the JSON key), not by their label. This pivot — never the name — is what must be used for any correspondence.

  2. The _extids field (ExternalIds) carries the external identifiers. Present on synchronizable entities (Subject, Family, TimetableSite, TimetableClassroom, TimetableResource, TimetableTeacher, TimetableClass, TimetableClassGroup, User…), it associates each entity with its identifiers in third-party systems, for example { "auriga": "12345", "aimaira": "67890" }. It is the canonical anchor point for a bidirectional mapping.

  3. The school ↔ timetable local copy is deliberate. A class subject or a timetable teacher is an enriched copy, not a live reference. An external repository must therefore decide at which level it maps: the school repository (durable catalog) or a specific timetable (dated planning). The detailed propagation rules are in Data organization.

The synchronization configuration lives in config.extsync (SchoolConfigExtsync): systems (configured connectors), sync (direction and entities), export and schedules, plus correspondence tables (mappings) by key and Omniscol identifier. For programmatic access, the REST API and tokens are described in API tokens; the synchronization connectors in External synchronization.

The exact and exhaustive shape of each field remains defined by the account's reference JSON schema (https://api.omniscol.com/api/guest/school_schema.json, readable viewer at omniscol.com/en/datamodel). If this page and the schema diverge, the schema prevails.

See also