Closed codeliner closed 7 years ago
Also related to https://github.com/prooph/event-store/issues/284
If we decide for option 1, I'd suggest prop_<no>_<field|operator|value>
or p_<no>_<f|o|v>
I would say let's use post and json for this.
Problem with POST:
How do we want to design the filter capabilities?
We can
load
andloadReverse
with an optionalMetadataMatcher
but how do we expose those filters in the http-api?Two options:
1) Using query params in the format:
?meta_1_field=_aggregate_id&meta_1_operator=eq&meta_1_value=abcd-efgt-ijklmnop&meta_2_field=_aggregate_version&meta_2_operator=gte&meta_2_value=10
We could also shorten the params so that
meta_1_field
becomesm_1_f
for examle Andmeta_<no>_operator
could be optional and default toeq
This would save a lot of characters because the length of an URI is somewhat limited.2) Use
POST
and send filters as JSON in the request body.