title: Using wildcards (*) in REST API resource name
body: <p>Is it sensible to use * in REST API for a resource ID? I want to use it for searching. I'm using RESTEasy for developing my webservice.</p>
  
  <p>Suppose I have resources that are user and user has Name and Age. Then my REST API looks like:</p>
  
  <pre><code>/users/{id}/name
  /users/{id}/age
  </code></pre>
  
  <p>Now if I want to display all names I'm thinking on using the following:</p>
  
  <pre><code>/users/*/name
  </code></pre>
  
  <p>Is this correct or should I use another way of doing?</p>
  
  <p>Edit 1: Adding subresources</p>
  
  <p>As from an answer it is suggested to use a fields query param. But let's suppose I'm now want something that is a property of the sub-resource. For instance:</p>
  
  <pre><code>/user/*/name/full
  /user/*/name/short
  </code></pre>
  
  <p>If I follow the fields option, I will have to do:</p>
  
  <pre><code>/user?fields=name-short 
  /user?fields=name-full 
  </code></pre>
  
  <p>Which it is not nice as the properties of name are linked to the name class somehow.</p>
  
  <p>Please do consider the example as that. Try to get the idea ;)</p>