Hasan Dawood
03/23/2025, 5:53 PMVapi Support Bot
03/23/2025, 5:55 PMhttps://api.vapi.ai/logs?assistantId=YOUR_ASSISTANT_ID&page=1&limit=100
According to the [VAPI API documentation](https://docs.vapi.ai/api-reference/logs/get), you can use parameters like:
- assistantId to filter by specific assistant
- page for pagination (defaults to 1)
- limit to control results per page (defaults to 100, max 1000)
### 2. Implement Date Range Filtering
Narrow down results by specifying date ranges:
https://api.vapi.ai/logs?createdAtGte=2025-03-01T00:00:00Z&createdAtLte=2025-03-21T00:00:00Z
This significantly reduces the data being processed and transferred.
### 3. Consider Using Webhooks
Instead of repeatedly polling for logs, implement webhooks to receive real-time updates:
serverMessages: ['end-of-call-report']
According to [VAPI documentation](https://docs.vapi.ai/server-url/events), this approach sends you an end-of-call report after each call, containing all call artifacts including transcript, call ID, and recording URLs.
### 4. Use the Analytics API with Grouping
The Analytics API allows you to filter and group data by `assistantId`:
```
curl --location 'https://api.vapi.ai/analytics' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data '{
"queries": [
{
"name": "getAnalyticsByAssistantID",
"table": "call",
"timeRange": {
"start": "2025-01-01T00:00:00Z",
"end": "2025-03-21T23:59:59Z",Vapi Support Bot
03/23/2025, 5:55 PMassistantId values are valid to avoid unnecessary failed requests.
### 8. Check for Concurrency Limits
Make sure you're not exceeding any concurrency limits that might be affecting performance.
Would you like more details on any of these approaches or help with implementing a specific solution?
Sources:
- [General techniques for API response time optimization](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336685825227755591)
- [How to optimize API response time for VAPI APIs](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336685825227755591)
- [Best practices for fetching call logs efficiently](https://docs.vapi.ai/api-reference/logs/get)
- [How to efficiently fetch call logs of multiple assistants at once](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331285157088333955)Hasan Dawood
03/23/2025, 5:59 PMHasan Dawood
03/23/2025, 6:21 PMKyle
03/24/2025, 10:11 PM