Solved

Pulling a Report by using API

  • 16 July 2021
  • 7 replies
  • 61 views

Hi all,

The question is ;

→ I have a created (custom) view and would like to extract the report based on this view throughout API in Python, your answers would be highly appreciated, Thank you

 

 

icon

Best answer by hemanth.ramya 16 July 2021, 14:20

Hello @hsyn,

 

At the moment, you cannot get ticketdata via API from the custom ticket view. However, you can make use of the Filter tickets API to pull ticket data based on certain parameters (filters). Refer to the documentation for help and feel free to drop a note here for any further questions.

https://developers.freshdesk.com/api/#filter_tickets

 

Cheers,

Freshdesk Community Team

View original

7 replies

Userlevel 3

Hello @hsyn,

 

At the moment, you cannot get ticketdata via API from the custom ticket view. However, you can make use of the Filter tickets API to pull ticket data based on certain parameters (filters). Refer to the documentation for help and feel free to drop a note here for any further questions.

https://developers.freshdesk.com/api/#filter_tickets

 

Cheers,

Freshdesk Community Team

Thanks Ramya, 

1more question, while using your solution connection string looks like this ;

requests.get('https://'+domain+'.freshdesk.com/api/v2/search/tickets?query="group_id:XXXXX"', auth = (api_key, password))

but it seems, we have a limitation on the return value, the return value contains just 30 rows × 33 columns, is there any way to solve the issue ? 

I have checked the api pagination solutions but, it did not work out (my mistake most probably), do you have any idea how to add ?page (pagination) to above request line ?

 

Thank you in advance.

 

Hello @hsyn,

 

At the moment, you cannot get ticketdata via API from the custom ticket view. However, you can make use of the Filter tickets API to pull ticket data based on certain parameters (filters). Refer to the documentation for help and feel free to drop a note here for any further questions.

https://developers.freshdesk.com/api/#filter_tickets

 

Cheers,

Freshdesk Community Team

 

Userlevel 3

When using the Filter Tickets API, the number of objects returned per page is 30 and hence the case, @hsyn.

To scroll through the pages, add page parameter to the url. Sample curl is given below to get the second page of open or pending tickets ("status:3 OR status:4"):

curl -v -u yourapikey:X -X GET 'https://domain.freshdesk.com/api/v2/search/tickets?query="status:3%20OR%20status:4"&page=2'

Feel free to drop a note here for any further queries and we would be happy to help! :)

 

Cheers,

Freshdesk Community Team

Hi again,

 

Thank you for your assistance on this case, your solution/suggestion works perfectly,

I have an additional question, by the below queries, (Unfortunately) I am not able check assigned person for the each customer ticket, 

I have checked customized fields as well but there is no assigned people that I can print it out, do you have any idea how this field is called to see assigned person for the tickets ?

Thanks in advance

When using the Filter Tickets API, the number of objects returned per page is 30 and hence the case, @hsyn.

To scroll through the pages, add page parameter to the url. Sample curl is given below to get the second page of open or pending tickets ("status:3 OR status:4"):

curl -v -u yourapikey:X -X GET 'https://domain.freshdesk.com/api/v2/search/tickets?query="status:3%20OR%20status:4"&page=2'

Feel free to drop a note here for any further queries and we would be happy to help! :)

 

Cheers,

Freshdesk Community Team

 

Userlevel 4
Badge +2

Hi @hsyn,  "responder_id" is the ID of the agent to whom the ticket’s been assigned. You can get the ID mapped with each agent when you try viewing the agent. 

Agent ID

I hope that helps. Let us know if you have any further queries on the same. Have a good day!

Hi @Keer 

Thanks a lot for all of your support, no issue is left :) 

 

Userlevel 3

Cheers, @hsyn :)

Freshdesk Community Team

Reply