v1

latestOpenAPI 3.0.32026-08-0613775357.6 KB
reports

Create totals

Generates and returns only the aggregated totals for a report.

post/reports/totals

Request body

view'time_fees_hours' | 'time_fees_days' | 'time_fees_amounts' | 'time_fees_hours_and_amounts' | 'time_fees_days_and_amounts' | 'budgets_hours' | 'budgets_days' | 'budgets_amounts' | 'utilization' | 'expenses' required

The name of the report view, which determines the columns returned.

group_bystring[] required

Attributes to group and sort rows by (up to 5 levels).

todaystring date

The date on which past/incurred time ends and future scheduled time begins (YYYY-MM-DD). The default value is the current UTC date (YYYY-MM-DD).

calc_incurred_using'confirmed-unconfirmed' | 'confirmed' | 'approved'

Method for calculating incurred time. There are three options: confirmed-unconfirmed (default, always used in reports UI), confirmed, or approved.

The reports UI always uses confirmed-unconfirmed. If your account settings specify that incurred time should use confirmed time only, the reports UI still applies the confirmed-unconfirmed option. It also adds a default filter on entry_type, which removes unconfirmed time, achieving the same effect with regards to incurred calculations.

The only difference between the two methods —filtering out unconfirmed time and specifying calc_incurred_using as confirmed— lies in how past scheduled time gets calculated when no corresponding confirmed time exists for a given day of an assignment. Filtering out unconfirmed time affects both incurred and past scheduled time, while specifying calc_incurred_using as confirmed doesn't impact past scheduled time. You can think of it this way: when calc_incurred_using is set to confirmed, the report calculates as if the “clear suggestions” button got pushed on everyone's timesheets.

Example request

{
  "view": "time_fees_hours",
  "time_frame": "this_week",
  "group_by": [
    "client",
    "user_id"
  ],
  "filters": {
    "project_id": {
      "values": [
        432,
        561,
        642
      ]
    },
    "project_tags": {
      "values": [
        432,
        561,
        642
      ]
    },
    "client": {
      "values": [
        432,
        561,
        642
      ]
    },
    "leave_type": {
      "values": [
        432,
        561,
        642
      ]
    },
    "project_type": {
      "values": [
        432,
        561,
        642
      ]
    },
    "project_state": {
      "values": [
        432,
        561,
        642
      ]
    },
    "phase_name": {
      "values": [
        432,
        561,
        642
      ]
    },
    "user_id": {
      "values": [
        432,
        561,
        642
      ]
    },
    "role": {
      "values": [
        432,
        561,
        642
      ]
    },
    "discipline": {
      "values": [
        432,
        561,
        642
      ]
    },
    "location": {
      "values": [
        432,
        561,
        642
      ]
    },
    "assignment_status": {
      "values": [
        432,
        561,
        642
      ]
    },
    "people_tags": {
      "values": [
        432,
        561,
        642
      ]
    },
    "date": {
      "values": [
        432,
        561,
        642
      ]
    },
    "week": {
      "values": [
        432,
        561,
        642
      ]
    },
    "month": {
      "values": [
        432,
        561,
        642
      ]
    },
    "record_type": {
      "values": [
        432,
        561,
        642
      ]
    },
    "entry_type": {
      "values": [
        432,
        561,
        642
      ]
    },
    "category": {
      "values": [
        432,
        561,
        642
      ]
    },
    "approval_status": {
      "values": [
        432,
        561,
        642
      ]
    },
    "approved_by": {
      "values": [
        432,
        561,
        642
      ]
    },
    "custom_fields": [
      {
        "id": 4321,
        "operation": "inclusion",
        "values": [
          "E",
          "S",
          "R"
        ]
      }
    ]
  },
  "today": "2018-03-28",
  "calc_incurred_using": "confirmed-unconfirmed"
}

Response

A JSON representation of the report totals (aggregated metrics).

total_incurred_hoursnumber
total_scheduled_hoursnumber