Execute script within context of given object
Changed onExecute ad-hoc NXSL script provided in the request body within context of given object.
Requires OBJECT_ACCESS_EXECUTE_SCRIPT on the object.
By default the script is executed synchronously and only its return value is provided. When stream is true, the script is compiled synchronously (compilation errors are still reported with status 400), then the server returns 202 with a single-use token. The script starts once the client connects to the WebSocket URL from the response; script output (print, println, trace) and the final result are delivered over that connection. See GET /v1/script-executions/output/{token}. A running script can be stopped with POST /v1/script-executions/{execution-id}/stop or by sending {"type":"stop"} over the WebSocket.
Request
- Base URLhttp://127.0.0.1:8000
- URLhttp://127.0.0.1:8000/v1/objects/{object-id}/execute-script
- AuthHTTP bearer
Path parameters
Request body
Response
Script executed successfully
Changes
- breaking
the request property
became required
- breaking
- info
added the new optional request property
- info
added the success response with the status
- info