简体   繁体   English

Freshdesk api 来电退票数量有限

[英]Freshdesk api call returning limited number of tickets

I'm trying to fetch ticket details using requests library of python.我正在尝试使用 python 的请求库来获取票证详细信息。 Here is the command.这是命令。

r = requests.get("https://"+ domain +".freshdesk.com/api/v2/tickets?updated_since=2015-01-19T02:00:00Z", auth = (api_key, password))

But, I'm just getting latest 30 tickets details.但是,我只是得到最新的 30 张门票的详细信息。

I tried changing the date and also tried removing it, but nothing seems to work and everytime only last 30 tickets details are coming.我尝试更改日期并尝试将其删除,但似乎没有任何效果,并且每次只有最后 30 张门票的详细信息即将发布。

It's due to pagination limit set by Freshdesk. 这是由于Freshdesk设置的分页限制。

Refer: https://developers.freshdesk.com/api/#pagination 请参阅: https : //developers.freshdesk.com/api/#pagination

The 'link' header in the response will hold the next page URL if exists. 响应中的“链接”标头将保存下一页URL(如果存在)。 If you have reached the last page of objects, then the link header will not be set. 如果您已到达对象的最后一页,则不会设置链接标题。

Example: 例:

Headers:
"link":< https://domain.freshdesk.com/api/v2/tickets?filter=all_tickets&page=2>;rel="next"

100 per page is very less compared to 8000 that Jira Service Desk can handle.与 Jira Service Desk 可以处理的 8000 个相比,每页 100 个要少得多。 Freshdesk APIs are still primitive and when I checked with their support, I was told that we have to live with what Freshdesk provides and find our own ways to improvise. Freshdesk API 仍然是原始的,当我检查他们的支持时,我被告知我们必须接受 Freshdesk 提供的东西,并找到我们自己的即兴创作方法。

I'm looking at fetching all tickets nearing SLA breach and apparently there is no way to get this through APIs.我正在考虑获取所有接近 SLA 违规的票证,显然无法通过 API 获得此票证。 I have to look at all open tickets, 100 at a time to get this list.我必须查看所有未开票,一次 100 张才能获得这份清单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM