This feature is available from iCM 10.1.0.102
Description
This function hides an event in a history. It works with active and sealed histories. Hidden events are not returned by getHistory() or getHistories() unless in audit mode.
Hidden events are assigned a negative number as their position, removing them from the normal sequence of events. The remaining events are renumbered to close any gaps in the sequence.
Hiding an event also writes a hidden "metadata event" which includes the ID of the event, the type of action (ie "hide") and the optional reason. Metadata events are returned when history queries are made in audit mode.
It is not possible to hide a history's "subject" event.
For an overview, see Hiding and Replacing Events.
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
| eventid | positive integer | Yes | The event id to hide - from log/replaceEvent's response, or a gethistory event's eventId |
| id | string (UUID) | One of id / labels | The ID of the history the event belongs to. Mutually exclusive with labela-labele |
| labela ... labele | simple value | " | The labels to identify the history |
| reason | string | No | Free text, stored in the metadata event. Omit entirely for no reason field at all. |
Returns
If the operation was successful then the "result" structure will contain the following.
| Property | Description |
|---|---|
| historyid | The unique ID of the history |
| eventid | The ID of the event |
| metadataeventid | The ID of the corresponding metadata event |
Example
{
"method": "hideevent",
"params": {
"labela": "HideEventTest",
"labelb": "1234-1234-1234-1234",
"eventid": 1042,
"reason": "testing"
}
}
"result": {
"historyid": "3f1c9a2e-...-9a6a6a2b6d10",
"eventid": 1042,
"metadataeventid": 1044
}
