Get ticket count by field

GET {{baseUrl}}/api/v1/ticketsCountByFieldValues?field=<String>

This API returns the ticket count of your help desk, filtered by a specific field.

OAuth Scope

  • Desk.search.READ
  • Desk.tickets.READ

Request Params

KeyDatatypeRequiredDescription
departmentIdstringID of the department from which ticket count must be fetched. If you do not pass this parameter in the API request, ticket count across all departments will be returned.&nbsp;
assigneeIdstringID of the agent assigned to resolve the ticket
contactIdstringID of the contact who raised the ticket
accountIdstringID of the account to which the ticket is mapped
categorystringCategory of the ticket
customField1stringUser-defined field in the ticket
customField2stringUser-defined field in the ticket
customField3stringUser-defined field in the ticket
createdTimeRangestringKey that filters tickets created in a particular period of time. Enter the from and to dates in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ; for example, createdTimeRange=2017-11-05T00:00:00.000Z,2018-09-05T23:59:00.000Z
modifiedTimeRangestringKey that filters tickets modified in a particular period of time. Enter the from and to dates in the ISO date format of yyyy-MM-ddThh:mm:ss.SSSZ; for example, modifiedTimeRange=2017-11-05T00:00:00.000Z,2018-09-05T23:59:00.000Z
fieldstringField by which the ticket count must be filtered. Values allowed are. <br>status,<br> <br>priority,<br> <br>channel,<br> <br>statusType,<br> <br>spam,<br> <br>overDue<br>

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{&quot;overDue&quot;:2,&quot;statusType&quot;:[{&quot;count&quot;:&quot;13&quot;,&quot;value&quot;:&quot;OPEN&quot;},{&quot;count&quot;:&quot;0&quot;,&quot;value&quot;:&quot;ONHOLD&quot;},{&quot;count&quot;:&quot;0&quot;,&quot;value&quot;:&quot;CLOSED&quot;}],&quot;channel&quot;:[{&quot;count&quot;:&quot;6&quot;,&quot;value&quot;:&quot;twitter&quot;},{&quot;count&quot;:&quot;3&quot;,&quot;value&quot;:&quot;forums&quot;},{&quot;count&quot;:&quot;2&quot;,&quot;value&quot;:&quot;chat&quot;},{&quot;count&quot;:&quot;2&quot;,&quot;value&quot;:&quot;web&quot;}],&quot;priority&quot;:[{&quot;count&quot;:&quot;8&quot;,&quot;value&quot;:&quot;high&quot;},{&quot;count&quot;:&quot;5&quot;,&quot;value&quot;:&quot;medium&quot;}],&quot;spam&quot;:10,&quot;status&quot;:[{&quot;count&quot;:&quot;9&quot;,&quot;value&quot;:&quot;open&quot;},{&quot;count&quot;:&quot;4&quot;,&quot;value&quot;:&quot;escalated&quot;}]}