[Canonical page](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/load-profile/>)
[Full documentation index](<https://docs.dhtmlx.com/planning-engine/llms.txt>)


# LoadProfile

Load and capacity of each requested resource, bucket by bucket, over a date range. It's the `result` of [`JsonProject.loadProfile`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-load-profile.md>), measured on the solved baseline, and the `profile` field of the [`ScheduleResult`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/schedule-result.md>) that [`JsonProject.preview`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-preview.md>) returns when its options carry a `profile` query ([`ProfileQuery`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#profilequery>)), measured on the previewed dates.

## Fields

| Field | Type | Description |
|---|---|---|
| `basis` | `"hour"` \| `"day"` | Bucket size used: the query's `basis`, or the one derived from `config.duration_unit` when the query omits it. See [Load basis](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#load-basis>). |
| `resources` | [`ResourceLoad`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/load-profile.md#resourceload>)`[]` | One entry per measured resource, in the order of the query's `resources`, or in input order when the query lists none. |

Field names are camelCase. Dates use the output form `YYYY-MM-DD HH:mm`. See [Wire format](<https://docs.dhtmlx.com/planning-engine/wasm/wire-format.md#dates>).

## ResourceLoad

One resource and its buckets.

| Field | Type | Description |
|---|---|---|
| `resource` | [`Id`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#id>) | Resource id. |
| `capacityMode` | `"calendar"` \| `"flat"` | How capacity is spread over the buckets. `"calendar"`: the resource's capacity in buckets with working time on its calendar, `0` in the others. `"flat"`: the resource's capacity in every bucket. |
| `buckets` | [`LoadBucket`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/load-profile.md#loadbucket>)`[]` | Every bucket whose start lies in `[from, to)`, in time order, with no gaps. |

Which mode a resource gets depends on its calendar and the scheduling config. See [Resource load](<https://docs.dhtmlx.com/planning-engine/wasm/resources-and-assignment/resource-load.md>).

## LoadBucket

One time bucket of one resource.

| Field | Type | Description |
|---|---|---|
| `start` | [`DateValue`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#datevalue>) | Start of the bucket. |
| `load` | `number` | Booked work in assignment `value` units (`1` = 100 %). |
| `capacity` | `number` | Capacity in the same units. The bucket is overallocated when `load > capacity`. |
| `tasks` | [`Id`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#id>)`[]` | Present only when the query's `tasks` is `"overallocated"` or `"all"`. With `"overallocated"`: ids of the tasks booked in an overallocated bucket, `[]` in other buckets. With `"all"`: ids of every task booked in the bucket. Ids are in input order. |

How load is counted is described in [Resource load](<https://docs.dhtmlx.com/planning-engine/wasm/resources-and-assignment/resource-load.md>).

## Used by

- [`JsonProject.loadProfile`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-load-profile.md>) - the success envelope's `result`
- [`JsonProject.preview`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-preview.md>) - `result.profile`, when the options carry `profile`

## Example

A daily profile of one resource with no calendar, booked on two tasks at once on 2 January, queried with `tasks: "overallocated"`:

```json
{
  "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"] },
        { "start": "2026-01-03 00:00", "load": 1, "capacity": 1, "tasks": [] },
        { "start": "2026-01-04 00:00", "load": 0, "capacity": 1, "tasks": [] }
      ]
    }
  ]
}
```

## Related

- [`JsonProject.loadProfile`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-load-profile.md>) - the load of the accepted dates
- [`JsonProject.preview`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-preview.md>) - `profile` for previewed dates
- [`ProfileQuery`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#profilequery>) - the query fields
- [`Overallocation`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/overallocation.md>) - overload windows in scheduling results
- [Resource Load](<https://docs.dhtmlx.com/planning-engine/wasm/resources-and-assignment/resource-load.md>) - capacity modes and how load is counted
