Skip to content
dimmiDocs

Reports and data

Report tickets by field

GET/api/v1/reports/tickets/by-field

Authorization

Authorizationstringrequired

An API token, sent as Bearer <token>.

Needs the tickets:read ability

Query parameters

type_idstringrequired

A type id from GET /ticket-types.

Maximum length: 64

fieldstringrequired

The key of one of the type's fields.

Maximum length: 40

fromstring

First day, 2006-01-02.

tostring

Last day included, 2006-01-02.

Response 200

OK
dataobjectrequired
Show child attributes
data_typestringrequired

The reported field's type: short_text, long_text, number, decimal, currency, boolean, date, single_choice, multiple_choice, file, member or company.

fieldstringrequired

Key of the reported field, such as order_number.

labelstringrequired

The reported field's name as people see it.

type_idstringrequired

Id of the ticket type the field belongs to, such as tktt_....

valuesobject[] | nullrequired

One row per value the field holds, each with how many tickets hold it and how many of those are resolved.

Show child attributes
resolvedintegerrequired

How many of the tickets holding this value are resolved.

Format: int64

ticketsintegerrequired

How many tickets hold this value.

Format: int64

valuestring | nullrequired

The field value being counted, as text. Null for the tickets that have no value for the field.

Response error

Error
codestringrequired

Stable code for programs to tell errors apart, such as validation_failed or internal_error.

errorsobject

Each rejected field mapped to its messages. Only present when the input was invalid.

messagestringrequired

What went wrong, in words safe to show a person.