add query api for event store