bleeding-edge-sample-app
bleeding-edge-sample-app copied to clipboard
API interface
Proposed API - thoughts/feedback please.
//survey data
POST /api/surveys - create new survey
GET /api/surveys - all surveys
GET /api/surveys/:id - get single survey
PUT /api/surveys/:id - update survey
DELETE /api/surveys/:id - delete survey
//response data
POST /api/surveys/:id/responses - create new survey response
GET /api/surveys/:id/responses - all responses responses
GET /api/surveys/:id/responses/:id - get single response
PUT /api/surveys/:id/responses/:id - update response
DELETE /api/surveys/:id/responses/:id - delete response
I like it. It's just right. I can make these endpoints tonight.
Do they need tests? Do we want pagination on /api/surveys
and /api/surveys/:id/responses
?
I don't think we need pagination for this. As if we launch on heroku it the app will die after a period of time and will be reset to defaults quite soon. So the data shouldn't grow to big.
Okay, cool.