Skip to content

Add a dedicated filter/query endpoint for single resources #3270

Description

@ro0NL

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions