What is a valid event in EventStore?

When I try to dispatch an event without eventId, I get:

HTTP / 1.1 400 Provided by empty eventId.

If I populate eventId with something random, I get:

HTTP / 1.1 400 Invalid input request element

In the server core, I see:

Error converting the value of "foo" to the type "System.Guid"

What does it take to get a valid EventId?

:

curl -i -d @event.json localhost:2113/streams/birthday-offer \ -H "Content-Type:application/vnd.eventstore.events+json" 

event.json:

 [ { "eventId": "foo", "eventType": "bar", "data": { "who": "11111111111", "which": "birthday-offer" } } ] 

I am not in .NET.

+5
source share
1 answer

Just in case anyone else comes across this question, EventId's answer is Guid.

According to the docs, you can even omit EventId and the server will provide you with an identifier.

+7
source

Source: https://habr.com/ru/post/1206832/


All Articles