Re: [rt-users] Rest API search by email?
On 04/10/2011 10:12 AM, elekistvan wrote: I think I found it out, I sent a ticket with my problem: http://issues.bestpractical.com/Ticket/Display.html?id=17076 Next time you create a ticket, please set your email address as the requestor so we can contact you about it. I've replied there. Thomas
Re: [rt-users] Rest API search by email?
I think I found it out, I sent a ticket with my problem: http://issues.bestpractical.com/Ticket/Display.html?id=17076 If I use a xxx.yyy...@gmail.com style e-mail address in a rest url, it does not give any valid answer however it should. With other email addresses it is working as expected, but my developer install contains test users with this kind of test gmail email addresses. Best Regards, Steve elekistvan elekist...@freemail.hu, ezt írta: Hi Christian, Thanks for the answer. I tried all version of the query, but I always got 'No matching results.' answers. However, I am pretty sure, that there are tickets what would match for these queries: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@freemail.hu' or http://rt_host/rt/REST/1.0/search/ticket?query=Owner='elekist...@freemail.hu' so, for eg. this is working: http://rt_host/rt/REST/1.0/search/ticket?query=Status='new' The user names and the e-mail addresses are the same, that's why i would expect valid answers. My rt version is: RT 3.8.5 Is this user list query is implemented in this version of this rest api? Or what do you think I am doing wrong? Thanks a lot! Nice weekend. Christian Loos cl...@netcologne.de, ezt írta: You must use the right field name. Try this: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@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='elekist...@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.
Re: [rt-users] Rest API search by email?
+ should be escaped, learn how to escape arguments in URLs. 2011/4/10 elekistvan elekist...@freemail.hu: I think I found it out, I sent a ticket with my problem: http://issues.bestpractical.com/Ticket/Display.html?id=17076 If I use a xxx.yyy...@gmail.com style e-mail address in a rest url, it does not give any valid answer however it should. With other email addresses it is working as expected, but my developer install contains test users with this kind of test gmail email addresses. Best Regards, Steve elekistvan elekist...@freemail.hu, ezt írta: Hi Christian, Thanks for the answer. I tried all version of the query, but I always got 'No matching results.' answers. However, I am pretty sure, that there are tickets what would match for these queries: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@freemail.hu' or http://rt_host/rt/REST/1.0/search/ticket?query=Owner='elekist...@freemail.hu' so, for eg. this is working: http://rt_host/rt/REST/1.0/search/ticket?query=Status='new' The user names and the e-mail addresses are the same, that's why i would expect valid answers. My rt version is: RT 3.8.5 Is this user list query is implemented in this version of this rest api? Or what do you think I am doing wrong? Thanks a lot! Nice weekend. Christian Loos cl...@netcologne.de, ezt írta: You must use the right field name. Try this: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@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='elekist...@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. -- Best regards, Ruslan.
[rt-users] Rest API search by email?
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='elekist...@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.
Re: [rt-users] Rest API search by email?
You must use the right field name. Try this: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@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='elekist...@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.
Re: [rt-users] Rest API search by email?
Hi Christian, Thanks for the answer. I tried all version of the query, but I always got 'No matching results.' answers. However, I am pretty sure, that there are tickets what would match for these queries: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@freemail.hu' or http://rt_host/rt/REST/1.0/search/ticket?query=Owner='elekist...@freemail.hu' so, for eg. this is working: http://rt_host/rt/REST/1.0/search/ticket?query=Status='new' The user names and the e-mail addresses are the same, that's why i would expect valid answers. My rt version is: RT 3.8.5 Is this user list query is implemented in this version of this rest api? Or what do you think I am doing wrong? Thanks a lot! Nice weekend. Christian Loos cl...@netcologne.de, ezt írta: You must use the right field name. Try this: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@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='elekist...@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.
Re: [rt-users] Rest API search by email?
On 04/08/2011 11:20 AM, elekistvan wrote: Hi Christian, Thanks for the answer. I tried all version of the query, but I always got 'No matching results.' answers. However, I am pretty sure, that there are tickets what would match for these queries: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@freemail.hu' or http://rt_host/rt/REST/1.0/search/ticket?query=Owner='elekist...@freemail.hu' so, for eg. this is working: http://rt_host/rt/REST/1.0/search/ticket?query=Status='new' If those are the actual URLs you're using, you're not properly encoding the value of the query parameter. At the very least in the cases above, = needs to be escaped as %3D. Thomas The user names and the e-mail addresses are the same, that's why i would expect valid answers. My rt version is: RT 3.8.5 Is this user list query is implemented in this version of this rest api? Or what do you think I am doing wrong? Thanks a lot! Nice weekend. Christian Loos cl...@netcologne.de, ezt írta: You must use the right field name. Try this: http://rt_host/rt/REST/1.0/search/ticket?query=Owner.EmailAddress='elekist...@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='elekist...@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.