Update Event Data
Headers
Authorization: OAuth the-session-uuidBody
{
"updateEventData": {
"dataUuid": "a24e9918fdf83d0aae19846bd52411e4",
"updateMode": "OnlyOne",
"readStatus": "Read"
},
"systemTags": [],
"userTags": []
}In the above example, the systemTags and userTags fields can be omitted. 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 PUT -d '{"updateEventData":{"dataUuid":"a24e9918fdf83d0aae19846bd52411e4","updateMode":"OnlyOne","readStatus":"Read"}}' http://localhost:8080/zstack/v1/zwatch/events/actionsParameter List
Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
dataUuid (Optional) | String | body (contained in the updateEventData structure) | The UUID of the resource. Uniquely identifies the resource. |
| 3.3.0 |
dataStartTime (Optional) | Long | body (contained in the updateEventData structure) | The start time for selecting target messages. The updateMode must be set to InRange. |
| 3.3.0 |
dataEndTime (Optional) | Long | body (contained in the updateEventData structure) | The end time for selecting target messages. The updateMode must be set to InRange. |
| 3.3.0 |
updateMode | String | body (contained in the updateEventData structure) | The scope of target messages to update. OnlyOne updates only the specified message, InRange updates messages generated within a specific time range, All updates all messages. |
| 3.3.0 |
readStatus (Optional) | String | body (contained in the updateEventData structure) | Updates the read status of the message. |
| 3.3.0 |
systemTags (Optional) | List | body | System tags. |
| 3.3.0 |
userTags (Optional) | List | body | User tags. |
| 3.3.0 |
API Response
On success, this API returns an empty JSON structure {}. On failure, 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 Examples
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()