[rt-users] REST and attachments

Jennifer Koermer JKoermer at prg.com
Tue Sep 29 09:23:44 EDT 2009


I'm using RT 3.8.4.  I'm interfacing with RT using a website written in
C#.  After struggling a bit, I finally figured out how to retrieve
ticket information, edit tickets, and create new tickets.  Now I'm just
trying to figure out how to incorporate attachments.

 

I'm creating a ticket with the following post in C#:

Content=id: ticket/new\nsubject: new ticket\nqueue:
Automation\nrequestor: user at domain.com\nText: This is the text of the
ticket\rA second line of text in the ticket

 

When I attempt to create a ticket with an attachment, I tried the
following:

Content=id: ticket/new\nsubject: new ticket\nqueue:
Automation\nrequestor: user at domain.com\nText: This is the text of the
ticket\rA second line of text in the ticket\nAttachment:
d:\\Inetpub\\RT-REST\\Files\\Penguins.jpg

 

I received the following response:

RT/3.8.4 409 Syntax Error

 

# Ticket 70 created.

# attachment: Unknown field.

 

id: ticket/new

subject: new ticket

requestor: user at domain.com

 

Has anyone had any success creating a ticket with an attachment using
REST?

What about commenting on an existing ticket and adding an attachment
using REST?

I know I can get around this by sending an email with the attachment,
but that seems like a round-about way of doing things.

 

Retrieving the attachments seems fairly straight forward, but I didn't
really see anything with any specific details on creating an attachment
via REST.

 

Thanks.

Jennifer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090929/783ec51c/attachment.htm>


More information about the rt-users mailing list