| Required role: | Administrator | Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/EmailQueueSearch/{SearchTerm} | ||
|---|---|---|---|
| GET,OPTIONS | /v1/EmailQueueSearch |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class EmailQueueSearchRequest
{
public String SearchTerm = null;
public String getSearchTerm() { return SearchTerm; }
public EmailQueueSearchRequest setSearchTerm(String value) { this.SearchTerm = value; return this; }
}
public static class EmailQueueSearchResponse
{
public ArrayList<EmailQueue> QueueSearchResults = new ArrayList<EmailQueue>();
public ResponseStatus ResponseStatus = null;
public ArrayList<EmailQueue> getQueueSearchResults() { return QueueSearchResults; }
public EmailQueueSearchResponse setQueueSearchResults(ArrayList<EmailQueue> value) { this.QueueSearchResults = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public EmailQueueSearchResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class EmailQueue
{
public Integer EmailQueueId = null;
public String Recipient = null;
public String Sender = null;
public String Subject = null;
public String Body = null;
public Boolean IsBodyHTML = null;
public Boolean SendThroughAppEmail = null;
public String SenderUserId = null;
public String EmailFromName = null;
public Date DateCompleted = null;
public Date DateToSend = null;
public Integer FailCount = null;
public Integer getEmailQueueId() { return EmailQueueId; }
public EmailQueue setEmailQueueId(Integer value) { this.EmailQueueId = value; return this; }
public String getRecipient() { return Recipient; }
public EmailQueue setRecipient(String value) { this.Recipient = value; return this; }
public String getSender() { return Sender; }
public EmailQueue setSender(String value) { this.Sender = value; return this; }
public String getSubject() { return Subject; }
public EmailQueue setSubject(String value) { this.Subject = value; return this; }
public String getBody() { return Body; }
public EmailQueue setBody(String value) { this.Body = value; return this; }
public Boolean getIsBodyHTML() { return IsBodyHTML; }
public EmailQueue setIsBodyHTML(Boolean value) { this.IsBodyHTML = value; return this; }
public Boolean isSendThroughAppEmail() { return SendThroughAppEmail; }
public EmailQueue setSendThroughAppEmail(Boolean value) { this.SendThroughAppEmail = value; return this; }
public String getSenderUserId() { return SenderUserId; }
public EmailQueue setSenderUserId(String value) { this.SenderUserId = value; return this; }
public String getEmailFromName() { return EmailFromName; }
public EmailQueue setEmailFromName(String value) { this.EmailFromName = value; return this; }
public Date getDateCompleted() { return DateCompleted; }
public EmailQueue setDateCompleted(Date value) { this.DateCompleted = value; return this; }
public Date getDateToSend() { return DateToSend; }
public EmailQueue setDateToSend(Date value) { this.DateToSend = value; return this; }
public Integer getFailCount() { return FailCount; }
public EmailQueue setFailCount(Integer value) { this.FailCount = value; return this; }
}
}
Java EmailQueueSearchRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/EmailQueueSearch/{SearchTerm} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<EmailQueueSearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<QueueSearchResults>
<EmailQueue>
<Body>String</Body>
<DateCompleted>0001-01-01T00:00:00</DateCompleted>
<DateToSend>0001-01-01T00:00:00</DateToSend>
<EmailFromName>String</EmailFromName>
<EmailQueueId>0</EmailQueueId>
<FailCount>0</FailCount>
<IsBodyHTML>false</IsBodyHTML>
<Recipient>String</Recipient>
<SendThroughAppEmail>false</SendThroughAppEmail>
<Sender>String</Sender>
<SenderUserId>String</SenderUserId>
<Subject>String</Subject>
</EmailQueue>
</QueueSearchResults>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</EmailQueueSearchResponse>