Closed
Bug 860389
Opened 11 years ago
Closed 11 years ago
[login.wm.o] What API's do we want to provide?
Categories
(Webmaker Graveyard :: Login, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 863287
People
(Reporter: boozeniges, Assigned: sedge)
References
Details
(Whiteboard: [login.wm.o])
No description provided.
Updated•11 years ago
|
Component: webmaker.org → Login
Reporter | ||
Comment 1•11 years ago
|
||
:sedge - if you can make a list of the API's that we have so far defined we can use this to see what we might be missing....
Assignee: nobody → kieran.sedgwick
Assignee | ||
Comment 2•11 years ago
|
||
POST /user/create - Create new Webmaker account GET /user/:id - Retrieve Webmaker account info PUT /user/:id - Update Webmaker account info DELETE /user/delete/:id - Delete Webmaker account POST /user/suspend - Suspend Webmaker account
Assignee | ||
Comment 3•11 years ago
|
||
Darn, forgot again! :booze :humph
Assignee | ||
Comment 4•11 years ago
|
||
Update: POST /user/create - Create new Webmaker account GET /user/:id - Retrieve Webmaker account info PUT /user/:id - Update Webmaker account info DELETE /user/delete/:id - Delete Webmaker account POST /user/suspend/:id - Suspend Webmaker account
Comment 5•11 years ago
|
||
You should get Wex to weigh in, but I think it's more correct to always root on user/:id like this: DELETE /user/:id/ - Delete Webmaker account POST /user/:id/suspend - Suspend Webmaker account
Reporter | ||
Comment 6•11 years ago
|
||
:wex - what you think? This is probably hair-splitting but might it be good to switch the /user/create to be PUT and /user/:id to be POST? PUT for brand new things and POST for updating existing records?
Flags: needinfo?(simon)
Reporter | ||
Comment 7•11 years ago
|
||
Another thing to think of - right now we have POST set up for CORS, do we also need to open GET/PUT as well? Might be mis-understanding CORS a bit....
Assignee | ||
Comment 8•11 years ago
|
||
:booze - POST is for new entries, PUT for updates as far as I can figure. See: http://en.wikipedia.org/wiki/RESTful#RESTful_web_APIs :humph - It looks better to me. I'll wait on :wex before making changes.
Comment 9•11 years ago
|
||
Sorry for not weighing in earlier. As a REST API goes, this is what it should look like: POST /user - Create new Webmaker account GET /user/:id - Retrieve Webmaker account info PUT /user/:id - Update Webmaker account info DELETE /user/:id - Delete Webmaker account In order to suspend, we'd: PUT /user/:id with the suspended attribute set to true
Comment 10•11 years ago
|
||
It's worth mentioning that the HTTP method *is* the verb. C - POST R - GET U - PUT D - DELETE
Assignee | ||
Comment 11•11 years ago
|
||
:wex - Is there a standard or set of best practices that I can reference in future? Not knowing the proper useage of this stuff, and conventions for APIs, has been bugging me :/
Comment 12•11 years ago
|
||
This bug is marked as blocking bug 860391 which was due to be completed last week; are we still waiting on info from Wex, here?
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(simon)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•