title: RESTFUL API: Using path parameters vs Query parameters
body: <p>First, I do know path parameters need to be used when you are pointing at a resource and query parameters are meant to be used when you define something that can add a &quot;property&quot; (or change in time).</p>
  <p>However, let's assume i need to get data belong to a user.</p>
  <p>In this case, I am a fan of writing the REST API URL like this.</p>
  <pre><code>https://mylink/user/getbyid
  </code></pre>
  <p>AND not</p>
  <pre><code>https://mylink/user/get
  </code></pre>
  <p>In the way I write the REST API, i will call the URL like <code>/user/getbyid?id=1</code>. In the way I DO NOT write the API, you will call it <code>/user/get/1</code>.</p>
  <p>Since I write my API calls like <code>/user/getbyid</code>, <code>/user/getbyname</code>, <code>/user/getbyuid</code> I rarely use Path parameters. 99% of the time i am using Query parameters.</p>
  <p>Considering the way I write my api calls, am I going against the best practices? Or what I do is right or ignorable?</p>