Take these two tables in a database:
topicsthat contains a list of topicstermsthat contains a list of uni, bi and trigramsbaggingswith columnstopic_id,term_idandweight
A term can be used in several topics so how would you build the API endpoints? It's a query params vs path params...
Path Params
Query Params
GET https://localhost/terms/?filter_by=topic&filter_value=:topic-id
The last solution can also be useful to perform various terms operations and searches. The first (Path Params) can only be used in relation to the given topic.