REST: attachments & transactions

Hello RT Users,

I’m trying to get the ‘To’ and ‘Cc’ fields content of the original e-mail
of a message. For each message, I want to know who recieved it (and then
maybe add some recipients as ticket observers).

And I need to do that using the REST interface.

Is there a simple way to get the original e-mail (attachment object) from
a message (correspond transaction object)?

In the transaction information, obtained in response to (for example):
/REST/1.0/ticket/18/history/id/2377
there is no information about the original e-mail attachment. I think that
the only way to get that object is to check every attachment related to
the ticket (but it needs too many HTTP request):
/REST/1.0/ticket/18/attachments
and then:
/REST/1.0/ticket/18/attachments/586
/REST/1.0/ticket/18/attachments/587
/REST/1.0/ticket/18/attachments/588
… and so on, until the attachment contains “Transaction: 2377” and seems
to be the original e-mail.

In other words, when we have an original e-mail attachment id, it’s easy
to get the related transaction (“Transaction:” field). But, when we have a
transaction id, it is much more difficult to get the original e-mail
attachment (it is not present in the “Attachments:” field).

Did I miss something or is that sadly true? I use RT 3.6.

Thanks.

Regards,

Martin Bouladour.