Skip to main content
Provision scripts are JavaScript programs that run inside GenieACS during a CWMP device session. They use the sandbox API (declare, commit, ext) to read and write device parameters, tag devices, trigger downloads, and more.
See the provisions guide for details on writing provision scripts and the available sandbox API.

Create or update a provision

PUT /provisions/<name>
Creates or replaces a provision script. The request body is the raw JavaScript source code — not JSON.
name
string
required
A unique name for the provision.
Request body: Raw JavaScript source code (plain text). Response: 200 OK on success. 400 Bad Request if the script has a syntax error.
curl -X PUT -i 'http://localhost:7557/provisions/mynewprovision' \
  --data 'log("Provision started at " + now);'
The script is validated for syntax errors before being stored. A parse error returns 400 with the error message.

Delete a provision

DELETE /provisions/<name>
name
string
required
The name of the provision to delete.
curl -X DELETE -i 'http://localhost:7557/provisions/mynewprovision'

List provisions

GET /provisions/
Returns all stored provisions as a JSON array. Each entry includes _id (the provision name) and script (the source code).
curl -X GET -i 'http://localhost:7557/provisions/'

Virtual parameters

Virtual parameters are scripts that expose computed or derived values as if they were real TR-069 parameters under the VirtualParameters.* namespace. They follow the same API pattern as provisions.

Create or update a virtual parameter

PUT /virtual_parameters/<name>
name
string
required
A unique name for the virtual parameter.
Request body: Raw JavaScript source code. Response: 200 OK on success. 400 Bad Request if the script has a syntax error.

Delete a virtual parameter

DELETE /virtual_parameters/<name>

List virtual parameters

GET /virtual_parameters/
The NBI path for virtual parameters uses an underscore: /virtual_parameters/. This maps to the virtualParameters MongoDB collection.

Build docs developers (and LLMs) love