Send Test Email

POST/zstack/v1/sns/application-endpoints/email/test-connection

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "emails": [
      "example@zstack.io"
    ],
    "platformUuid": "d5904b92d6df39a5905212bde24b2946",
    "endpointUuid": "2ff88c96f20f36469bdfcd2fa84e533d",
    "subject": "test email subject",
    "text": "this is a test email of content"
  },
  "systemTags": [],
  "userTags": []
}

In the above example, the systemTags and userTags fields are optional. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"emails":["example@zstack.io"],"platformUuid":"d5904b92d6df39a5905212bde24b2946","endpointUuid":"2ff88c96f20f36469bdfcd2fa84e533d","subject":"test email subject","text":"this is a test email of content"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/email/test-connection

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
emails (Optional)Listbody (contained in the params structure)Recipient email addresses 4.10.0
platformUuid (Optional)Stringbody (contained in the params structure)Email platform UUID 4.10.0
endpointUuid (Optional)Stringbody (contained in the params structure)Email endpoint UUID 4.10.0
subject (Optional)Stringbody (contained in the params structure)Subject 4.10.0
text (Optional)Stringbody (contained in the params structure)Content 4.10.0
systemTags (Optional)ListbodySystem tags 4.10.0
userTags (Optional)ListbodyUser tags 4.10.0

API Response

Response Example

{
  "connected": true,
  "webhookResp": {}
}
NameTypeDescriptionStarting Version
successboolean 4.10.0
connectedbooleanSend result4.10.0
webhookRespLinkedHashMapRemote response content4.10.0
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. See error4.10.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. If there is no root error, this field is null0.6

SDK Examples

Java SDK

SNSEmailTestConnectionAction action = new SNSEmailTestConnectionAction();
action.emails = asList("example@zstack.io");
action.platformUuid = "d5904b92d6df39a5905212bde24b2946";
action.endpointUuid = "2ff88c96f20f36469bdfcd2fa84e533d";
action.subject = "test email subject";
action.text = "this is a test email of content";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SNSEmailTestConnectionAction.Result res = action.call();

Python SDK

SNSEmailTestConnectionAction action = SNSEmailTestConnectionAction()
action.emails = [example@zstack.io]
action.platformUuid = "d5904b92d6df39a5905212bde24b2946"
action.endpointUuid = "2ff88c96f20f36469bdfcd2fa84e533d"
action.subject = "test email subject"
action.text = "this is a test email of content"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SNSEmailTestConnectionAction.Result res = action.call()