Skip to main content
Unified view of all time-tracking records. Aggregates attendance check-ins and deliverable work sessions.
Read-only. Only GET /, GET /:id, GET /count, POST /count, POST /query, and POST /group-and-count are available.
Search columns: type, externalSync, externalSource

Fields

type values

Only two row types exist today:
build_order_work_session and overhead_work_session row types (and the buildOrderId / overheadId / stageId foreign keys they used) have been removed server-side. buildOrderId, overheadId, and stageId remain in the response shape for backward compatibility but are always null. Order/stage/phase attribution for deliverable_work_session rows now goes exclusively through deliverableId — see the join example below.

shiftWorkHours shape

Times are in HH:mm format. breaks is optional.

Example queries

Loading hours with Order / Stage / Phase attribution

For deliverable_work_session rows, the time is logged against a stage/phase/component node, and the only link to the build tree is deliverableId (buildOrderId and stageId are always null). To attribute each row to its Order, Stage and Phase, join the deliverable node and then chain further joins off it:
  • a join’s condition may reference another join’s alias (not just the base table), so you can hop timesheet → deliverable → order in a single request;
  • declare the joins in dependency order — the join you reference (here d) must come before the joins that depend on it (o, s).
Each row comes back with:
  • o.name, o.identifier → the Order (joined via the node’s rootParentId)
  • s.name → the stage (joined via the node’s data.stageId)
  • d.computed.phase → the Phase name (read straight off the joined node)
The s join matches stage.id against data->>'stageId'; the engine casts both sides to uuid automatically. Phase/component nodes won’t have a linked stage, so s is null for those rows — read computed.phase for the phase regardless.
Alternative (no chaining): join only the deliverable node, read d.computed.phase directly, collect the distinct d.rootParentId / d.data.stageId values, and resolve their names with bulk POST /deliverable/query and POST /stage/query calls. Same result, more round-trips.
attendance rows have no build-tree attribution — deliverableId, buildOrderId, overheadId, and stageId are all null for them.