Send an SNMP Test Message

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

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "platformUuid": "d71f754a80663dc7a6a2003cc5667846",
    "endpointUuid": "e3a38d5d8d123991bd0a986150f3e6df"
  },
  "systemTags": [],
  "userTags": []
}

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

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"platformUuid":"d71f754a80663dc7a6a2003cc5667846","endpointUuid":"e3a38d5d8d123991bd0a986150f3e6df"}}' http://localhost:8080/zstack/v1/sns/application-endpoints/snmp/test-connection

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
platformUuid (optional)Stringbody (contained in the params structure)SNMP platform UUID4.10.0
endpointUuid (optional)Stringbody (contained in the params structure)SNMP endpoint UUID4.10.0
systemTags (optional)ListbodySystem tags4.10.0
userTags (optional)ListbodyUser tags4.10.0

API Response

Response Example

{
  "connected": true,
  "webhookResp": {}
}
NameTypeDescriptionStarting Version
successboolean 4.10.0
connectedbooleanWhether the connection is reachable4.10.0
webhookRespLinkedHashMapRemote response4.10.0
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error4.10.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.4.10.0
descriptionStringA brief description of the error4.10.0
detailsStringDetailed information about the error4.10.0
elaborationStringReserved field. Default is null.4.10.0
opaqueLinkedHashMapReserved field. Default is null.4.10.0
causeErrorCodeThe root error. The source error that caused the current error. If there is no root error, this field is null.4.10.0

SDK Examples

Java SDK

SNSSnmpTestConnectionAction action = new SNSSnmpTestConnectionAction();
action.platformUuid = "d71f754a80663dc7a6a2003cc5667846";
action.endpointUuid = "e3a38d5d8d123991bd0a986150f3e6df";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SNSSnmpTestConnectionAction.Result res = action.call();

Python SDK

SNSSnmpTestConnectionAction action = SNSSnmpTestConnectionAction()
action.platformUuid = "d71f754a80663dc7a6a2003cc5667846"
action.endpointUuid = "e3a38d5d8d123991bd0a986150f3e6df"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SNSSnmpTestConnectionAction.Result res = action.call()