UpdateEventData

API Request

URLs
PUT zstack/v1/zwatch/events/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "updateEventData": {
    "dataUuid": "a24e9918fdf83d0aae19846bd52411e4",
    "updateMode": "OnlyOne",
    "readStatus": "Read"
  },
  "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 '{"updateEventData":{"dataUuid":"a24e9918fdf83d0aae19846bd52411e4","updateMode":"OnlyOne","readStatus":"Read"}}' http://localhost:8080/zstack/v1/zwatch/events/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
dataUuid String body (contained in the updateEventData structure) Optional. The start time of the target messages. Make sure that InRange is transferred to updateMode. 3.3.0
dataStartTime Long body (contained in the updateEventData structure) Optional. The start time of the target messages. Make sure that InRange is transferred to updateMode. 3.3.0
dataEndTime Long body (contained in the updateEventData structure) Optional. The end time of the target messages. Make sure that InRange is transferred to updateMode. 3.3.0
updateMode String body (contained in the updateEventData structure) The range of the target messages to be updated. Options:
  • OnlyOne: updates only the specified messages.
  • InRange: updates the messages generated in a specified time range.
  • All: updates all messages.
  • OnlyOne
  • InRange
  • All
3.3.0
readStatus String body (contained in the updateEventData structure) Optional. The read status of the updated messages.
  • Read
  • Unread
3.3.0
systemTags List body Optional. The system tags. 3.3.0
userTags List body Optional. The user tags. 3.3.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes 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
UpdateEventDataAction action = new UpdateEventDataAction();
action.dataUuid = "a24e9918fdf83d0aae19846bd52411e4";
action.updateMode = "OnlyOne";
action.readStatus = "Read";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateEventDataAction.Result res = action.call();
Python SDK
UpdateEventDataAction action = UpdateEventDataAction()
action.dataUuid = "a24e9918fdf83d0aae19846bd52411e4"
action.updateMode = "OnlyOne"
action.readStatus = "Read"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateEventDataAction.Result res = action.call()