| Requires any of the roles: | Worker, Agent, Administrator, Worker, Agent, Administrator, Worker, Agent, Administrator, Worker, Agent, Administrator |
| GET,POST,PUT,DELETE,OPTIONS | /v1/AgentEmailCredentials |
|---|
import Foundation
import ServiceStack
public class AgentEmailCredentialsRequest : Codable
{
public var agentEmailCredentials:[AgentEmailCredentials] = []
required public init(){}
}
public class AgentEmailCredentials : Codable
{
public var id:Int
public var agentId:Int
public var emailAddress:String
public var username:String
public var password:String
public var smtpServer:String
public var smtpPort:Int?
public var smtpAuthType:String
public var poP3Server:String
public var poP3Port:Int?
public var poP3AuthType:String
public var imapServer:String
public var imapPort:Int?
public var dateCreated:Date
public var dateModified:Date
required public init(){}
}
public class AgentEmailCredentialsResponse : Codable
{
public var responseStatus:ResponseStatus
public var agentEmailCredentials:[AgentEmailCredentials] = []
required public init(){}
}
Swift AgentEmailCredentialsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/AgentEmailCredentials HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
AgentEmailCredentials:
[
{
Id: 0,
AgentId: 0,
EmailAddress: String,
Username: String,
Password: String,
SMTPServer: String,
SMTPPort: 0,
SMTPAuthType: String,
POP3Server: String,
POP3Port: 0,
POP3AuthType: String,
IMAPServer: String,
IMAPPort: 0,
DateCreated: 0001-01-01,
DateModified: 0001-01-01
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
AgentEmailCredentials:
[
{
Id: 0,
AgentId: 0,
EmailAddress: String,
Username: String,
Password: String,
SMTPServer: String,
SMTPPort: 0,
SMTPAuthType: String,
POP3Server: String,
POP3Port: 0,
POP3AuthType: String,
IMAPServer: String,
IMAPPort: 0,
DateCreated: 0001-01-01,
DateModified: 0001-01-01
}
]
}