Calling projects/[id]/deployments/[id]/runtime-logs does not work

Hi,

I’ve been trying to get logs programmatically through the API provided by vercel: Get logs for a deployment - Vercel API Docs

All other API Endpoints deliver the expected result, but this one does not return. It loads indefinitly.

Can someone help out?

Hey, Muhi! Welcome to the Vercel Community. :smiley:

The /projects/[id]/deployments/[id]/runtime-logs route can hang or timeout, especially if there are a lot of logs.

Quick things to try:

  • Add query params to slim things down:
    • limit → fewer logs returned
    • since → start from a specific time
    • until → set an end time
  • Double-check the deployment actually has runtime logs

I also recommend checking out this thread as well as you’re new around here :smile:

Hi Pauline,

thanks for the suggestion. I’ve tried sending a limit with 1 and a since with 10 minutes ago. I’ve checked if I have logs and send the query. Unfortunatly, it sitll gives me a timeout.

Im not using log drains, I just want to get the last 30 minutes of logs with an api call. Im also on hobby-plan, so I cant see more than 1 hour of logs on the website.

Any suggestions?

I’m encountering the same issue with adding parameters, and it’s not yielding any results.

I’m encountering the same issue with adding parameters, and it’s not returning any results and just hangs until a timeout.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.