Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Kevin Falcone
On Thu, Oct 13, 2011 at 11:26:20PM +, Srikumar Nair wrote:
 I see that the REST APIs has a search method to do search for tickets based 
 on some conditions (Request: 
 /REST/1.0/search/ticket?query=queryorderby=sort-orderformat=format).
 
 Is there an equivalent one for the Queue object? When I tried it I got error…
 
 Following is query string:
 
 /REST/1.0/search/queue?query= Name = 'My Special Queue'
 
 And the response is == (RT/4.0.2 500 Server Error. Unsupported object type)
 
 Is there a way to query/search non ticket objects using conditions?

RT's REST API is intended mostly for working with tickets (the query
is actually TicketSQL as available in the normal Query Builder UI).

If you need to work with and modify other RT objects, you'll want to
use RT's perl API.

-kevin


pgpjh060BPwFW.pgp
Description: PGP signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA — October 18  19, 2011
*  Washington DC, USA — October 31  November 1, 2011
*  Barcelona, Spain — November 28  29, 2011

Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Srikumar Nair
Thanks.. While searching for APIs I noticed some emails talking about the
Ticket_Overlay.pm file in the $RT_HOME/lib/RT folder.
But I can't seem to find any file with the name *Overlay* in this folder
(I am using 4.0.2).
Where are these *Overlay* files in 4.0.2?



On 10/14/11 5:52 AM, Kevin Falcone falc...@bestpractical.com wrote:

On Thu, Oct 13, 2011 at 11:26:20PM +, Srikumar Nair wrote:
 I see that the REST APIs has a search method to do search for tickets
based on some conditions (Request:
/REST/1.0/search/ticket?query=queryorderby=sort-orderformat=format
).
 
 Is there an equivalent one for the Queue object? When I tried it I got
errorŠ
 
 Following is query string:
 
 /REST/1.0/search/queue?query= Name = 'My Special Queue'
 
 And the response is == (RT/4.0.2 500 Server Error. Unsupported object
type)
 
 Is there a way to query/search non ticket objects using conditions?

RT's REST API is intended mostly for working with tickets (the query
is actually TicketSQL as available in the normal Query Builder UI).

If you need to work with and modify other RT objects, you'll want to
use RT's perl API.

-kevin

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA — October 18  19, 2011
*  Washington DC, USA — October 31  November 1, 2011
*  Barcelona, Spain — November 28  29, 2011


RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Barcelona, Spain  November 28  29, 2011


Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Kevin Falcone
On Fri, Oct 14, 2011 at 05:25:59PM +, Srikumar Nair wrote:
 Thanks.. While searching for APIs I noticed some emails talking about the
 Ticket_Overlay.pm file in the $RT_HOME/lib/RT folder.
 But I can't seem to find any file with the name *Overlay* in this folder
 (I am using 4.0.2).
 Where are these *Overlay* files in 4.0.2?

4.0 finally merged the Queue.pm and Queue_Overlay.pm files.
You can now safely read the Queue.pm or Ticket.pm file with perldoc

-kevin


 On 10/14/11 5:52 AM, Kevin Falcone falc...@bestpractical.com wrote:
 
 On Thu, Oct 13, 2011 at 11:26:20PM +, Srikumar Nair wrote:
  I see that the REST APIs has a search method to do search for tickets
 based on some conditions (Request:
 /REST/1.0/search/ticket?query=queryorderby=sort-orderformat=format
 ).
  
  Is there an equivalent one for the Queue object? When I tried it I got
 errorŠ
  
  Following is query string:
  
  /REST/1.0/search/queue?query= Name = 'My Special Queue'
  
  And the response is == (RT/4.0.2 500 Server Error. Unsupported object
 type)
  
  Is there a way to query/search non ticket objects using conditions?
 
 RT's REST API is intended mostly for working with tickets (the query
 is actually TicketSQL as available in the normal Query Builder UI).
 
 If you need to work with and modify other RT objects, you'll want to
 use RT's perl API.


pgpOwAPrUBpqT.pgp
Description: PGP signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA — October 18  19, 2011
*  Washington DC, USA — October 31  November 1, 2011
*  Barcelona, Spain — November 28  29, 2011

Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Srikumar Nair
Great.. Thanks Kevin.

On 10/14/11 10:29 AM, Kevin Falcone falc...@bestpractical.com wrote:

On Fri, Oct 14, 2011 at 05:25:59PM +, Srikumar Nair wrote:
 Thanks.. While searching for APIs I noticed some emails talking about
the
 Ticket_Overlay.pm file in the $RT_HOME/lib/RT folder.
 But I can't seem to find any file with the name *Overlay* in this folder
 (I am using 4.0.2).
 Where are these *Overlay* files in 4.0.2?

4.0 finally merged the Queue.pm and Queue_Overlay.pm files.
You can now safely read the Queue.pm or Ticket.pm file with perldoc

-kevin


 On 10/14/11 5:52 AM, Kevin Falcone falc...@bestpractical.com wrote:
 
 On Thu, Oct 13, 2011 at 11:26:20PM +, Srikumar Nair wrote:
  I see that the REST APIs has a search method to do search for tickets
 based on some conditions (Request:
 
/REST/1.0/search/ticket?query=queryorderby=sort-orderformat=form
at
 ).
  
  Is there an equivalent one for the Queue object? When I tried it I
got
 errorŠ
  
  Following is query string:
  
  /REST/1.0/search/queue?query= Name = 'My Special Queue'
  
  And the response is == (RT/4.0.2 500 Server Error. Unsupported
object
 type)
  
  Is there a way to query/search non ticket objects using conditions?
 
 RT's REST API is intended mostly for working with tickets (the query
 is actually TicketSQL as available in the normal Query Builder UI).
 
 If you need to work with and modify other RT objects, you'll want to
 use RT's perl API.

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA ˜ October 18  19, 2011
*  Washington DC, USA ˜ October 31  November 1, 2011
*  Barcelona, Spain ˜ November 28  29, 2011


RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Barcelona, Spain  November 28  29, 2011

Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Srikumar Nair
I am trying to use the following two lines of code to get started with the
PERL API..

my $ticket = RT::Ticket-new($RT::SystemUser);
$ticket-Create( Queue = 'General', Subject = 'Test Ticket');


But it results in the error..

Can't call method CaseSensitive on an undefined value at
/opt/rt4/lib/RT/Record.pm line 363.

Has anyone seen this issue?

Thanks


On 10/14/11 10:29 AM, Kevin Falcone falc...@bestpractical.com wrote:

On Fri, Oct 14, 2011 at 05:25:59PM +, Srikumar Nair wrote:
 Thanks.. While searching for APIs I noticed some emails talking about
the
 Ticket_Overlay.pm file in the $RT_HOME/lib/RT folder.
 But I can't seem to find any file with the name *Overlay* in this folder
 (I am using 4.0.2).
 Where are these *Overlay* files in 4.0.2?

4.0 finally merged the Queue.pm and Queue_Overlay.pm files.
You can now safely read the Queue.pm or Ticket.pm file with perldoc

-kevin


 On 10/14/11 5:52 AM, Kevin Falcone falc...@bestpractical.com wrote:
 
 On Thu, Oct 13, 2011 at 11:26:20PM +, Srikumar Nair wrote:
  I see that the REST APIs has a search method to do search for tickets
 based on some conditions (Request:
 
/REST/1.0/search/ticket?query=queryorderby=sort-orderformat=form
at
 ).
  
  Is there an equivalent one for the Queue object? When I tried it I
got
 errorŠ
  
  Following is query string:
  
  /REST/1.0/search/queue?query= Name = 'My Special Queue'
  
  And the response is == (RT/4.0.2 500 Server Error. Unsupported
object
 type)
  
  Is there a way to query/search non ticket objects using conditions?
 
 RT's REST API is intended mostly for working with tickets (the query
 is actually TicketSQL as available in the normal Query Builder UI).
 
 If you need to work with and modify other RT objects, you'll want to
 use RT's perl API.

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA ˜ October 18  19, 2011
*  Washington DC, USA ˜ October 31  November 1, 2011
*  Barcelona, Spain ˜ November 28  29, 2011


RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Barcelona, Spain  November 28  29, 2011

Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Kevin Falcone
On Fri, Oct 14, 2011 at 06:40:45PM +, Srikumar Nair wrote:
 I am trying to use the following two lines of code to get started with the
 PERL API..
 
 my $ticket = RT::Ticket-new($RT::SystemUser);
 $ticket-Create( Queue = 'General', Subject = 'Test Ticket');
 
 
 But it results in the error..
 
 Can't call method CaseSensitive on an undefined value at
 /opt/rt4/lib/RT/Record.pm line 363.
 
 Has anyone seen this issue?

Hopefully you have more than just those two lines in the file, I
suspect that your preamble isn't loading and connecting properly.

-kevin


pgp3zA7alUYVk.pgp
Description: PGP signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA — October 18  19, 2011
*  Washington DC, USA — October 31  November 1, 2011
*  Barcelona, Spain — November 28  29, 2011

Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Ruslan Zakirov
Hi,

You probably forgot to load config and init RT. Usually in the
beginning of a scrip you have:

use 5.008003;
use strict;
use warnings;

use lib qw(/opt/rt4/local/lib /opt/rt4/lib);

use RT;
RT::LoadConfig();
RT::Init();

... code goes here ...

On Fri, Oct 14, 2011 at 10:40 PM, Srikumar Nair srikum...@fb.com wrote:
 I am trying to use the following two lines of code to get started with the
 PERL API..

 my $ticket = RT::Ticket-new($RT::SystemUser);
 $ticket-Create( Queue = 'General', Subject = 'Test Ticket');


 But it results in the error..

 Can't call method CaseSensitive on an undefined value at
 /opt/rt4/lib/RT/Record.pm line 363.

 Has anyone seen this issue?

 Thanks


 On 10/14/11 10:29 AM, Kevin Falcone falc...@bestpractical.com wrote:

On Fri, Oct 14, 2011 at 05:25:59PM +, Srikumar Nair wrote:
 Thanks.. While searching for APIs I noticed some emails talking about
the
 Ticket_Overlay.pm file in the $RT_HOME/lib/RT folder.
 But I can't seem to find any file with the name *Overlay* in this folder
 (I am using 4.0.2).
 Where are these *Overlay* files in 4.0.2?

4.0 finally merged the Queue.pm and Queue_Overlay.pm files.
You can now safely read the Queue.pm or Ticket.pm file with perldoc

-kevin


 On 10/14/11 5:52 AM, Kevin Falcone falc...@bestpractical.com wrote:

 On Thu, Oct 13, 2011 at 11:26:20PM +, Srikumar Nair wrote:
  I see that the REST APIs has a search method to do search for tickets
 based on some conditions (Request:

/REST/1.0/search/ticket?query=queryorderby=sort-orderformat=form
at
 ).
 
  Is there an equivalent one for the Queue object? When I tried it I
got
 errorŠ
 
  Following is query string:
 
  /REST/1.0/search/queue?query= Name = 'My Special Queue'
 
  And the response is == (RT/4.0.2 500 Server Error. Unsupported
object
 type)
 
  Is there a way to query/search non ticket objects using conditions?
 
 RT's REST API is intended mostly for working with tickets (the query
 is actually TicketSQL as available in the normal Query Builder UI).
 
 If you need to work with and modify other RT objects, you'll want to
 use RT's perl API.

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA ˜ October 18  19, 2011
*  Washington DC, USA ˜ October 31  November 1, 2011
*  Barcelona, Spain ˜ November 28  29, 2011

 
 RT Training Sessions (http://bestpractical.com/services/training.html)
 *  San Francisco, CA, USA  October 18  19, 2011
 *  Washington DC, USA  October 31  November 1, 2011
 *  Barcelona, Spain  November 28  29, 2011



-- 
Best regards, Ruslan.

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Barcelona, Spain  November 28  29, 2011

Re: [rt-users] REST queries/search for queue objects in 4.0.2

2011-10-14 Thread Srikumar Nair
That is helpful.. That took care of the issue.

Thanks


On 10/14/11 3:16 PM, Ruslan Zakirov r...@bestpractical.com wrote:

Hi,

You probably forgot to load config and init RT. Usually in the
beginning of a scrip you have:

use 5.008003;
use strict;
use warnings;

use lib qw(/opt/rt4/local/lib /opt/rt4/lib);

use RT;
RT::LoadConfig();
RT::Init();

... code goes here ...

On Fri, Oct 14, 2011 at 10:40 PM, Srikumar Nair srikum...@fb.com wrote:
 I am trying to use the following two lines of code to get started with
the
 PERL API..

 my $ticket = RT::Ticket-new($RT::SystemUser);
 $ticket-Create( Queue = 'General', Subject = 'Test Ticket');


 But it results in the error..

 Can't call method CaseSensitive on an undefined value at
 /opt/rt4/lib/RT/Record.pm line 363.

 Has anyone seen this issue?

 Thanks


 On 10/14/11 10:29 AM, Kevin Falcone falc...@bestpractical.com wrote:

On Fri, Oct 14, 2011 at 05:25:59PM +, Srikumar Nair wrote:
 Thanks.. While searching for APIs I noticed some emails talking about
the
 Ticket_Overlay.pm file in the $RT_HOME/lib/RT folder.
 But I can't seem to find any file with the name *Overlay* in this
folder
 (I am using 4.0.2).
 Where are these *Overlay* files in 4.0.2?

4.0 finally merged the Queue.pm and Queue_Overlay.pm files.
You can now safely read the Queue.pm or Ticket.pm file with perldoc

-kevin


 On 10/14/11 5:52 AM, Kevin Falcone falc...@bestpractical.com
wrote:

 On Thu, Oct 13, 2011 at 11:26:20PM +, Srikumar Nair wrote:
  I see that the REST APIs has a search method to do search for
tickets
 based on some conditions (Request:

/REST/1.0/search/ticket?query=queryorderby=sort-orderformat=fo
rm
at
 ).
 
  Is there an equivalent one for the Queue object? When I tried it I
got
 errorŠ
 
  Following is query string:
 
  /REST/1.0/search/queue?query= Name = 'My Special Queue'
 
  And the response is == (RT/4.0.2 500 Server Error. Unsupported
object
 type)
 
  Is there a way to query/search non ticket objects using conditions?
 
 RT's REST API is intended mostly for working with tickets (the query
 is actually TicketSQL as available in the normal Query Builder UI).
 
 If you need to work with and modify other RT objects, you'll want to
 use RT's perl API.

RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA ˜ October 18  19, 2011
*  Washington DC, USA ˜ October 31  November 1, 2011
*  Barcelona, Spain ˜ November 28  29, 2011

 
 RT Training Sessions (http://bestpractical.com/services/training.html)
 *  San Francisco, CA, USA  October 18  19, 2011
 *  Washington DC, USA  October 31  November 1, 2011
 *  Barcelona, Spain  November 28  29, 2011



-- 
Best regards, Ruslan.


RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA  October 18  19, 2011
*  Washington DC, USA  October 31  November 1, 2011
*  Barcelona, Spain  November 28  29, 2011

[rt-users] REST queries/search for queue objects in 4.0.2

2011-10-13 Thread Srikumar Nair
I see that the REST APIs has a search method to do search for tickets based on 
some conditions (Request: 
/REST/1.0/search/ticket?query=queryorderby=sort-orderformat=format).

Is there an equivalent one for the Queue object? When I tried it I got error…

Following is query string:

/REST/1.0/search/queue?query= Name = 'My Special Queue'

And the response is == (RT/4.0.2 500 Server Error. Unsupported object type)

Is there a way to query/search non ticket objects using conditions?

Thanks


RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA — October 18  19, 2011
*  Washington DC, USA — October 31  November 1, 2011
*  Barcelona, Spain — November 28  29, 2011