Suppose we have a resource which uses either MySQL or ElasticSearch, depending on whether the query params require full-text search or not.
For example the possible query filters are:
fk_id which is a foregien key ID of the table,
description which requires full-text search.
Should the resource URLs be:
- Option 1 - one endpoint:
- Option 2 - two endpoints
/resources?fk_id=abc-- name is not a valid param.
Which of the following is a better option for a general purpose API?