- Previous: api.service.search.doMarketSearch
- Up: Methods
- Next: api.service.email.getMostRecentEmail
api.service.email.getEmails
api.service.email::getEmails
Retrieves the details about the specified emails from the EDS Email Archive. This method is fully customizable on what amount of data is returned.
Note: You can specify up to 50 UUIDs per request.
However, due to a limitation of our webserver and the URI length being limited to 4096 characters, if you request more than ~15-20 UUIDs you must specify the UUIDs within a POST instead of GET.
Service
api.service.email
Paging
The getEmail method will automatically page the results if more than per-page (by default this is 25) results are returned. The following parameters are used to control the paging functionality.
page: The current page you would like to return.
per-page: The max number of results to return per page (Max per page can not exceed 50).
Determing if there is more data:
The XML response contains a value is-complete. The value will be false if there are more pages to request. The value will be true when the page is equal to or greater than the last page.
Arguments
api-key (Required) : Your API application key.
uuid (Required) : 1 or more UUIDs to retrieve. The primary way to determine valid UUIDs is either from the getMostRecentEmail request or the search service.
--optional parameters---
NOTE: It is important to take note of which parameters are returned by default and must be explicitly disabled and which parameters are only returned if explicitly enabled.
include-all: 1 or 0 (default). Overrides all other parameters and always returns all of the available data.
headers: 1 or 0 (default). Returns the email headers as part of the response.
html: 1 or 0 (default). Returns the HTML content of the email as part of the response.
text: 1 or 0 (default) Returns the TEXT content of the email as part of the response.
redirects: 1 or 0 (default). Returns all of the links within the email and their resulting status codes.
sender: 1 or 0 (default). Returns the sender information, including IP address and domain name
host: 1 or 0 (default). Returns the host information about the sender (if available).
subject: 1 (default) or 0. Returns the subject of the email.
from: 1 (default) or 0. Returns the from address information of the email, including sender and domain.
image-token: 1 (default) or 0. Returns the image token, which can then be passed to the image service to retrieve an image of the email as it was received.
Example Response
Request:
http://api.emaildatasource.com/service/2.0.0/rest/api.service.email?method=getEmails&uuid=4dc213ff-c575-45d4-bc30-62e456b03fd8&include-all=1
Note: If the image-token is returned, the response will always include the full url to download the image for both the full-image and the thumbnail-image.
- <?xml version="1.0" encoding="utf-8" ?="?">
- <response status="success">
- <format>rest-xml</format>
- <version>2.0</version>
- <email-results>
- <num-results>1</num-results>
- <current-page>1</current-page>
- <per-page>50</per-page>
- <is-complete>true</is-complete>
- <email-result uuid="4dc213ff-c575-45d4-bc30-62e456b03fd8">
- <header>
- <date-received>20081004173616</date-received>
- <date-sent>20081004173343</date-sent>
- <content-type>multipart/alternative</content-type>
- <from-domain>The Daily Reckoning <dr@dailyreckoning.com></from-domain>
- <sender-domain>financial2.net [208.250.48.77]</sender-domain>
- <message-id>
- <user>LYRIS-13647513-1564974-2008.10.04-13.33.43--aa5734#xcorp5.com</user>
- <host>financial2.net</host>
- <to-string>LYRIS-13647513-1564974-2008.10.04-13.33.43--aa5734#xcorp5.com@financial2.net</to-string>
- </message-id>
- </header>
- <subject>The Daily Reckoning - Exploring All Your Options...</subject>
- <from-address>
- <user>dr</user>
- <host>dailyreckoning.com</host>
- <title>The Daily Reckoning</title>
- <to-string>dr@dailyreckoning.com [The Daily Reckoning]</to-string>
- </from-address>
- <sender-address>
- <user>bounce-1564974-13647513</user>
- <host>financial2.net</host>
- <to-string>bounce-1564974-13647513@financial2.net</to-string>
- </sender-address>
- <content>
- <html-content>
- HTML-CONTENT
- </html-content>
- <text-content>
- TEXT-CONTENT
- </text-content>
- </content>
- <email-links size="6">
- <email-link status-code="302" link-type="UNKNOWN_EA2" error-message="">http://www.isecureonline.com/secure/FORM1.CFM</email-link>
- <email-link status-code="200" link-type="UNKNOWN_EA2" error-message="">http://www.isecureonline.com/secure/FORM1.CFM</email-link>
- <email-link status-code="302" link-type="UNKNOWN_EA2" error-message="">http://www.ezimages.net/upload/confirm/confirm.cfm</email-link>
- <email-link status-code="200" link-type="UNKNOWN_EA2" error-message="">http://www.ezimages.net/upload/confirm/confirm.cfm</email-link>
- <email-link status-code="200" link-type="UNKNOWN_EA2" error-message="">http://www.ezimages.net/service/index.cfm</email-link>
- <email-link status-code="200" link-type="UNKNOWN_EA2" error-message="">http://dailyreckoning.com/DR_07/Whitelist07.html</email-link>
- </email-links>
- <email-image>
- <is-external>true</is-external>
- <download-url-full>http://image-api.emaildatasource.com/service/2.0.0/rest/api.service.image?method=getEmailImage&image-type=full&uuid=4dc213ff-c575-45d4-bc30-62e456b03fd8&token=k8gkWIGvzhwkvIic6BrSuXnwwB+5y/V6mDpWeQ/jvqP1WPUTbkbTheo3fO2nq/Yy</download-url-full>
- <download-url-thumbnail>http://image-api.emaildatasource.com/service/2.0.0/rest/api.service.image?method=getEmailImage&image-type=thumbnail&uuid=4dc213ff-c575-45d4-bc30-62e456b03fd8&token=k8gkWIGvzhwkvIic6BrSuXnwwB+5y/V6mDpWeQ/jvqP1WPUTbkbTheo3fO2nq/Yy</download-url-thumbnail>
- </email-image>
- </email-result>
- </email-results>
- </response>
Error Codes
500: General Error: In most cases this will be caused by an invalid UUID. It is necessary to check the error message to determine the exact cause.
- Previous: api.service.search.doMarketSearch
- Up: Methods
- Next: api.service.email.getMostRecentEmail
0 Comments
Please sign in to post a comment.