Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Get workload insights data in structured JSON format

What are Workload Insights? Workload Insights provides detailed analysis of open task volumes across projects and categories over time. Unlike Project Insights which focuses on completed work (time spent), Workload Insights examines the number of open tickets to answer forward-looking questions: “How much work is still in the system?” and “Is demand for services increasing or decreasing?”

What data is returned: The response includes two “sheets” of data in JSON format (matching the Excel export structure):

  • Summary sheet: Simple format with Period Label and Task Count columns. Quick overview of task volumes.
  • Detailed sheet: Long format (normalized) with one row per period/breakdown combination. Perfect for detailed analysis and pivot tables.

Supported analysis options:

  • Project selection: Analyze single project or compare multiple projects
  • Date range: Required for OVER_TIME model, not used for TODAY model
  • Model selection:
    • TODAY: Current snapshot of open tasks (similar to dashboard overview). Shows current state without time dimension.
    • OVER_TIME: Historical trend analysis showing how workload has changed over time. Helps identify if more work is coming in than being processed.
  • Period granularity: Required for OVER_TIME model - group by months or weeks
  • Breakdown options:
    • byProject: Task count breakdown by project
    • byTaskType: Task count breakdown by task category
    • byStatus: Task count breakdown by current status (New, In Progress, Feedback, etc.)
    • byAge: Task count breakdown by age groups (how long tasks have been open)

What counts as “open” tasks: A task is considered “open” when its status type is NOT Closed. This includes:

  • New tasks
  • Tasks In Progress
  • Tasks awaiting Feedback
  • Tasks in Backlog
  • Resolved tasks (not yet closed)

Only tasks with status type Closed are excluded from the analysis.

Use cases:

  • Monitor current workload across projects
  • Track workload trends over time to identify bottlenecks
  • Analyze task distribution by type, status, or age
  • Compare workload across multiple projects
  • Identify if demand is increasing faster than capacity
  • Export to Excel for capacity planning and resource allocation

Business value: Workload Insights helps managers:

  • Understand current capacity utilization
  • Identify projects with excessive backlogs
  • Plan resource allocation based on workload trends
  • Detect early warning signs of capacity issues
  • Make data-driven decisions about hiring or project prioritization
GET/insights/workload-chart
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
projectIdsany[][]required
Array of project UUIDs to analyze for turnover/revenue. Can select single project for detailed analysis or multiple projects for comparison. At least one project is required. Revenue data comes from invoices associated with these projects.
modelstringrequired
Chart model type for workload analysis. `TODAY` shows current snapshot of open tasks (similar to dashboard overview) without time dimension - perfect for understanding current capacity. `OVER_TIME` shows historical trend analysis revealing how workload has changed over time - helps identify if demand is increasing faster than capacity.
Allowed:TODAYOVER_TIME
startDatestring
Start date for the analysis period in ISO 8601 format (YYYY-MM-DD). Required for OVER_TIME model to determine the beginning of the trend analysis. Not used for TODAY model which shows current snapshot only.
endDatestring
End date for the analysis period in ISO 8601 format (YYYY-MM-DD). Required for OVER_TIME model to determine the end of the trend analysis. Must be after startDate if both are provided. Not used for TODAY model which shows current snapshot only.
periodsstring
Time period granularity for grouping workload data over time. `MONTHS` groups data by calendar month, `WEEKS` groups data by week. Required for OVER_TIME model to determine x-axis intervals. Not used for TODAY model. Months provide broader trends, weeks provide more detailed granularity.
Allowed:MONTHSWEEKS
breakdownBystring
Optional breakdown dimension for segmenting workload data. `PROJECT` breaks down by project, `TASK_TYPE` by task category, `STATUS` by current task status (New, In Progress, etc.), and `AGE` by how long tasks have been open (age groups). Breakdowns help identify bottlenecks and distribution patterns.
Allowed:PROJECTTASK_TYPESTATUSAGE
Responses
200Workload insights data in structured JSON format with summary and detailed sheets
detailedobjectrequired
Detailed sheet data (long/normalized format). One row per period/breakdown combination.
Show properties
headersstring[]required
Column headers for the sheet
rowsobject[]required
Data rows as array of objects, where keys match headers. Each row represents one data point.
titleobjectrequired
Sheet title information with main title and subtitle
metadataobjectrequired
Metadata about the query execution and results
summaryobjectrequired
Summary sheet data (simple format). Period labels as rows, task counts as columns.
Show properties
headersstring[]required
Column headers for the sheet
rowsobject[]required
Data rows as array of objects, where keys match headers. Each row represents one data point.
titleobjectrequired
Sheet title information with main title and subtitle
400Invalid request parameters (invalid dates, enum values, missing required fields for OVER_TIME model, etc.)
401Unauthorized - Invalid or missing authentication token
403User does not have permission to view workload insights (requires Insights.viewWorkloadInsights)
404One or more project IDs not found or user does not have access to them
Request
curl -X GET "https://leadtime.app/api/public/insights/workload-chart?projectIds=7acff2df-a904-4323-adcc-c2f24a769bde&model=OVER_TIME" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "detailed": {
    "headers": [
      "Period Label",
      "Tasks"
    ],
    "rows": [
      {
        "Period Label": "Jan 2024",
        "Tasks": 45
      },
      {
        "Period Label": "Feb 2024",
        "Tasks": 52
      }
    ],
    "title": {
      "main": "Workload Insights: Project Name",
      "subtitle": "Over Time, Breakdown by Task Type, Jan 2024 - Dec 2024, By Months"
    }
  },
  "metadata": {
    "hasMoreData": false,
    "periodsGenerated": 12,
    "queryExecutionTime": 234,
    "totalTasksProcessed": 1000
  },
  "summary": {
    "headers": [
      "Period Label",
      "Tasks"
    ],
    "rows": [
      {
        "Period Label": "Jan 2024",
        "Tasks": 45
      },
      {
        "Period Label": "Feb 2024",
        "Tasks": 52
      }
    ],
    "title": {
      "main": "Workload Insights: Project Name",
      "subtitle": "Over Time, Breakdown by Task Type, Jan 2024 - Dec 2024, By Months"
    }
  }
}