title: Yii2 rest api - Url manager add parameters
body: <p>I am working on an api that has 4 levels of users. Admin, reseller, channel and customer. All levels have call rates stored in respective _rate tables. </p>
  
  <p>Admin can view rates for all user levels, resellers can view their own rates and all of their channels and customers, channels themselves and their customers etc. </p>
  
  <p>So when an reseller fires:</p>
  
  <pre><code>api.dev/v1/call-rates
  </code></pre>
  
  <p>tbl_reseller_rate is returned however I want to be able to specify whose rates I want to look at for example</p>
  
  <pre><code>api.dev/v1/call-rates/channels
  </code></pre>
  
  <p>or</p>
  
  <pre><code>api.dev/v1/call-rates/customers
  </code></pre>
  
  <p>so then I can do something like:</p>
  
  <pre><code>if (strpos($url,'channels') !== false) 
  {
      flip to channel model; 
  } else if (strpos($url,'customers') !== false) 
  {
      flip to customer model; 
  }
  </code></pre>
  
  <p>Another requirement is to view records individually so the url needs to accept an ID parameter as well like so:</p>
  
  <pre><code>api.dev/v1/call-rates/channel/1
  </code></pre>
  
  <p>Any help would be massively appreciated. Thanks in advance</p>