Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question
up vote 2 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.