Document navigation

ValidateSNSSmsPluginEndpoint

API Request

URLs
PUT zstack/v1/sns/application-endpoints/plugin/sms/{uuid}/validate
Headers
Authorization: OAuth the-session-uuid
Body
{
  "validateSNSSmsPluginEndpoint": {
    "testMessage": "test message",
    "phoneNumbers": [
      "+86-18612345678"
    ]
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"validateSNSSmsPluginEndpoint":{"testMessage":"test message","phoneNumbers":["+86-18612345678"]}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/plugin/sms/d6973dc39d7437dd805b3a07b7f60975/validate
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The notification endpoint UUID. 5.5.38
phoneNumbers List body (contained in the validateSNSSmsPluginEndpoint structure) The test phone numbers. Specify one to 200 unique phone numbers. 5.5.38
testMessage String body (contained in the validateSNSSmsPluginEndpoint structure) The test SMS content is required and can contain up to 1024 characters. 5.5.38
systemTags List body Optional. The system tags. 5.5.38
userTags List body Optional. The user tags. 5.5.38

API Response

When this API succeeds, an empty JSON structure is returned{}. When an error occurs, the returned JSON structure contains an error field. For example,
{
    "error": {
        "code": "SYS.1001",
        "description": "A message or a operation timeout",
        "details": "Create VM on KVM timeout after 300s"
    }
}

SDK Sample

Java SDK
ValidateSNSSmsPluginEndpointAction action = new ValidateSNSSmsPluginEndpointAction();
action.testMessage = "test message";
action.uuid = "d6973dc39d7437dd805b3a07b7f60975";
action.phoneNumbers = java.util.Arrays.asList("+86-18612345678");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ValidateSNSSmsPluginEndpointAction.Result res = action.call();
Python SDK
action = ValidateSNSSmsPluginEndpointAction()
action.testMessage = "test message"
action.uuid = "d6973dc39d7437dd805b3a07b7f60975"
action.phoneNumbers = ["+86-18612345678"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
API Reference | 5.5.38 | ZStack Cloud · ZCF | ZStack Resource Center