Does pagination work for Retrieve All Executions?

I’m trying to use the API to retrieve multiple pages of executions. I have over 3000 executions and I’m using the API to pull them all into a doc so I can analyze them.

For some reason, the cursor query parameter doesn’t seem to be doing anything. I’m testing with limit=1, and when I put the initial response’s nextCursor back into the cursor query parameter, it doesn’t paginate and spits out the exact same result. The response is the exact same execution AND the exact same nextCursor.

Oddly enough, I tested this same logic with the Retrieve All Workflows and it works perfectly, I can actually paginate to the next set and the nextCursor field actually changes.

Anyone have success doing this or know if this is a known bug in the API? Thanks!

Hi @thatdudedenis, welcome to the community and sorry for the trouble.

I just gave this and it seems the cursor parameter has no effect for me either when using the {{base_url}}/api/v1/executions endpoint to fetch executions :frowning:. I’ll add this to our internal bug tracker for a closer look and we’ll keep you posted.

1 Like

OK sounds good, let me know if / when it gets fixed, it’ll allow for some super cool functionality in the integration I’m building with Coda :slight_smile: Will be sharing more about that tomorrow!

1 Like

@thatdudedenis @MutedJam

Found the issue, will try to create fix a tomorrow.

3 Likes

Awesome, thanks Ricardo!

I spent a few hours trying to understand what was wrong with my pagination code :sweat_smile:
Hopefully it will get fixed soon.

I couldn’t find an issue for it so I created one, so others can keep track on the progress: Cursor doesn't work on /executions · Issue #3830 · n8n-io/n8n · GitHub

1 Like

Got fixed. We will let you know when it’s released.

5 Likes

Got released with [email protected]

1 Like

Awesome, thanks Jan!