How to fetch all calls
# support
m
I am wondering how to fetch all calls for my organization. I see that the calls endpoint has a default limit of 100. How do I find out how many calls there are in total in order to fetch them all?
v
@markus To fetch all calls for your organization and determine the total number of calls, you would typically use the calls endpoint with pagination parameters. If the endpoint supports pagination, you can make a request to get the first batch of calls and look for a response header or a field in the response body that indicates the total number of calls or the presence of additional pages. If the API provides a way to retrieve the total count directly, you would use that specific parameter or endpoint. However, if such a feature is not documented or available, you may need to iterate through the paginated results, fetching batches of calls until you retrieve all records. To assist you further, I would need to know if the API provides any specific parameters for pagination or a total count. If you have access to the API documentation, please check for any such features. If not, you can reach out to the support team for more information on how to retrieve the total number of calls. Would you like me to guide you on how to iterate through paginated results, or do you need assistance with something else?
You can continue this conversation by mentioning me in the message.
m
The endpoint does not seem to support pagination and I don't see how I can get the total number of calls. Can I set limit arbitarily high?
v
@markus If the endpoint does not support pagination and there's no clear way to retrieve the total number of calls, setting the limit arbitrarily high is not recommended as it may not be supported by the API and could potentially lead to performance issues or timeouts. Instead, you should check the API documentation for any guidelines on maximum limit values or reach out to the API support team for advice on how to handle such cases. They may provide you with the best practices for fetching large datasets or inform you of any alternative methods to retrieve the total number of calls. If you need assistance with contacting support or have any other questions, please let me know!
m
can you please escalate this?
v
@markus Sweet. Have a great day!
5 Views