Object change record (changes)

Description

Any change to certain objects (entity types) is recorded in the change log. Each log element represents one specific operation performed on a specific object.

Changes are: creating a new object (create), changing field values of an existing object (update), deleting an existing object (delete).
The change history log in each creation row contains the full JSON representation at the time of creation. Each update row contains the full JSON representation of the object after the corresponding change, as well as the list of fields that were changed. Each delete row contains the value of the identifier field.

Limitations

  • A change record cannot be created or deleted directly. Their totality is only a reflection of the stored history.

  • The log stores the history of operations only for entities managed by the domain center (reflected in the entities specification).

  • Saving to the log and parallel writing to the `platform/log/HistoryChanges` collection are controlled by the store_history_options setting.

Fields

Entity structure
{
  "cmdtype": uuid,
  "dtutc": date,
  "fields": str,
  "modifierid": uuid,
  "modifiername": str,
  "obj": object,
  "objid": uuid,
  "objtype": str
}
Table 1. Fields
Specification Description

Field: cmdtype
Mode: out
Type: str

Operation type.
Possible values:

  • "update" – Values of an existing object were changed.

  • "create" – A new object was created.

  • "delete" – A previously existing object was deleted.

Field: dtutc
Mode: out
Type: date

Date/time in UTC when the operation was performed, in RFC3339 format.
For example, "2019-08-21T13:59:39.833Z".

Field: fields
Mode: out
Type: str

List of object fields that were changed.
Only for cmdtype = update.
For example, "enabled,ext.lwt,lwt,opts.comment".

Field: modifierid
Mode: out
Type: uuid

Identifier of the user account on whose behalf the operation was performed.

Field: modifiername
Mode: out
Type: str

Name of the user account on whose behalf the operation was performed.

Field: source
Mode: out
Type: str

Change source: ui – user via a session (interface, REST and websocket collection API); token:<channel type> – integration channel token, e.g. token:public, token:mcp; script – script; system – platform service. Some operations (e.g. changing one’s own password, uploading an avatar) are recorded with the system source or without a source. In the central log, a change from another site preserves the source site.
Absent if the source is not determined.

Field: obj
Mode: out
Type: object

Full object content as a JSON structure.
For create and field-value update operations, after the operation.
For delete operations, immediately before deletion.

Field: objid
Mode: out
Type: uuid

Object identifier

Field: objtype
Mode: out
Type: str

Entity type.
For example, "provider".

See also

Logical roles

  • mdc and sdc manage entities and save data to the change log.