Appends one event to the selected branch and space. Strata assigns the next sequence number, stamps the event with its append timestamp, and links it into the tamper-evident hash chain. Events are immutable once appended.
Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.
Examples
Append an event to the log.
CLI
$ strata event append user.created {"id":1}
$ strata event count
Wire
{"event_type":"user.created","payload":{"id":1},"type":"event_append"}
{"type":"event_count"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
event_type | string | yes | Event type. |
payload | any | yes | Event payload. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
MutationAck<EventAppend>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.event_typeinvalid_argument.engine.event_payloadinvalid_argument.engine.event_payload_too_large
Invocation
- CLI:
strata event append - Wire type:
event_append