[rt-users] Rest API search by email?

Christian Loos cloos at netcologne.de
Fri Apr 8 03:05:55 EDT 2011


You must use the right field name.
Try this:
http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekistvan at freemail.hu'

The best way would be to create the search with the query builder and
then copy and paste the query from the advanced tab to the REST url.

-Chris

Am 08.04.2011 08:16, schrieb elekistvan:
> Dear All,
> 
> I would need to use the rest api to query the tickets by e-mail address.
> For eg, something like that: 
> http://rt_host/rt/REST/1.0/search/ticket?query=OWNER.Email='elekistvan at freemail.hu'
> Is it possible to query tickets by email via rest api?
> 
> I would need to query these conditions:
> my $tickets = new RT::Tickets($RT::SystemUser);
> ...
> $tickets->FromSQL("(status = 'new' or status = 'open') and  (Owner.EmailAddress = '" . $email . "' or Requestor.EmailAddress = '" . $email . "' or Cc.EmailAddress = '" . $email . "' or AdminCc.EmailAddress = '" . $email . "' or Watcher.EmailAddress = '" . $email . "' or QueueCc.EmailAddress = '" . $email . "'  or QueueAdminCc.EmailAddress = '" . $email . "')");
> ...
> 
> If currently this rest api query is not implemented, do you think the solution would be to extend the rest api? 
> for eg: https://gist.github.com/737979
> Is it difficult to do?
> 
> Thanks a lot,
> Steve.
> 
> 



More information about the rt-users mailing list