[Rt-devel] Create/Edit Ticket via HTTP and REST

Frank F. Smith ffs1 at cornell.edu
Wed Oct 1 11:33:33 EDT 2008


Good Morning!
I hope this is the appropriate list -- if "users" would be better, I 
could do that too. I searched mailing list archives and found several 
similar questions, but no answers.

Situation: I need to implement cross-platform programmatic CRUD access 
to RT. RT is running on an email server under Linux/Apache, but we have 
other code on other machines (viz. C#/.Net running under Windows) that 
needs to create or edit RT tickets.

Obvious solution seems to be HTTP Get or Post to the RT server. Based on 
<http://wiki.bestpractical.com/view/REST>, I can retrieve a ticket via 
HTTP Get to \{domain}\{server}\REST\1.0\ticket\{ticket_id}, getting 
response with plain text content of ticket properties. Create and Edit 
have me flummoxed, though.

Editing the content payload retrieved above (e.g., changing the Queue) 
and POSTing to ...\REST\1.0\ticket\{ticket_id}: I just get back the 
original ticket.
Likewise for ...\REST\1.0\ticket\{ticket_id}\edit
Other URIs I've tried (\ticket\edit\{ticket_id}, \ticket\edit) all fail 
with various error messages.

My Questions:
How do I construct the URI for create and edit?
If the content model for POST is different from the returned content 
from GET, what is it?

Even a pointer in the right direction for someone whose Perl skills are 
minimal would be appreciated.

Thanks,

-- 
Frank F. Smith

PESTICIDE SALES AND USE REPORTING DATABASE GROUP
20 THORNWOOD DR STE 106
ITHACA NY  14850-1265

Email: ffs1 at cornell.edu
Phone: (607) 257-5706



More information about the Rt-devel mailing list