Skip to main content

Module scripts

Module scripts 

Source
Expand description

The administrator’s script editor: list, read, write and delete the files in the scripts directory, and test-run a function.

Every route needs the admin group. The directory stays the source of truth — these routes read and write those same files, so an edit here shows up in git status and a git pull shows up here.

§A test run is a real run

POST /api/scripts/run calls the function with the server’s full host bindings, as the signed-in admin. Nothing is sandboxed: a test run of an afterRelease that posts to the ERP really posts to the ERP, and a plm.updatePart really updates the part. The page says so beside the button.

Structs§

FileText
Listing
RunRequest
RunResult

Functions§

list
read
remove
run
write
Write a script. The body is the file’s text, verbatim.