Closed Bug 1242613 Opened 9 years ago Closed 9 years ago

/api should have links to /api/v1 and /api/v2

Categories

(developer.mozilla.org Graveyard :: BrowserCompat, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwhitlock, Assigned: jwhitlock, Mentored)

References

Details

(Whiteboard: [bc:infra][bc:milestone=bicycle])

What did you do? ================ 1. Go to http://browsercompat.herokuapp.com/api What happened? ============== Automatically redirected to /api/v1 What should have happened? ========================== Given the choice of /api/v1 and /api/v2, with an explanation that v2 is going away Is there anything else we should know? ======================================
Blocks: 996570
Mentor: jwhitlock
Whiteboard: [specification][type:bug] → [specification][type:bug][bc:infra][bc:milestone=bicycle]
Blocks: 1240757
No longer blocks: 996570
Whiteboard: [specification][type:bug][bc:infra][bc:milestone=bicycle] → [bc:infra][bc:milestone=bicycle]
Assignee: nobody → jwhitlock
Status: NEW → ASSIGNED
Do you think something written in javascript to catch if there was a 301 Header and display an informative message, would be a solution ? If that's not the case, would you have a starting point for me ;) It's my first time dealing with browsercompta.
Flags: needinfo?(jwhitlock)
This needs to be done in Django/Python: * Add a new template to webplatformcompat/jinja2/webplatformcompat, such as "api.html", that links to the v1 and v2 APIs, includes a one-line explanation of the differences, and links to the full documentation * In webplatformcompat/urls.py - Change '^api/$' pattern from a RedirectView to a TemplateView using the new template * Update the header navigation so "API" goes to this new page instead of the v1 API.
Flags: needinfo?(jwhitlock)
Note: after a conversation with John, it's in fact the v1 which is going away.
Comment 0 says "an explanation that v2 is going away". This should say "an explanation that v1 is going away". The v1 API is based on JSON API RC1, an in-develop version of the specification, now deprecated. The API docs are at http://browsercompat.readthedocs.org/en/latest/v1/intro.html . The v2 API is based on JSON API v1.0, the current version of the specification. The API docs are at http://browsercompat.readthedocs.org/en/latest/v2/intro.html The v1 API will be removed when tools using it have been updated to the v2 API.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mdn/browsercompat https://github.com/mdn/browsercompat/commit/159a25b97f443444417ab5d94f135a7f18803332 bug 1242613 - Use API endpoints with slashes Avoid a redirect by using the slash version of the versioned API entrypoints.
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.