PHP API - cannot search



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?


1 comment

  • 0

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

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

Post is closed for comments.