V3_UtilHistory_AddEvent (Post)
- Last UpdatedNov 06, 2025
- 2 minute read
| Post | V3_UtilHistory_AddEvent |
Resource Path:/api/v3/UtilHistory/AddEvent
| Name | Description |
|---|---|
| trans_id | Used to supply the ID of the transaction if the call is taking part in a transaction. |
The request body is of type Mes.WebApi.Models.V3.Util.UtilEvent.
The response body is of type Mes.WebApi.Models.V3.Util.UtilEvent.
OKAdds a utilization event record to the Util_History table for an event of a specific duration and that can span one or more existing events. This method allows you to split an existing event or merge one or more events.
The following UtilEvent model properties must have non-null values.
- To identify the entity to which the utilization event is being added: ent_id.
- To provide the time when the event is to start: event_time_utc.
- To provide the reason for the utilization event: reas_cd.
The transactions that can be executed using this operation are described below.
To add a new past event:
Pass the start time in UTC in the event_time_utc model property and the end time in the event_end_time_utc property.
For any existing past events that are split by the new past event, the end time (for the previous event) or start time (for the next event) are adjusted accordingly. Any events that are completely spanned by the new event are deleted. If the new past event has the same reason as the previous or next event, those two events are merged.
To add a new current event:
Pass the start time in UTC in the event_time_utc model property and pass a null in the event_end_time_utc property.
The new event becomes the current event. The end time of the existing past event that is split by the new event is adjusted accordingly. Any events that are completely spanned by the new event are deleted. If the new current event has the same reason as the previous event, those two events are merged.