I checked posts on the forum that mention the /rest/executions endpoint but I don’t think this actually works.
Is there no way to get the currently running executions in n8n via API?
I checked posts on the forum that mention the /rest/executions endpoint but I don’t think this actually works.
Is there no way to get the currently running executions in n8n via API?
Hello Kalvin.
We have the HTTP Request Tool node
its possible call any API
Take a look in this link to see more details
And in this post has a example with the node
Best.
Yes I have hundreds of http request nodes that I’ve used. The problem is there is no endpoint to get running executions
Ok, in this case, its in the endpoint in N8N or in other place this endpoint ?
I’ve seen posts on n8n community forum about the n8n endpoint /rest/executions but it does not work. It may have been deprecated already as it was an undocumented feature.
So I’m asking how do people get a list of executions currently (via api)
ok, sorry, i dont know in this moment about the place of this endpoint.
Check out this:
There is also one another execution status available – queued
. Source: feat(editor): Show new executions as `Queued` in the UI, until they actually start by netroy · Pull Request #10204 · n8n-io/n8n · GitHub
If this resolves your question, please mark this post as a Solution.
Hi, i think this is just part of the architecture I suppose that this is because of the need to be able to handle both worker and non-worker scenarios. As far as I can see, the API only offers failed, completed and waiting states as a filter. (this stems most likely from the fact that n8n polls the queue state periodically : like 20s default. and there is no way for it to know when workers actually pick up work, however the workers do track state through the DB) . full execution data is available through the DB itself…
there is new which most likely means, waiting in queue terms and running well some worker picked it up.
BTW if the goal is just to understand how many are running (without knowing which one). you can enable queue mode with workers and track queue metrics (again self-hosted):
active and waiting. Enable Prometheus metrics | n8n Docs
Yes I’ve read all these resources and none of it solves the issue
This looks good… I’ll see how I can use the db practically without an API… maybe build my own API on the server
Let me explain what the goal is:
Sometimes I don’t want to run a workflow if it is already running… in order to limit API throttling issues or other issues that result in two different workers running the same code that manipulates the same set of data
Hi, why don’t you use a toggle flag somewhere in an external system. Just set/check it on run and uncheck it when done or error. No need for over-engineering
Yes I tried managing in google sheets but it became annoying to add a google sheet read and a if node for each individual workflow in the main workflow… i guess it would be less annoying if i only had to do that in the one main workflow but i like to run the subworkflows individually sometimes… that’s why I was hoping there was a better way overall
Maybe a feature request could be nice. Be able to toggle a switch in the settings, “X concurrent executions max”.that it would check before scheduling
Any update on this one ?
I am using the n8n cloud pro (50$/month) version and /executions only - as pointed out here - seem to show failed, completed and waiting states.
The UI is showing the running workflows.
How can we get it with api (or n8n node) ?
UPDATE : it looks like it is available in the UI because the UI is making a call to /rest/executions?filter=…
which gives back data like :
where you can see a status = “running”.
But (assuming it is what needs to be used) how can you use it inside a n8n workflow ?