Problem with Incremental API

답변함


2022년 8월 17일에 게시됨

Hi, could somebody help me with this issue?

I'm trying to download the tickets using incremental API with this URL:

https://cinemarksupport.zendesk.com/api/v2/incremental/tickets.json?start_time=1659312000

This UNIX time is equal to 01 Aug 2022, but the API returns many tickes updated before this date (image below). I have tried with other cutoff dates, but the problem doesn't get solved.

Why does it happen and how can I fix it?

Thanks in advance.


0

8

댓글 8개

That's great! It perfectly worked out:

https://cinemarksupport.zendesk.com/api/v2/incremental/tickets.json?include=metric_sets&start_time=1661310000

Erica, thanks a lot for your help. Solved all problems!

Regards

Cezário

0


Instead of metrics in the side load try metric_sets. That would be the valid naming convention for the side loaded record you're trying to get. You can view the possible side loaded search records for tickets here.
 
Let me know if that works out for you! 😊️
 
Erica

0


Hi Erica!

That's good, but I've tried many ways to use side loading now and no one worked. Follow the last try:

https://cinemarksupport.zendesk.com/api/v2/search.json?query=updated%3E=2022-08-23&include=ticket(metrics)

This is returning the right tickets (updated from yesterday on), but the metrics don't appear.
Am I doing something wrong?

Thank you again!

0


Of course! Glad to help. 😊 
 
Unfortunately there isn't an incremental export endpoint for Ticket Metrics. However, you could use side loading to retrieve that data on the incremental ticket export calls. Side loading allows you to retrieve additional data related to the initial call's response data. 
 
When you make the incremental ticket export call, each ticket returned could side load the ticket metrics data for that given ticket id. Your result  would be one batch with all the data instead of making separate and multiple calls. 
 
If you have any other questions feel free to let us know!
 
Erica 

0


Erica, thank you very much again!

I have one more question, and please tell me if I need to write it in a new post.
I need to download the tickets metrics, and I've found the following URL. vTicket is a variable inside a loop with all the tickets generated in the previous URL we were discussing:

https://cinemarksupport.zendesk.com/api/v2/tickets/$(vTicket)/metrics.json

The problem is: to download the metrics of every ticket one by one, it takes a long time, impossible to handle with our infrastructure. Is it possible to get the metrics in batch, or filtered by time, as the first one?

Thank you

Cezário

0


Hi Cezario, 
 
So you should be able to see it in the Incremental Exports API. Do you see a timestamp property with a value? It's typically found under ticket_id.
 
Best, 
 
Erica

0


Hi Erica!

Thank you so much for your answer, it helped a lot. Is it possible to get the generated_timestamp in another API, since this value is not present in this URL?

Regards

Cezário

0


Hi Cezario! 
 
Thanks for posting your question in the Community! So the start_time isn't the same as the created_at or updated_at value. When we're querying via a given start_time what we're actually looking for is the generated_timestamp value. That is because the updated_at value is only generated by ticket events whereas the generated_timestamp value is recorded for all updates (system or ticket related). That's why it's entirely possible to have a ticket with an earlier updated_at value than your start_time. The generated_timestamp for that ticket would be equal to or greater than the given start_time. Here is a link to our docs that shares a more detailed explanation of this. 
 
Hope this helps!
 
Erica 

0


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물