Closed
Description
We have a Product
resource, REST based:
- /products
- /products/{id}
Products have EAN codes (unique field), we've added a endpoint for scanned EAN input:
/product?ean=input
(note the singularity)
Ultimately, we may add additional validation filters, like:
/product?ean=input&flag=true
All query params are AND
and respond 400 if we cannot find a single resource for it (one or null). Or in case of optional result, 200 or 204 could be considerable.
From a REST perspective, would it be nice to have this out of the box? itemOperation: { query: ~ }
maybe? Given collections can already be filtered, i thought it's a small step relatively :)
Or maybe we can infer such an item operation from the collection operation (enable_single_query: true
).
Metadata
Metadata
Assignees
Labels
No labels