Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

Get time bookings grid

Retrieves a paginated, filterable grid of all time booking entries in the workspace.

What are Time Bookings? Time bookings (also called time logs or time entries) are records of working hours that employees have logged to specific tasks or projects. They document how much time was spent on different activities, which is essential for:

  • Project planning and resource allocation
  • Billing customers accurately
  • Analyzing productivity and team workload
  • Understanding where time is being spent in the organization

What data is returned: The grid returns time booking entries with the following information:

  • Date: When the time was logged
  • Hours: Amount of time logged (decimal format, e.g., 8.5 for 8 hours 30 minutes)
  • Comment: Optional notes about the work performed
  • Project ID: The project the time was logged to
  • Task ID: The specific task (if time was logged to a task rather than just a project)
  • User ID: Which employee logged the time
  • Activity ID: The type of work performed (e.g., development, research, management)
  • Value Group: The project value group for categorization

Response includes:

  • Paginated list of time booking items
  • Total count of matching entries
  • totalHours: Sum of all hours across filtered entries (useful for reporting)
  • Current page and page size

Filtering and sorting: You can filter by date range, project, task, user, activity, or value group. Quick search is available on comments. Results are sorted by date (newest first) by default.

Permissions: Requires either “seeLoggedTimeDetails” (to see your own time) or “seeCompanyLoggedTime” (to see all company time).

GET/timebookings/timeGrid
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
pagenumber

Page number (1-based)

pageSizenumber

Number of items per page

viewIdstring

View identifier for saved grid configurations

quickSearchstring

Quick search text. Searches across: comment

filtersstring

JSON string containing filter configuration.

Available Fields:

  • date (date): Date of the time log entry
  • hours (number): Hours logged
  • comment (string): Comment for the time log entry
  • projectId (set): Project ID
  • taskId (set): Task ID
  • userId (set): User ID who logged the time
  • activityId (set): Activity ID
  • valueGroup (set): Project value group

Filter Structure:

[
  {
    "type": "string|number|date|set|boolean|array|task_status|task_type",
    "fieldName": "field_name",
    "value": {
      "comparison": "comparison_type",
      "value": "filter_value"
    }
  }
]

Group Filters (AND/OR Combinations):

[
  {
    "type": "group",
    "fieldName": "group0.18807479823070028",
    "value": {
      "type": "or",
      "filters": [
        {
          "type": "string",
          "fieldName": "fileName",
          "value": {
            "comparison": "contain",
            "value": "aa"
          }
        },
        {
          "type": "number",
          "fieldName": "rowCount",
          "value": {
            "comparison": ">=",
            "value": 33
          }
        }
      ]
    }
  }
]

Available Comparison Operators:

  • date (date): Date of the time log entry (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty
  • hours (number): Hours logged (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty
  • comment (string): Comment for the time log entry (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • projectId (set): Project ID (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
  • taskId (set): Task ID (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
  • userId (set): User ID who logged the time (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
  • activityId (set): Activity ID (set filter). Available comparisons: in, not_in, is_empty, is_not_empty
  • valueGroup (set): Project value group (set filter). Available comparisons: in, not_in, is_empty, is_not_empty

Note: Use quickSearch parameter for simple text search instead of adding it to filters.

sortstring

JSON array of sort objects.

Sortable Fields:

  • date: Date of the time log entry
  • hours: Hours logged
  • projectId: Project ID
  • taskId: Task ID
  • userId: User ID who logged the time
  • activityId: Activity ID

Sort Structure:

[
  {
    "field": "field_name",
    "direction": "asc|desc"
  }
]

Default Sort: date (desc)

fieldsToReturnstring[]

Comma-separated list of field names to include in response items. If not provided, all fields are returned.

Available Fields: date, hours, comment, projectId, taskId, userId, activityId, valueGroup

groupstring

Group time bookings by date. When set, response includes groupMeta with fragment/full totals per group. Use "none" for ungrouped list. Default: none.

Allowed:dayweekmonthnone
Responses
200

Successfully retrieved time bookings grid

groupMetaobject[]

Group metadata when grouping is enabled (e.g. group=day, group=week, group=month). Each entry describes a group on the current page: groupKey, pageFragmentCount, fullGroupCount, pageFragmentSum, fullGroupSum, and continuation flags. Order matches group appearance in items.

Show properties
Array of object
continuedFromPreviousboolean
continuesToNextboolean
fullGroupCountnumber
fullGroupSumnumber
groupKeystring
pageFragmentCountnumber
pageFragmentSumnumber
itemsobject[]required

Array of time booking entries matching the filter criteria. Each item represents a single time log entry with details about when, who, what, and how much time was logged.

Show properties
Array of object
activityIdstring

UUID of the activity type (e.g., Development, Design, Management)

commentstring | null

Optional comment describing the work performed

datestring<date-time>

Date when the work was performed (ISO 8601 format)

hoursnumber

Number of hours logged (decimal format, e.g., 8.5 for 8 hours 30 minutes)

idstring

Unique identifier of the time booking entry

projectIdstring

UUID of the project this time was logged to. Always present.

taskIdstring | null

UUID of the task this time was logged to. Null if time was logged directly to a project.

userIdstring

UUID of the user (employee) who logged this time

pagenumberrequired

Current page number (1-based). The first page is page 1.

pageSizenumberrequired

Number of items per page. This is the page size you requested (or the default if not specified). The actual number of items in the items array may be less than this if you are on the last page.

totalnumberrequired

Total number of time booking entries matching the filter criteria across all pages. Use this to calculate total pages: Math.ceil(total / pageSize)

totalChildrennumber

Total number of child items when grouping is enabled. With strict raw-record pagination, this equals total. Only present when grouping is used.

totalHoursnumberrequired

Sum of all hours across all filtered time booking entries. This is useful for reporting and calculating total time spent. The value is the sum of the hours field from all matching entries.

400

Invalid query parameters

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Request
curl -X GET "https://leadtime.app/api/public/timebookings/timeGrid" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "groupMeta": [
    {
      "continuedFromPrevious": false,
      "continuesToNext": false,
      "fullGroupCount": 12,
      "fullGroupSum": 114.3,
      "groupKey": "2026-02-19",
      "pageFragmentCount": 12,
      "pageFragmentSum": 114.3
    }
  ],
  "items": [
    {
      "activityId": "550e8400-e29b-41d4-a716-446655440004",
      "comment": "Development work on feature X",
      "date": "2025-01-15T00:00:00.000Z",
      "hours": 8.5,
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "projectId": "550e8400-e29b-41d4-a716-446655440002",
      "taskId": "550e8400-e29b-41d4-a716-446655440001",
      "userId": "550e8400-e29b-41d4-a716-446655440003"
    }
  ],
  "page": 1,
  "pageSize": 100,
  "total": 150,
  "totalChildren": 250,
  "totalHours": 1250.5
}