Best way to pull body text from a ticket

Hello! I would like to be able to pull body text from an RT ticket for use in another application, but I cannot find where body text is stored in mysql. What would be the best way to pull the body text from just an RT number? I’m using version 4.0.7.

Any guidance toward where the text blobs are stored or a SQL statement to grab one would be appreciated. :slight_smile:

Take it easy.

Is there a reason for not using the REST api? https://rt-wiki.bestpractical.com/wiki/REST

You should find the body text in the attachments table, I think the oldest attachment on a ticket is the “body” i.e. first message which created the ticket.

This is very helpful info, thanks. I didn’t know there was such a thing. I didn’t set this system up, I’m just trying to pull info from it and this is the first time I’m looking at the DB and how to interact with it. Thanks again. :slight_smile:

1 Like