[Rt-devel] REST Interface enhancements

Jesse Vincent jesse at bestpractical.com
Mon Feb 20 13:19:59 EST 2006




On Sat, Feb 18, 2006 at 07:43:35PM -0600, Bob Goldstein wrote:
> 
> Jesse (or anyone else!), I have some general comments on RT's
> REST interface. I'll probably write something to suit my
> immediate needs, but if you think this might be interesting, I'd
> rather organize it to help others as well.
> 
> My immediate need is that I want to query and control user
> parameters from a separate program, one that we use for general
> account provisioning. 
> 
> Seems to me, there are two ways an external program can
> interact with RT -- email and web. Email has authentication
> issues, and the asynchronicity makes it hard to confirm
> success/error of the requests.  REST, however, would be perfect.

There's also the full, proper perl API. 

> 
> Now, the current REST interface doesn't do groups, my first
> concern. But I've come to realize, it is organized for 'rt', the
> command line processor. Specifically, it transmitts in "forms",
> basically ascii name-value pairs, as opposed to, say,
> Data::Dumper representation of more complicated perl structures.

Whereas, I see simple RFC822 style forms as somewhat of a win over more
complex datastructures for remote resource munging. It's all a matter
of how you slice and dice your resources.

> And secondly, to add/delete something, there is too much
> intelligence required in the client. 'rt' has to query the
> status, figure out how to change the status to reflect the
> required addition or deletion, and then resubmit the new status.
> As opposed to telling the server, "Hey, add this", and get back
> either "done", "moot" or "error".




> The end result is that an external program would probably munge
> the data into a system call to rt, and then munge the result back
> into a perl structure. As opposed to just including a library,
> and making the lwp call directly.  Somehow it ought to
> be easier.

It should certainly work to add someone to a list (such as should
already work for Requestor/Cc/AdminCc on tickets)




More information about the Rt-devel mailing list