Magidoc

timeItems
Query

Returns TimeItem records, filtered by date, by Project, or by Todo. A TimeItem represents a line on the user's OMP Timesheet page, scoped to a specific week and target. The target can be a Project (Project-level time), a Todo within a Project (Task-level time), or a Non-Project Activity (company meetings, training, days off, administrative work).

Non-Project Activity TimeItems are represented as TimeItems with projectId and todoId both null and the organizationId field set — there is no separate kind enum. Each TimeItem can carry one or more Tags (organization-managed labels such as "Billable" or "Training") used for reporting.

Argument behavior is exclusive — arguments do not combine. The resolver matches one argument at a time, with precedence projectId, then todoId, then dates:

  • dates (a list of specific dates) — returns the calling user's own TimeItems matching the exact dates. To request a range, callers must enumerate every date in the range; per-week aggregation is not applied at the API layer.
  • projectId — returns TimeItems of any user against that Project or its Todos, provided the caller is permitted to view the Project (otherwise an empty list; an unknown projectId also yields an empty list). Only rows with at least one actual (non-planned) time entry dated today or earlier are included.
  • todoId — returns TimeItems of any user for that specific Todo, filtered per item by the caller's permissions.

At least one of dates, projectId, or todoId must be supplied; passing no arguments returns the error "Must provide at least one of: dates, project_id, todo_id".

TimeItems on soft-deleted Projects or Todos are excluded. A row's own soft delete is NOT filtered, however: rows removed with deleteTimeItem are still returned with their deletedAt set, so filter on that field client-side.

See also organizationActivityTimeItems (organization scope) and timeEntriesReport (Project scope, aggregated). Time tracking is a premium feature available on the Enterprise plan; queries against organizations without the feature may return empty results.

Arguments

#

dates

[Date !]

projectId

todoId

Response

#

Returns [TimeItem ].

Example

#