Toggle menu

hideEvent()

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

FieldTypeRequiredNotes
eventidpositive integerYesThe event id to hide - from log/replaceEvent's response, or a gethistory event's eventId
idstring (UUID)One of id / labelsThe ID of the history the event belongs to. Mutually exclusive with labela-labele
labela ... labelesimple value"The labels to identify the history
reasonstringNoFree 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.

PropertyDescription
historyidThe unique ID of the history
eventidThe ID of the event
metadataeventidThe 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
}

Last modified on 5 August 2026