LoadProfile#

Per-bucket load and capacity of resources over a date range. Project#loadProfile returns one for the solved baseline. Project#preview with the profile option returns one for the previewed dates in result.profile. It's a fresh plain object that shares nothing with the project.

Fields#

Field Type Description
basis "hour" | "day" Bucket size used: the requested basis, or the one derived from config.duration_unit when none was requested.
resources ResourceLoad[] One entry per requested resource, in the order of the query's resources, or of the project's resources when the query lists none.

ResourceLoad#

The buckets of one resource.

Field Type Description
resource Id The resource id.
capacityMode "calendar" | "flat" How capacity is filled. "calendar": the resource's capacity in buckets with working time on its own calendar, 0 elsewhere. "flat": the resource's capacity in every bucket; used when the resource has no calendar, with a task calendar_mode, or with use_calendars: false.
buckets LoadBucket[] Every bucket whose start lies in the query's [from, to), in time order, with no gaps.

LoadBucket#

Load and capacity of one resource in one bucket. Both are in assignment value units: 1 = 100 %.

Field Type Description
start DateValue Bucket start. A "YYYY-MM-DD HH:MM" string, or a local Date on a project created with dates: "date".
load number Sum of the value of every assignment of the resource that works in this bucket. An assignment counts its full value even when it works only part of the bucket.
capacity number The resource's capacity in this bucket; see capacityMode. The bucket is overallocated when load > capacity.
tasks Id[] Ids of the tasks booked in this bucket, in input order. Absent with the query's tasks: "none" (the default). With "all", present in every bucket. With "overallocated", filled in overallocated buckets and [] elsewhere.

Used by#

Example#

Two day buckets of one resource booked on two tasks at once, queried with tasks: "overallocated":

const profile = {
  basis: "day",
  resources: [
    {
      resource: "dev",
      capacityMode: "flat",
      buckets: [
        { start: "2026-01-01 00:00", load: 1, capacity: 1, tasks: [] },
        { start: "2026-01-02 00:00", load: 2, capacity: 1, tasks: ["a", "b"] },
      ],
    },
  ],
};