---
title: "Stop running script"
method: POST
path: "/v1/script-executions/{execution-id}/stop"
tags: ["Objects"]
---

# Stop running script

`POST /v1/script-executions/{execution-id}/stop`

Stop ad-hoc script started with POST /v1/objects/{object-id}/execute-script or POST /v1/execute-script in streaming mode.
Only the user who started the script can stop it. Stop is asynchronous - the WebSocket client
receives `{"type":"stopped"}` message when the script is actually stopped. If stop is requested
before WebSocket client connects, script will not be started.

## Path parameters

- `execution-id` integer, required

## Response `204`

Stop requested

## Other responses

- `400` — Invalid execution ID
- `401` — Unauthorized
- `403` — Script was started by another user
- `404` — Execution with given ID does not exist or already finished

## Changes

- **2026-09-30** `2bd10b4f2d50` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/netxms/apis/netxms-api/changes/v1/script-executions/:execution-id/stop/post.md)

---

[API](https://skmtc.dev/netxms/apis/netxms-api.md) · [All operations](https://skmtc.dev/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/netxms/apis/netxms-api/revisions/129789f8868f?raw)
