Skip to main content
Skip table of contents

ScriptController

Last updated: 2025/3/7 11:50:48

Path To

Name

Description/Function

/api/script

/log/clear

Clears all when conditions.

/api/script

/clearwhen

Clears all when conditions.

/api/script

/delete/{scriptFilename}

Delete a script.

/api/script

/execute/{scriptFilename}

Execute a script.

/api/script

/executeinternal/{scriptFilename}

Execute a script.

/api/script

/executeonstart/{script}

Sets the script that's set to execute on start.

/api/script

/executeonstart

Gets the script that's set to execute on start.

/api/script

/executingblock

Ask what block is currently executing.

/api/script

/isexecuting

Ask what block is currently executing.

/api/script

/log

Gets the contents of the log file.

/api/script

/list

List scripts.

/api/script

/load/{scriptFilename}

Load a script.

/api/script

/save/{scriptFilename}

Load a script.

/api/script

/stop

Stops the currently executing script.

/log/clear

Function

Clears all when conditions.

Method

Get

Response

A representing the asynchronous operation.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/log/clear

/clearwhen

Function

Clears all when conditions.

Method

Get

Response

A representing the asynchronous operation.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/clearwhen

/delete/{scriptFilename}

Function

Delete a script.

Method

Get

Response

A representing the asynchronous operation.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/delete/{scriptFilename}

/execute/{scriptFilename}

Function

Execute a script.

Method

Get

Response

Filename of the script to run.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/execute/{scriptFilename}

/executeinternal/{scriptFilename}

Function

Execute a script.

Method

Get

Response

Filename of the script to run.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/executeinternal/{scriptFilename}

/executeonstart/{script}

Function

Sets the script that's set to execute on start.

Method

Get

Response

Filename of the script to run on startup.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/executeonstart/{script}

/executeonstart

Function

Gets the script that's set to execute on start.

Method

Get

Response

The script that's set to execute on start.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/executeonstart

/executingblock

Function

Ask what block is currently executing.

Method

Get

Response

A representing the asynchronous operation.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/executingblock

/isexecuting

Function

Ask what block is currently executing.

Method

Get

Response

A representing the asynchronous operation.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/isexecuting

/log

Function

Gets the contents of the log file.

Method

Get

Response

A representing the asynchronous operation.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/log

/list

Function

List scripts.

Method

Get

Response

A list of scripts.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/list

/load/{scriptFilename}

Function

Load a script.

Method

Get

Response

Script contents.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/load/{scriptFilename}

/save/{scriptFilename}

Function

Load a script.

Method

Post

Body

No data available!

Response

A representing the asynchronous operation.

Explanation

No data available!

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/save/{scriptFilename}

/stop

Function

Stops the currently executing script.

Method

Get

Response

Status code 200, for an completed operation being preformed.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/script/stop
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.