List Call API not Returning Data (2024 Data and Ea...
# support
s
from vapi import Vapi from datetime import datetime client = Vapi( base_url="https://api.vapi.ai/", token="" ) client.calls.list( assistant_id="8d93adbc-25fa-4951-9c31-4faba8e4c62f", created_at_gt=datetime.fromisoformat("2024-09-16T16:00:00.000Z"), created_at_lt=datetime.fromisoformat("2024-09-20T16:52:00.000Z") ) Hey so we have been using VAPI since 2024 and we just tried out the analytics api again and noticed that it changed. We can't retrieve any data from 2024 to early last year tho. Can someone please look into it?
a
Hey @sj Looks like Vapi’s analytics API doesn’t return very old data calls from 2024 to early last year aren’t available anymore. Make sure your datetime parsing handles UTC (Z suffix), and for older data, you’d need to check the raw call logs or ask Vapi support.
c
Hey, The Analytics API did go through some changes, and historical data retrieval behavior may have been affected. A couple of things worth noting: The ISO format in your code has a small issue - Python's fromisoformat() doesn't handle the trailing "Z" in older versions (pre-3.11). Try replacing the "Z" with "+00:00" like this: datetime.fromisoformat("2024-09-16T16:00:00+00:00") That said, if the format isn't the issue and you're genuinely not seeing data from 2024 and early 2025, it's possible there's a data retention or migration issue tied to the API changes.