You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/miscellaneous.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,16 @@ Sets content for the top banner in the user interface.
53
53
54
54
---
55
55
56
+
## COPILOT_ENABLED
57
+
58
+
!!! tip "Dynamic Configuration Parameter"
59
+
60
+
Default: `True`
61
+
62
+
Enables or disables the [NetBox Copilot](https://netboxlabs.com/docs/copilot/) agent globally. When enabled, users can opt to toggle the agent individually.
Copy file name to clipboardExpand all lines: docs/customization/custom-scripts.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -393,6 +393,61 @@ A complete date & time. Returns a `datetime.datetime` object.
393
393
394
394
Custom scripts can be run via the web UI by navigating to the script, completing any required form data, and clicking the "run script" button. It is possible to schedule a script to be executed at specified time in the future. A scheduled script can be canceled by deleting the associated job result object.
395
395
396
+
#### Prefilling variables via URL parameters
397
+
398
+
Script form fields can be prefilled by appending query parameters to the script URL. Each parameter name must match the variable name defined on the script class. Prefilled values are treated as initial values and can be edited before execution. Multiple values can be supplied by repeating the same parameter. Query values must be percent‑encoded where required (for example, spaces as `%20`).
399
+
400
+
Examples:
401
+
402
+
For string and integer variables, when a script defines:
403
+
404
+
```python
405
+
from extras.scripts import Script, StringVar, IntegerVar
406
+
407
+
classMyScript(Script):
408
+
name = StringVar()
409
+
count = IntegerVar()
410
+
```
411
+
412
+
the following URL prefills the `name` and `count` fields:
|`IPAddressWithMaskVar`| IP address with mask |`?addr=192.0.2.1/24`|
441
+
|`IPNetworkVar`| IP network prefix |`?network=2001:db8::/64`|
442
+
|`DateVar`| date `YYYY-MM-DD`|`?date=2025-01-05`|
443
+
|`DateTimeVar`| ISO datetime |`?when=2025-01-05T14:30:00`|
444
+
|`FileVar`| — (not supported) | — |
445
+
446
+
!!! note
447
+
- The parameter names above are examples; use the actual variable attribute names defined by the script.
448
+
- For `BooleanVar`, only an empty value (`?enabled=`) unchecks the box; any other value including `false` or `0` checks it.
449
+
- File uploads (`FileVar`) cannot be prefilled via URL parameters.
450
+
396
451
### Via the API
397
452
398
453
To run a script via the REST API, issue a POST request to the script's endpoint specifying the form data and commitment. For example, to run a script named `example.MyReport`, we would make a request such as the following:
0 commit comments