GET /api/v2/views/{view_id}/count

Returns the ticket count for a single view.

This endpoint is rate limited to 5 requests per minute, per view, per agent.

View Counts

The view count endpoints, Count Tickets in View (this endpoint) and Count Tickets in Views, let you estimate how many tickets remain in a view without having to retrieve the entire view. They're designed to help estimate view size. From a business perspective, accuracy becomes less relevant as view size increases.

To ensure quality of service, these counts are cached more heavily as the number of tickets in a view grows. For a view with thousands of tickets, you can expect the count to be cached for 60-90 minutes. As a result, the count may not reflect the actual number of tickets in your view.

View counts are represented as JSON objects with the following attributes:

NameTypeComment
view_idintegerThe id of the view
urlstringThe API url of the count
valueintegerThe cached number of tickets in the view. Can also be null if the system is loading and caching new data. Not to be confused with 0 tickets
prettystringA pretty-printed text approximation of the view count
freshbooleanfalse if the cached data is stale and the system is still loading and caching new data
activebooleanOnly active views if true, inactive views if false, all views if null.

Example

{
  "view_count": {
    "view_id": 25,
    "url":     "https://company.zendesk.com/api/v2/views/25/count.json",
    "value":   719,
    "pretty":  "~700",
    "fresh":   true
  }
}

Servers

Path parameters

Name Type Required Description
view_id Integer Yes

The ID of the view

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.