REST API - join by possible?


I have a question and maybe it is possible to get this information from the API. Since a few weeks we use Zammad (before we used OTRS). I created a Interface for TV with all tasks and detailed informations. It contains informations like Organization from the customer (or customer email if no organization), the title from ticket and other informations like priority and many more. This list is refresh every 15 seconds with AJAX. I can get all this informations from the API and that’s about 100 entries I got back from the API, so it tooks about 10 seconds to load.

Now I have to integrated a field from the organizations what contains locked and active (locked = customer not paid a long time) so our workers knows they don’t have to work on this tasks. And that is the problem. How can I get this information. If i used the foreach for the ticket (with getValues) and start for every ticket a new GET form the organization the site loading over 1 Minute, because it’s hundred of requests and that’s not very useful.

Is there any other possible to get the values? Maybe with a join by, so that I can request for example “ticket.organization_id =” and get the field “organization.status” from there in one request??

Sorry for my english. :o:
Thank you :slight_smile:

First of all, welcome to Zammad.

Secondly, just a wild guess, you’re not using the API with an API-Token, di you?
If you use basic authentication, please note that this has tons of downsides (apart from performance) and might even end up in time outs. If possible, always stick to API tokens.

Normal GET requests shouldn’t take too much time then.
If you have the information you’re showing on the TV within a overview anyway, you could also just poll the overview endpoint which currently contains Organization, User and Ticket-Information and should be working just fine.

Regarding querying overviews via API, the following Post might help you:

Hey yes I saw this. Thank you!

This topic was automatically closed after 416 days. New replies are no longer allowed.