Script Console
Learn about the Script Console, the feature where scripts are written (or pasted in) and ran.
The script console is a place to run scripts. Using the script console, you can copy and paste or write a script to run in Confluence. You can experiment with the Cloud REST APIs, or you can run one-time scripts. Code run from the script console can make requests back to Confluence using either the ScriptRunner add-on user or the current user.
The script console is useful for testing scripts or performing operations that you only want to do once. So if you want a list of all the spaces on your instance and some details about them, you can run a script for that. Or if you want to delete all spaces that were created by a certain person, you can do that. You can also run maintenance scripts that modify something on your instance.
Like all coding fields in ScriptRunner for Confluence Cloud, the script console uses the Code Editor. The editor has autocomplete for the following code:
- Groovy
- Atlassian REST API
- Automatically available variables
You can see autocomplete in the following screenshot:
Use the Script Console
Learn how to use the ScriptRunner for Confluence Script Console.
To use the script console, follow these steps:
