title: REST API with two fields
body: <p>I've read lot of API REST and the possible approaches but I'm not 100% clear about what I have to do.</p>
  
  <p>I want to know what's the best way of do the following:</p>
  
  <p>I have a secure REST with tokens related to accounts. Then I also have objects related to specific accounts.</p>
  
  <p>I need to get objects depending on an accountId (this account is mandatory). The accountId is an attribute of the object.
  An user can have more than one account so I need to send the accountId the user has selected to retrieve the specific objects.</p>
  
  <p>Even if I search for a specific object I need to send the accountId (this account is related to security restrictions).</p>
  
  <p>What is the best of doing that?</p>
  
  <p>OPTION 1, as path parameter:</p>
  
  <p>get all objects </p>
  
  <pre><code>/objects/account/{accountId}
  </code></pre>
  
  <p>get one object</p>
  
  <pre><code>/objects/{id}/account/{accountId}
  </code></pre>
  
  <p>OPTION 2:</p>
  
  <p>get all objects </p>
  
  <pre><code>/objects?account=accountId
  </code></pre>
  
  <p>get one object </p>
  
  <pre><code>/objects/{id}?account=accountId
  </code></pre>
  
  <p>Thanks,</p>