Page MenuHomeSoftware Heritage

Remove default identifier on api/view
Closed, MigratedEdits Locked

Description

Instead of defaulting to a specific id/sha1 on endpoints, display informational explanation on what the endpoint is all about.
Then give some possible existing links to default one.

Event Timeline

olasd changed the visibility from "All Users" to "Public (No Login Required)".May 13 2016, 5:08 PM
jbertran lowered the priority of this task from Normal to Low.Jun 28 2016, 2:53 PM
jbertran added a subscriber: jbertran.

This has been partially done during the completion of D13. The browsing and API endpoints now have no default parameters, but we have no replacement solution for providing user-friendly documentation for the endpoints. The most interesting lead for now would be a custom documentation decorator to wrap the route functions in order to provide default arguments without hard-coding default arguments to the routes.

The use-case I have in mind is that a user wanting documentation for the API will browse to, for example, /api/1/revision/ to get information about what parameters they should supply to the endpoint. Currently, browsing to that URL will break the app and return a werkzeug debug page (in dev mode).

The difficulty is determining how to provide documentation to fit the routes, particularly if there are multiple routes that have the same base (for example, /api/1/revision/<sha1>/ is very different from /api/1/revision/<origin>/<branch>/<timestamp>/. Perhaps creating documentation in a less programmatic way, or providing a more global overview, would be in order.

jbertran claimed this task.

Closed due to T431 overriding this task.