Christian Gilmore wrote:
> Thanks, Tom, for the reply.  Based on your recommendation, I searched for 
> the REST documentation and found http://wiki.bestpractical.com/view/REST. 
> I probably should have mentioned what I want to do. I'd like to be able to 
> get a report on the breakdown of tickets by a particular custom field's 
> values. I don't see an obvious way to do that through the REST interface. 
> I don't see a way through the standard web search interface to do it 
> wholesale, just one-by-one. Any ideas on how best to get these metrics?

If you can do the queries in TicketSQL, then you can do it with REST.

/REST/1.0/search/ticket/?query=<TicketSQL_query>&format=s

This will give you a list of tickets, which you can count.

The TicketSQL can be "CF.{Fieldname} = 'something'" or "CF.{Fieldname} > 0
and CF.{FieldName} < 100", or whatever.


Or, if using my ruby library rt-client:

rt = RT_Client.new
count = rt.list(:query => "CF.{Fieldname} = 'something'").size

-- 
-- ============================
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- ============================
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to