Api to collect user and the number of tickets they have

4 Kommentare

  • Joseph May

    Hi Christian-

    I don't believe an endpoint to accomplish this precise use-case exists, though I am still looking through our docs in order to give you an efficient suggestion. One supported sideload is open_ticket_count, and I am wondering if this might be useful to you.

    0
  • Christian Kellner

    Hi Joseph,

     

    what do you mean with this? I was hoping to query the user and then, for each user, automatically get the infos mentioned above as a sideload. 

     

    With the open_ticket_count as a sideload, I guess I can query all the users and get the number of open tickets. This is nice, but I need more precise infos like how many open, closed etc. 

     

    Beside of this, I'm wondering if there's a way to tell the ticket list endpoint that I just need a few attributes of the ticket, not everything (to save bandwidth).

     

    How does other ppl solve those cases?

    0
  • Christian Kellner

    To sum it up, these are the most important questions:

    1) Is there a better way to accomplish the json structure mentioned in my first post than read all the tickets, sideload the users and build it from there.
    2) If there is no better way, is there at least a way to tell the api to only send some attributes of the tickets to me, not all of them?

    And a Bonus questions.

    Do I ever get ALL the tickets (apart from those that are archived) or is there a max date which I'm allowed to query?

     

    Thanks

    Christian

    0
  • Joseph May

    Hi Christian-
    Not really, and this is a common gripe with RESTful APIs, the all or nothing nature of the response. There isn't a "cafeteria-style" option to pick & choose.
    As far as getting all tickets, there isn't a max date. I don't know exactly what data you need in the response, but our incremental ticket export for example can have a start_time value of when you opened your account, and would begin GETting the tickets from that point.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk