Hey dear Community,
So currenbtly I am searching for a way to retrieve The Email content on each and every Ticket we receive.
I know about rest/api/2/issues/search?jql= API but unfortunately it does not retrieve the HTML Emails of the Ticket. Is there any way to retrieve Emails alongside with ticket information via REST?
Hello @Konstantin Schuckmann
Attached emails are stored inside the attachments field, but the Search for issues using JQL endpoint cannot return the contents of that field in any way, shape or form.
You will need to do the following:
1. Use the Search for issues endpoint with a JQL query to find the set of issues in the required date range.
2. From that set of issues, one-by-one for each issue, use the Get issue endpoint to get the contents of the attachments field to get the set of attachments and their IDs.
3. From that set of attachment IDs, one-by-one for each attachment, use the Get attachment content endpoint to get whatever is inside that email attachment.
Have fun.
Thank you for the reply This one worked fine.
I am just wondering if this approach will increase the computational power since the system is almost at the edge with all the current communication
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad it worked out.
As regards concerns about load effects... relax. You're on a CLOUD platform. There is practically no 'edge' that you can realistically reach :) The environment's computational power is dynamic scaled based on the overall load from millions of concurrent connections from tens of thousands of shared tenants and balanced across dozens of Amazon data centres around the planet.
That said, don't do silly things with the REST APIs or you will encounter the rate limits. Do your requests in batches, watch the response headers for the warning signs that you're flying too close to the sun, then back off your requests if required.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the community @Konstantin Schuckmann !
Can you elaborate further on your use case?
What do you mean by the HTML email content? if you are searching for HTML tags then you can just use the following JQL:
text ~ "<html>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sure,
I am searching for a way to retrieve the received Emails.
Our current process is as follows
incoming email -> automatic Ticket creation via I dont know :-) -> all further mail communication is attached to this Ticket -> I search for created Tickets with mails and download these for further local process.
When I use rest/api/2/search I get all coresponding info to any Ticket within inserted JQL, unfortunatelly no attached emails from the ticket. So I would like to see something similar like
rest/api/2/serach?jql=created >(-1d) which outputs a JSON looking like so or similar like the one from rest/api/2/serach? but with the following additions
{ticket_abc:{customfieldid_123: email in html format, customfieldid_124: email in txt format ...}
So each Ticket holds also all received emails in either txt format or html format
Is it clear now?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.