title: RESTful API - different types of children resources
body: <p>I'm dealing with tree-structred resources. Every <code>item</code> resource has <code>children</code>. Each <code>child</code> type may be <code>content</code> resource or <code>subject</code> resource - which is determind by the <code>type_id</code>. (There could be more children types in the future). </p>
  
  <p>What URI should be used for creating a new child for an item?</p>
  
  <pre><code>POST /api/items/&lt;item_id&gt;/children
  </code></pre>
  
  <p>(deliver the <code>type_id</code> via the JSON)</p>
  
  <p>OR:</p>
  
  <pre><code>POST /api/items/&lt;item_id&gt;/children/contents
  POST /api/items/&lt;item_id&gt;/children/subjects
  </code></pre>
  
  <p>OR: redirection according to the <code>type_id</code> to:</p>
  
  <pre><code>POST /api/contents
  POST /api/subjects
  </code></pre>
  
  <p>And then using the GUID of the new resource for creating the hierarchy connection.</p>
  
  <p>Thanks!</p>