Time tracking

Learn how to filter by and read the time tracking column on monday boards using the platform API

The time tracking column represents the total time spent on a task. The API allows you to read and filter the time tracking column.

Read a time tracking column

You can query the time tracking column using the column_values object that enables you to return column-specific subfields by sending a fragment in your query. Values for the time tracking column are of the TimeTrackingValue type.

query {
  items (ids:[1234567890, 9876543210]) {
    column_values {
      ... on TimeTrackingValue {
        running
        started_at
      }
    }
  }
}

Fields

FieldDescription
column Column!The column the value belongs to.
duration IntThe total duration of the time tracker in seconds.
history [TimeTrackingHistoryItem!]!The column's history.
id ID!The column's unique identifier.
running BooleanReturns true if the time tracker is currently running.
started_at DateThe date the time tracker started.
text StringThe column's value as text. This field will return "" if the column has an empty value.
type ColumnType!The column's type.
updated_at DateThe column's last updated date.
value JSONThe column's JSON-formatted raw value.

Filter a time tracking column

Using the items_page object, you can easily filter a board's items by specific columns or column values. The table below contains the time tracking column's supported operators and compare values.

Operators

Compare Values

any_of

  • 1 (time tracker paused or empty)
  • 2 (time tracker running)

not_any_of

  • 1 (time tracker paused or empty)
  • 2 (time tracker running)

Examples

The following example returns all items on the specified board 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
      }
    }
  }
}