Forums/Community/Zendesk API

Answered

PHP API - cannot search

Joshua
asked this on February 27, 2011 10:18

Hi

 

I am using the PHP API wrapper class by Brian Hartvigsen.  It works fine for everything but no matter what I search for I get zero result. I am not sure what I am missing. My curl is being authenticated (all other requests work fine)

Basically I do:

  $xml = $zd->get(ZENDESK_SEARCH, array('query' => array( 'type' => 'ticket')));

this returns a 200 code but an empty array. I have tried no params, type = entry, adding sort and group by etc... nothing. Any suggestions as to what to look for?

thanks!

 

Comments

User photo
Joshua
Check Answer

hah.. figured it out. There are 2 query params. The correct answer is:

$xml = $zd->get(ZENDESK_SEARCH, array('query' => array( 'query' => 'type:ticket')));

February 27, 2011 10:34
Topic is closed for comments