/call endpoint does not recognize assistantId in q...
# support
m
If you add an assistant Id to the query params when querying the /call endpoint, it returns 0 results even if the assistant ID exists. Steps to reproduce: 1. Get a list of assistants by calling GET /assistant 2. Choose an id from the list of assistants 3. Call GET /calls?assistantId={yourAssistantId} 4. Results will be empty
v
@Marcus I'm sorry to hear that you're experiencing issues with retrieving call results using an assistant ID. It sounds like there might be a problem with how the query is being formatted or a potential issue with the system itself. To better assist you, could you please confirm that the assistant ID you're using is correct and that the assistant has been involved in calls that should be returned by the query? If everything seems correct on your end, I would recommend reaching out to support for more detailed assistance on this matter.
You can continue this conversation by mentioning me in the message.
m
I've confirmed the assistantId is correct. I followed the reproduction steps I mentioned in this ticket, copied the assistant Id from GET /assistant, was able to retrieve an assistant then querying GET /assistant?id={myId}, then got empty results when querying GET /calls?assistantId={myId}
v
Got it. Tagging @User for additional help.
m
FWIW, the result objects from GET /calls contain a "parentId" that matches the id from GET /assistants. There is no "assistantId" in the results from GET /calls
Also - I believe you will need to update the Typescript server SDK's "Call" type
s
Copy code
curl -G https://api.vapi.ai/call?assistantId=<assistant-id> \
     -H "Authorization: Bearer <token>" \
     -d assistantId=<assistant-id>
hey @Marcus you have to pass assistantId in the request body and then it will work as expected.
m
I swear something changed because it wasn't showing initially. Maybe I wasn't waitin long enough for the results to be processed after the call Thanks for taking a look, i'll close this out
It's telling me "This interaction failed" when clicking "mark as resolved", but feel free to close it for me
26 Views