2

I am currently working on a web app and want to design the interface between nodejs / mongoose and the backbone app.

A short description of the app: A user signs up to the application and gets a user account where he can create an organization (e.g. footballclub). Within these organizations you can set up projects. Within these projects you can define tasks you could assign to somebody)

I want to have a RESTful api for the app. My problem is: A user could have more than one organization, if i have an api for projects like

GET /projects/
POST /projects/
GET /projects/:id
PUT /projects/:id
DELETE /projects/:id

How do i determine to which organization the project belongs? Do i add a parameter to the api or do i send an extra field containing the id of the organization? Any help is appreciated!

asked Feb 3, 2013 at 18:54

1 Answer 1

2

GET /organizations/projects/:id

Gets a list of projects for an organization.

POST /projects/:id

Updates a specific project.

GET /projects/:id

Gets a specific project.

DELETE /projects/:id

Deletes a specific project.

DELETE /organizations/:id

Deletes an organization and all it's projects.

POST /organizations/:id

Updates a specific organization.

GET /organizations

Gets a list of all organizations

answered Feb 3, 2013 at 19:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.