title: RESTful API Url Structuring
body: <p>I am stuck on how I should be structuring my URLs for a RESTful API I am developing.
  My problem comes from the fact that sometimes I need to get several joined tables from a single call.</p>
  
  <p>In one instance, I need to get two tables. I have a table named <code>courses</code>, and a table named <code>topics</code>. I need to get the <code>course_name</code> row and then all the topics that belong to that course.</p>
  
  <p>In another instance, I need to get three tables. I need to join the <code>topics</code> to the <code>parts</code> to the <code>bullet_points</code> table</p>
  
  <p>How should I refer to these in the urls?</p>
  
  <p>Should it be something like this?
  To get a single course:</p>
  
  <pre><code>courses/:course_id/ 
  </code></pre>
  
  <p>To get a course and it's topics:</p>
  
  <pre><code>courses/:course_id/topics
  </code></pre>
  
  <p>To get a topic and it's parts and it's bullet points:</p>
  
  <pre><code>courses/:course_id/topics/:topic_id/parts
  </code></pre>
  
  <p>I am new to this and so am wondering how I should really be approaching the structure of the urls.</p>