Query Tracked time using API

hi all,

Is there a way to get the tracked time on a ticket using rest API?
I did not see any entry reg. this in the API documentation.

Thanks a lot in advance

Yes there is: [GET] /api/v1/ticket_history/{Ticket-ID}
This will return tons of information, have fun fiddling around. :slight_smile:

Thanks a lot for your answer :slight_smile:
I’ll check that out!

I’ve searched APIs doc and couldn’t find this endpoint, is it missing?

Also, I cannot find how to add spent time to a ticket. According to your reply one would suppose to add time_spent to a ticket update, or time_unit, but it’s just a guess. Could you please share how to exactly add spent time to a ticket? thank you

This is currently not documented, correct.
It’s quite hard keeping up with the endpoints… :smiley:

I had to cheat here to.
You ship this information with adding an article (according to our WebApp), payload can look like this:

URL [PUTS] /api/v1/tickets/29

      "from":"Marcel Herrguth",
      "body":"Can you hear it, the wayne train? <br/>Where does it go to ?!<br/>To Mount Whateverest!",

Those are time accounting specific routes:

                                                    GET                  /api/v1/time_accounting/log/by_ticket/:year/:month(.:format)                            time_accountings#by_ticket
                                                    GET                  /api/v1/time_accounting/log/by_customer/:year/:month(.:format)                          time_accountings#by_customer
                                                    GET                  /api/v1/time_accounting/log/by_organization/:year/:month(.:format)                      time_accountings#by_organization

You can get all routes by running: zammad run rake routes


This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.