Forums/Product news and updates/API updates

Executing ticket views and applying macros

Steven Yan
posted this on July 08, 2012 16:04

Three new additions to API v2 are now available:

Ability to execute views and retrieve view counts

In our API v2 views documentation, you can now find examples of how to execute a view as well as retrieve rule counts for one view or for many views.  Note that executing a view will not return all the tickets in that view, but it will return a row/column representation of the view according to your view's configuration.  This is a much requested addition to our API that will help allow API consumers to duplicate and enhance the ticket view functionality that already exists in Zendesk.

Generating view previews (dynamic views)

As part of our Views API, you can also create a preview view.  A preview view functions exactly like a normal view, except that the view does not need to already exist in Zendesk.  Much like a regular view, you can specify the conditions for the view as well as what columns, sorting and ordering you prefer.

Applying a macro

We've also added the API v1 equivalent of applying a macro.  The API will return a ticket response which represents the contents of the ticket with the macro applied.  Note that this will not actually modify the ticket unless you make a separate PUT request to update the ticket.