API Endpoint /executions/{id}/stop returning 404 (Self-hosted Docker)

Hi everyone, I’m currently working on my bachelor thesis and integrated n8n into my custom web app. I’m trying to stop a running execution via the API.

Problem: When I try to call POST /api/v1/executions/{id}/stop, I receive a 404 Not Found. I am using a valid API Key and other endpoints (like /workflows) are working fine. Is this endpoint deprecated or does it require a specific configuration in the self-hosted version to be enabled? I also tried calling localhost:5678 directly from inside the container, but the result is the same. Any help would be greatly appreciated!

1 Like

Hi @Arvid_Muller Welcome to the community!
Let me clarify, that endpoint only returns 404 only because (that id does not exist) also the execution is not in a stoppable state, and only executions with status running or waiting can be stopped, and if the execution has already finished, the endpoint will return 404

1 Like

That endpoint doesn’t actually exist in the public API, it was never added. There’s an internal one at /rest/executions/{id}/stop but it uses session auth not API keys so it’s not really meant for external use. It’s been a feature request for a while now but hasn’t landed yet. If your executions use Wait nodes you can cancel them with DELETE /api/v1/executions/{id} as a workaround.

1 Like