Page MenuHomeSoftware Heritage

rename API endpoint /content/search/ to /content/known/
Closed, MigratedEdits Locked

Description

Rename /content/search/ to /content/known/, to highlight it's an existence test and not a generic content search functionality.

Impacts:

  • swh-site/data/default.yaml: Change opened endpoint names
  • www.s.o: htdocs/wp-content/themes/layerswp-swh/assets/js/search.js
  • swh-web-ui: actual endpoint
    • swh/web/ui/api.py
    • swh/web/ui/browse.py
  • icinga's checking that endpoint (as this is opened and used by www.s.o). So this check needs to be updated as well.

This will need a redeploy of:

  • web app
  • www.s.o

Event Timeline

ardumont added a parent task: Unknown Object (Maniphest Task).
zack removed a parent task: Unknown Object (Maniphest Task).Jan 12 2017, 11:37 AM
zack moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
zack added a subscriber: zack.

Impact evaluation question about this: who is currently using the /search/ endpoint?
Can we change it without breaking anything, or should the change be coordinated with other components?

zack mentioned this in Unknown Object (Maniphest Task).Jan 12 2017, 11:43 AM

Impact evaluation question about this: who is currently using the /search/ endpoint?

From the top of my head:

  • www.s.o
  • You (or olasd) also mentioned a gist of at least one person using it as well.

https://gist.github.com/search?utf8=%E2%9C%93&q=archive.softwareheritage.org

Can we change it without breaking anything, or should the change be coordinated with other components?

When deploying to moma, we'll need to deploy the url fix to www.s.o as well.

And also, our main puppet default.yaml where the open endpoint would also change from the old one to the new one.

And last, the front-end of the webapp (/browse).

ardumont updated the task description. (Show Details)
zack lowered the priority of this task from Normal to Low.Jan 13 2017, 10:15 AM

And last, the front-end of the webapp (/browse).

Right, this will need to be fixed too.
FWIW, it will not be blocking to do so before opening up the API to the world, because the HTML part of the webapp will not be opened at the same time.

zack renamed this task from /api/1/content/search/ - Rename api to reflect that's an existence test to /api/1/content/search/ - Rename API endpoint to reflect that's an existence test.Jan 13 2017, 4:56 PM
zack renamed this task from /api/1/content/search/ - Rename API endpoint to reflect that's an existence test to /api/1/content/search/ - rename to /content/known/.Jan 13 2017, 5:21 PM
zack updated the task description. (Show Details)

JFTR, other endpoint names that were considered but dropped:

  • /content/search/: we're not doing a generic search, and it will also be the first API endpoint with a verb
  • /content/existence/ or /content/presence/: they can get confusing with content_status=absent
zack renamed this task from /api/1/content/search/ - rename to /content/known/ to rename API endpoint /content/search/ to /content/known/.Jan 13 2017, 5:22 PM

We also need to update the icinga check for that particular endpoint.
This is done.