Appends multiple events to the selected branch and space in one engine commit. Sequences are assigned in entry order. Entries that fail validation report a positional item error while valid entries still append.
Itemwise batches return one positional item result per input item. The outer batch status summarizes whether all, some, or none of the items succeeded.
Examples
Append many events in one commit.
CLI
$ strata command run --command-json '{"entries":[{"event_type":"user.created","payload":{"id":1}},{"event_type":"user.updated","payload":{"id":2}}],"type":"event_batch_append"}'
$ strata event count
Wire
{"entries":[{"event_type":"user.created","payload":{"id":1}},{"event_type":"user.updated","payload":{"id":2}}],"type":"event_batch_append"}
{"type":"event_count"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
entries | BatchEventEntry[] | yes | Events to append. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
BatchResult<EventBatchAppendItem>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.event_batchinvalid_argument.engine.event_typeinvalid_argument.engine.event_payloadinvalid_argument.engine.event_payload_too_large
Invocation
- CLI: via
strata command run(no dedicated verb) - Wire type:
event_batch_append