title: The "right" way to route map a REST API
body: <p>Im working on a small node/angular application</p>
  
  <p>A superadmin should be able to create/edit/delete new client accounts, within views delivered directly from the node application. </p>
  
  <p>The clients on the other hand communicate with the backend/database through Angular and a REST API that the node application delivers. The clients need a username/password to login to their account. </p>
  
  <p><strong>Question:</strong> I have this route map, is it right of me to think that the :client need to be in the URL of the REST API, so the backend knows which data to fetch?</p>
  
  <p><em>the : in the url indicates that it's a variable...</em>   </p>
  
  <pre><code>Route map Superadmin
  
  /admin/client – POST
  /admin/client/:id – GET
  /admin/client/:id – PUT
  /admin/client/:id – DELETE
  /admin/clients – GET
  
  
  Route map API JSON
  
  /v1/:client/candidate – POST
  /v1/:client/candidate/:id – GET
  /v1/:client/candidate/:id – PUT
  /v1/:client/candidate/:id – DELETE
  /v1/:client/candidates – GET
  
  /v1/:client/settings – GET
  /v1/:client/settings – PUT
  </code></pre>