manage_provision
Create, update, or delete GenieACS provision scripts that run JavaScript functions on the ACS to dynamically configure CPEs during device inform sessions.
Instructions
Create, update, or delete a GenieACS provision script. Provision scripts are JavaScript functions that run on the ACS during a device's inform session to dynamically configure CPEs. Use action="put" to upload a new provision script or overwrite an existing one. The script argument must be raw JavaScript source code (not JSON). Use action="delete" to remove a provision script by name. GenieACS validates the script syntax on upload — a 400 error means the JavaScript has a syntax error. Provision scripts are referenced by name in presets (via configurations of type "provision"). Use genieacs://provisions/list to view existing scripts before making changes. Example script: log("Device " + args[0] + " informed"); Limitations: provision scripts execute server-side in the GenieACS sandbox with a limited API (declare, commit, ext, log). They cannot make arbitrary HTTP calls or access the filesystem.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The operation to perform: "put" to create or update a provision, "delete" to remove it. | |
| name | Yes | The provision script name (used as the identifier in the URL). | |
| script | No | The raw JavaScript source code of the provision script (required for action="put", ignored for "delete"). GenieACS validates syntax before saving. |