Learn how to filter by and read the time tracking column on monday boards using the platform API
The time tracking column records the total time spent on item/task, allowing teams to track work duration over sessions.
Via the API, the time tracking column supports read and filter operations.
Column Type | Implementation Type | Supported Operations |
|---|---|---|
|
|
|
Queries
Time tracking columns can be queried through the column_values field on items queries using an inline fragment on TimeTrackingValue.
query {
items(ids: [1234567890, 9876543210]) {
column_values {
... on TimeTrackingValue {
running
started_at
}
}
}
}Fields
You can use the following fields to specify what information your TimeTrackingValue implementation will return.
| Field | Description |
|---|---|
column Column! | The column the value belongs to. |
duration Int | The total tracked time, in seconds. |
history [TimeTrackingHistoryItem!]! | The column's history. |
id ID! | The column's unique identifier. |
running Boolean | Whether the timer is currently running. |
started_at Date | The date the time tracker started. |
text String | The column's value as text. Returns "" if the column has an empty value. |
type ColumnType! | The column's type. |
updated_at Date | The column's last updated date. |
value JSON | The column's JSON-formatted raw value. |
Filter
You can filter items by time tracking values using the items_page object. The time tracking column supports the following operators:
Operators | Compare Values |
|---|---|
|
|
|
|
Example
The following example returns all items with a running time tracker.
query {
boards(ids: 1234567890) {
items_page(
query_params: {
rules: [
{
column_id: "time_tracking"
compare_value: [2]
operator: any_of
}
]
}
) {
items {
id
name
}
}
}
}