You can use the Script Console to run one-off ad hoc scripts, and to learn and experiment with the Jira REST API from ScriptRunner.

Script Console example page.

Run As User

Code that is run from the Script Console can make requests back to Jira using either the ScriptRunner Add-on user or the current user. See the Run As User section of Workflow Extensions for more information.