https://api.vapi.ai/logs api deprecated alternativ...
# support
m
It looks like https://api.vapi.ai/logs api is to deprecated. Are there any API alternatives we have to pull log information for specific assistants?
v
Hi there! 👋 You're right - the
/logs
endpoints are indeed deprecated. I can help you with alternatives for pulling log information for specific assistants. Based on the information I've found, you can use the
/analytics
endpoint as an alternative to retrieve data for specific assistants. Here's an example of how you can use it:
Copy code
curl --location 'https://api.vapi.ai/analytics' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --data '{
        "queries": [
            {
                "name": "getAnalyticsByAssistantID",
                "table": "call",
                "timeRange": {
                    "start": "2024-01-01T00:00:00Z",
                    "end": "2024-12-31T23:59:59Z",
                    "step": "year"
                },
                "operations": [
                    {
                        "operation": "sum",
                        "column": "cost"
                    }
                ],
                "groupBy": [
                    "assistantId",
                    "endedReason"
                ]
            }
        ]
    }'
According to the [information I found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331285157088333955), this query might return data for all assistants, so you may need to filter the results on your application side. When working with assistant logs, it's crucial to use a valid
assistantId
. You can find the
assistantId
in the
call.assistantId
or
assistant.parentId
properties in end call reports, as mentioned in the [documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336915389040558160). You can also access logs through the Vapi Dashboard by navigating to logs > calls on the left navbar and copying the ID under call ID, as noted in the [dashboard documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339467226381684789).
Is there anything specific about these alternatives you'd like me to clarify further? Sources: - [Discord Thread 1331285157088333955](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331285157088333955) - [Discord Thread 1336915389040558160](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336915389040558160) - [Discord Thread 1339467226381684789](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339467226381684789) - [Vapi Changelog](https://docs.vapi.ai/changelog)
m
I see the analytics endpoint, however, how can I use it to get call transcripts by specific agents. It doesn't seem like it is possible from the analytics endpoint
s
Hey MP, we are working on our logs and analytics APIs. As of now, to get the call transcript for a specific agent, you can use our logs API or get call API. Going forward, I'll suggest you store end-of-call reports in your database so that later you can retrieve them and do analytics if required.
u
@Shubham Bajaj Any update on logs and analytics APIs eta. We are required to build a latency observation feature for our customers, and need detailed logs lusch as:
Copy code
Turn latency: 1561ms (transcriber: 0ms, endpointing: 200ms, kb: N/A, model: 733ms, voice: 587ms)
I see VAPI dashboard https://docs.vapi.ai/api-reference/logs/get api is used to show this latency information however the endpoint is deprecated now. I'm wondering how the response of new api will vary from the existing APIs response.
s
for now, please use the analytics API: