Skip to content

State History

State history is an array of states that the entity has been in.

State History Model

Each state history entry has the following fields:

Field Type Description
id String ID of the history entry.
stateId String ID of entity's state.
timestamp Integer Timestamp of the entity's state change.
comment String User-made comment on the state change.
commentTimestamp String Timestamp of the comment.
reason Object Condition that caused the state change. See Reason section for more information.
reason.code Integer The condition that caused the state change. See the Reason Codes section.
reason.text String The reason for the manual state change.
reason.by String The ID of the user that caused the state change.
reason.data Object Additional information about the state change condition.
reason.data.exceptionClass String The class of exception that caused the state change
reason.data.message String Exception message.
reason.rootCause String Root-cause transition information. See the Root cause section.
reason.branch Object Condition that triggered the incident. See the Branch section for more information.

Reason

Reason Codes

Code Reason
- No reason for a state change. Used for the Created state.
1 Deprecated. Now treated as code 10. If parent's state priority is less than that of a current object, propagate the current object state.
2 Deprecated. Now treated as code 10. If parent's state priority is greater than that of a current object, propagate the sibling with greatest priority.
3 No suitable condition.
4 Sensor error.
5 No children left.
6 No data from agent.
7 Agent down.
8 Monitoring is disabled.
9 Agent task removed.
10 State change in the child object.
11 No data from agent.
12 External change.
13 Manual change.
14 Periodic event was triggered on an object with no data.
15 Data Expiration.
16 Change state on the incident clearing.

Root-cause transition

Root cause indicates that transition is caused by a child element.

Field Type Description
rootCause.entityId String Entity ID.
rootCause.entityType Integer The type of entity.
rootCause.entityName String Name of the entity.
data Object Additional information about the state change reason. Depends on the state change reason.

Branch

Field Type Description
branch.state Integer The state to which the entity transfers if the condition is met.
branch.condition Object Condition under which the entity transfers state. See supported operators below and format below.
branch.description String Description of the state change condition.

Logical operator format.

"operator": "value"

Supported operators:

Field Description
_ct Contains
_eq Equal to
_gt Greater than
_gte Greater than or equal to
_lt Less than
_lte Less than or equal to
_m Matches with
_nct Not contains
_neq Not equal to