title: Piwik Events API - How to Query Single Action
body: <p>I setup a custom trackEvent using this code:</p>
  
  <pre><code>&lt;a href="#" onclick="javascript:_paq.push(['trackEvent', 'Like', '&lt;?php echo $id ?&gt;']);"&gt;Like Me&lt;/a&gt;
  </code></pre>
  
  <p>So "Like" is the category, and "$id" is the action, which will be different depending on which page is being viewed.</p>
  
  <p>This works fine and successfully get the custom event into my Piwik dashboard under the "Like" category. For example, I clicked on this link on 3 different pages so I have 10, 11, and 12 as actions in my dashboard.</p>
  
  <p>To query them, I'm using this URL in a HTTP request:</p>
  
  <pre><code>http://www.MYPIWIKURL.com/?module=API&amp;method=Events.getAction&amp;idSite=1&amp;period=day&amp;date=today&amp;format=JSON&amp;token_auth=MYAUTHTOKEN
  </code></pre>
  
  <p>This returns an array with all 3 of the actions listed as nested arrays. I'm wondering, however, how I can return <em>only</em> the array with the action I want to view? For example, action 10?</p>
  
  <p>I tried adding "e_a=10", "action_name=10", and "segment=actions==10" to the URL, but they aren't recognized.</p>
  
  <p>Could someone point me in the right direction for querying a single action within a category? Seems like I'm almost there!</p>
  
  <p>Also--I <em>do</em> know that I could loop through the array and get the action I want, but eventually there will be thousands of actions, so that wouldn't be very efficient I don't think.</p>
  
  <p>Thanks for any help! </p>