anserini icon indicating copy to clipboard operation
anserini copied to clipboard

REST API design

Open lintool opened this issue 9 months ago • 2 comments

@16BitNarwhal will work on this.

A few resources:

  • https://stackoverflow.com/questions/30967822/when-do-i-use-path-params-vs-query-params-in-a-restful-api
  • https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/

@16BitNarwhal will propose a few designs... @sahel-sh and @ronakice and I will provide feedback.

See https://github.com/castorini/rank_llm/issues/110 for what I mean by "propose a few designs".

lintool avatar Apr 30 '24 18:04 lintool

Another thing to consider: what does Elasticsearch and OpenSearch expose? One option is just to mirror that?

lintool avatar Apr 30 '24 18:04 lintool

I'm currently thinking of having the API route like /api/collection/${collection}/search?query=${query} collection as a path param and query as a query param since collection is a resource and query is for searching the collection (based on the first StackOverflow link)

16BitNarwhal avatar Apr 30 '24 18:04 16BitNarwhal

First impl here #2486 - @16BitNarwhal do you want to leave this issue open or close it?

lintool avatar May 14 '24 01:05 lintool

I think we can close it

16BitNarwhal avatar May 14 '24 01:05 16BitNarwhal