zenpy icon indicating copy to clipboard operation
zenpy copied to clipboard

Zenpy Search Endpoint does not handle side loading

Open miafg opened this issue 9 months ago • 1 comments

The Search Endpoint does not support side loading although the zendesk api documentation shows that it should. https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#side-loading

I get zero results when I use the "include" kwarg:

# With side loading
res = zendesk_client.search(query="test", type="ticket", include=["tickets(users)"])

In [3]: res.count
Out[3]: 0

# Without side loading
res = zendesk_client.search(query="test", type="ticket")

In [6]: res.count
Out[6]: 7933

miafg avatar Mar 28 '25 18:03 miafg

the include parameter works on the zendesk_client.tickets endpoint.

we ran into the same issue last year.

we have been doing a call to the search endpoint and then using the include parameter with tickets (e.g. get fetch using ids returned from search).

it'd be great if this worked straight from search, though.

rodigu avatar May 07 '25 13:05 rodigu