# Export underlying report data to CSV

Exports the specified underlyting report data as comma-separated values (CSV).

Endpoint: POST /reports/underlying_data.csv
Version: v1
Security: AuthToken

## Request fields (application/json):

  - `view` (string, required)
    The name of the report view, which determines the columns returned.
    Enum: "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"

  - `time_frame` (any, required)
    The time frame for the report. Can be a shortcut string or a custom object.

  - `group_by` (array, required)
    Attributes to group and sort rows by (up to 5 levels).
    Enum: "user_id", "role", "discipline", "location", "assignment_status", "date", "week", "month", "project_id", "client", "leave_type", "project_type", "project_state", "phase_name", "record_type", "entry_type", "category", "approval_status", "approved_by"

  - `filters` (object)
    A map of attributes to filter on. Keys are attribute names (e.g., project_id, people_tags, custom_fields), and values are filter specifications.
> Note: All attributes available for group_by are also available for filtering. To include or exclude null values in your filter, specify the string [none] as an element in your filter's values array.

  - `filters.project_id` (object)

  - `filters.project_id.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.project_id.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.project_tags` (object)

  - `filters.project_tags.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.project_tags.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.client` (object)

  - `filters.client.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.client.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.leave_type` (object)

  - `filters.leave_type.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.leave_type.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.project_type` (object)

  - `filters.project_type.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.project_type.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.project_state` (object)

  - `filters.project_state.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.project_state.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.phase_name` (object)

  - `filters.phase_name.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.phase_name.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.user_id` (object)

  - `filters.user_id.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.user_id.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.role` (object)

  - `filters.role.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.role.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.discipline` (object)

  - `filters.discipline.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.discipline.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.location` (object)

  - `filters.location.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.location.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.assignment_status` (object)

  - `filters.assignment_status.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.assignment_status.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.people_tags` (object)

  - `filters.people_tags.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.people_tags.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.date` (object)

  - `filters.date.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.date.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.week` (object)

  - `filters.week.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.week.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.month` (object)

  - `filters.month.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.month.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.record_type` (object)

  - `filters.record_type.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.record_type.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.entry_type` (object)

  - `filters.entry_type.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.entry_type.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.category` (object)

  - `filters.category.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.category.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.approval_status` (object)

  - `filters.approval_status.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.approval_status.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.approved_by` (object)

  - `filters.approved_by.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.approved_by.values` (array, required)
    The values to include or exclude. [none] can be used to represent a null value.
    Example: [432,561,642]

  - `filters.custom_fields` (array)
    Custom field filters require an array of objects specifying ID, operation, and values.
    Example: [{"id":4321,"operation":"inclusion","values":["E","S","R"]}]

  - `filters.custom_fields.id` (integer, required)
    The custom field ID.
    Example: 4321

  - `filters.custom_fields.operation` (string, required)
    Enum: "inclusion", "exclusion"

  - `filters.custom_fields.values` (array, required)
    The values to include or exclude.
    Example: ["E"]

  - `today` (string)
    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).
    Example: "2018-03-28"

  - `calc_incurred_using` (string)
    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.
    Enum: "confirmed-unconfirmed", "confirmed", "approved"


## Response 400 fields
